Details
-
Bug
-
Status: Closed (View Workflow)
-
Critical
-
Resolution: Fixed
-
10.4.12
-
None
Description
How to reproduce:
- create a sequence that uses many optional settings, like:
CREATE SEQUENCE s START WITH 100 INCREMENT BY 10 MINVALUE=100 MAXVALUE=1000 CYCLE;
|
Dump and restore it with regular mysqldump, and do SHOW CREATE SEQUENCE s:
MariaDB [test]> show create sequence s;
|
+-------+--------------------------------------------------------------------------------------------------------------+
|
| Table | Create Table |
|
+-------+--------------------------------------------------------------------------------------------------------------+
|
| s | CREATE SEQUENCE `s` start with 100 minvalue 100 maxvalue 1000 increment by 10 cache 1000 cycle ENGINE=InnoDB |
|
+-------+--------------------------------------------------------------------------------------------------------------+
|
1 row in set (0.001 sec)
|
So the sequence was restored perfectly. Now lets try the same with a --no-data dump:
MariaDB [test]> show create sequence s;
|
+-------+--------------------------------------------------------------------------------------------------------------------------+
|
| Table | Create Table |
|
+-------+--------------------------------------------------------------------------------------------------------------------------+
|
| s | CREATE SEQUENCE `s` start with 1 minvalue 1 maxvalue 9223372036854775806 increment by 1 cache 1000 nocycle ENGINE=InnoDB |
|
+-------+--------------------------------------------------------------------------------------------------------------------------+
|
1 row in set (0.001 sec)
|
Now the sequence was recreated completely differently, only its name was preserved, and the CACHE value matches by chance as the original create didn't specify that one, so that it was using the default.
Attachments
Issue Links
- is blocked by
-
MDEV-23523 CREATE SEQUENCE to accept RESTART WITH (like alter sequence)
- Closed
-
MDEV-23524 SHOW CREATE SEQUENCE to output restart value
- Closed
- relates to
-
MDEV-20070 cannot insert into write locked tables with sequences
- Confirmed