Details
-
Task
-
Status: Closed (View Workflow)
-
Major
-
Resolution: Won't Fix
-
None
Description
When a user is restoring from a mysqldump, or looking at a galera node previously ssted from a mysqldump sst, we really don't want them panicing that they are missing data that is derived from sequences.
anel's current work has placed the `CREATE SEQUENCES` at the end of the mysqldump, so regardless if its dumped with `--single-transaction` or not, the `show create sequence` at the time its executated will contain a usable sequnce number.
Rather than the original plan of extending `create sequence`, `show create sequence` can return a `setval(seq, nextnum)` as follows:
proposed SHOW CREATE SEQUENCE results |
| s | CREATE SEQUENCE `s` start with 100 minvalue 1 maxvalue 9223372036854775806 increment by 10 cache 1000 nocycle ENGINE=InnoDB |
|
| s | SELECT SETVAL(`s`, 1024) |
|
Attachments
Issue Links
- blocks
-
MDEV-21786 mysqldump will forget sequence definition details on --no-data dump
-
- Closed
-
- is blocked by
-
MDEV-23523 CREATE SEQUENCE to accept RESTART WITH (like alter sequence)
-
- Closed
-
Activity
Field | Original Value | New Value |
---|---|---|
Link |
This issue is blocked by |
Link |
This issue blocks |
Fix Version/s | N/A [ 14700 ] | |
Resolution | Won't Fix [ 2 ] | |
Status | Open [ 1 ] | Closed [ 6 ] |
Description | to restart sequences from a backup the exact next number is needed, not just the next cached value. |
When a user is restoring from a mysqldump, or looking at a galera node previously ssted from a mysqldump sst, we really don't want them panicing that they are missing data that is derived from sequences.
[~anel]'s current work has placed the `CREATE SEQUENCES` at the end of the mysqldump, so regardless if its dumped with `--single-transaction` or not, the `show create sequence` at the time its executated will contain a usable sequnce number. Rather than the original plan of extending `create sequence`, `show create sequence` can return a `setval(seq, nextnum)` as follows: {noformat:title=proposed SHOW CREATE SEQUENCE} | s | CREATE SEQUENCE `s` start with 100 minvalue 1 maxvalue 9223372036854775806 increment by 10 cache 1000 nocycle ENGINE=InnoDB | | s | SELECT SETVAL(`s`, 1024) | {noformat} |
Description |
When a user is restoring from a mysqldump, or looking at a galera node previously ssted from a mysqldump sst, we really don't want them panicing that they are missing data that is derived from sequences.
[~anel]'s current work has placed the `CREATE SEQUENCES` at the end of the mysqldump, so regardless if its dumped with `--single-transaction` or not, the `show create sequence` at the time its executated will contain a usable sequnce number. Rather than the original plan of extending `create sequence`, `show create sequence` can return a `setval(seq, nextnum)` as follows: {noformat:title=proposed SHOW CREATE SEQUENCE} | s | CREATE SEQUENCE `s` start with 100 minvalue 1 maxvalue 9223372036854775806 increment by 10 cache 1000 nocycle ENGINE=InnoDB | | s | SELECT SETVAL(`s`, 1024) | {noformat} |
When a user is restoring from a mysqldump, or looking at a galera node previously ssted from a mysqldump sst, we really don't want them panicing that they are missing data that is derived from sequences.
[~anel]'s current work has placed the `CREATE SEQUENCES` at the end of the mysqldump, so regardless if its dumped with `--single-transaction` or not, the `show create sequence` at the time its executated will contain a usable sequnce number. Rather than the original plan of extending `create sequence`, `show create sequence` can return a `setval(seq, nextnum)` as follows: {noformat:title=proposed SHOW CREATE SEQUENCE results} | s | CREATE SEQUENCE `s` start with 100 minvalue 1 maxvalue 9223372036854775806 increment by 10 cache 1000 nocycle ENGINE=InnoDB | | s | SELECT SETVAL(`s`, 1024) | {noformat} |
Priority | Critical [ 2 ] | Major [ 3 ] |
Assignee | Anel Husakovic [ anel ] | Sergei Golubchik [ serg ] |
Resolution | Won't Fix [ 2 ] | |
Status | Closed [ 6 ] | Stalled [ 10000 ] |
Fix Version/s | 10.6 [ 24028 ] | |
Fix Version/s | N/A [ 14700 ] |
Fix Version/s | N/A [ 14700 ] | |
Fix Version/s | 10.6 [ 24028 ] | |
Resolution | Won't Fix [ 2 ] | |
Status | Stalled [ 10000 ] | Closed [ 6 ] |
Workflow | MariaDB v3 [ 112783 ] | MariaDB v4 [ 134325 ] |