Details
Description
TEST:
|
DROP DATABASE IF EXISTS test1; |
DROP DATABASE IF EXISTS test2; |
CREATE DATABASE test1; |
CREATE DATABASE test2; |
USE test1; |
CREATE SEQUENCE seq_t_i INCREMENT 1 START WITH 1; |
CREATE TABLE t( |
i integer DEFAULT nextval(seq_t_i), |
j integer |
);
|
INSERT INTO t VALUES (1,1),(2,2),(3,3),(4,4); |
SELECT SETVAL(seq_t_i, 4); |
INSERT INTO t(j) VALUES (5),(6),(7); |
SELECT SETVAL(seq_t_i,200); |
INSERT INTO t(j) VALUES (201),(202),(203); |
|
$ mysqldump test1 > foo.sql
|
$ mysql test2 < foo.sql
|
|
ERROR 1100 (HY000) at line 66: Table 'seq_t_id' was not locked with LOCK TABLES |
Looks like mysqldump not working correct on sequences.
Best regards,
Susanne
Attachments
Issue Links
- duplicates
-
MDEV-20071 mysqldump won't work correct on sequences
- Closed
- relates to
-
MDEV-21786 mysqldump will forget sequence definition details on --no-data dump
- Closed
-
MDEV-30155 SEQUENCEs dumped with mariadb-dump cannot be restored in different DB
- Open