Details
-
Bug
-
Status: Closed (View Workflow)
-
Major
-
Resolution: Fixed
-
10.11.2, 10.10.3, 10.7(EOL), 10.8(EOL), 10.9(EOL), 10.10(EOL), 10.11, 11.0(EOL)
-
Ubuntu 22.04.2 LTS, Hyper-V virtual machine
Description
I imported sql dump from MySQL 5.5.62 to MariaDB. Imported file has about 2GB. Import was successful, but after MariaDB restart AUTO_INCREMENT values on some tables changed (for example: on table with max ID 11504 AUTO_INCREMENT changed from 11505 to 2).
After some testing I figured out that removing UNIQUE_CHECKS option from import file fixes this. I cannot see any common cause, some affected tables have unique keys and some doesn't. There are no errors on log or anywhere. Import was tested on newly installed Ubuntu server without any additional software running.
What other information should I provide?
SQL dump was created with mysqldump Ver 10.13 Distrib 5.5.62:
mysqldump -p --single-transaction --no-create-db --no-create-info --skip-add-drop-table --skip-comments "database_name" > db.sql
|
Command for file import:
mariadb -u root "database_name" < "db.sql"
|
Attachments
Issue Links
- causes
-
MDEV-32008 auto_increment value on table increments by one after restart
-
- Closed
-
- is caused by
-
MDEV-24621 In bulk insert, pre-sort and build indexes one page at a time
-
- Closed
-
Activity
Field | Original Value | New Value |
---|---|---|
Description |
I imported sql dump from MySQL 5.5.62 to MariaDB. Imported file has about 2GB. Import was successful, but after MariaDB restart AUTO_INCREMENT values on some tables changed.
After some testing I figured out that removing UNIQUE_CHECKS option from import file fixes this. I cannot see any common cause, some affected tables have unique keys and some doesn't. There are no errors on log or anywhere. Import was tested on newly installed Ubuntu server without any additional software running. What other information should I provide? SQL dump was created with mysqldump Ver 10.13 Distrib 5.5.62: {code} mysqldump -p --single-transaction --no-create-db --no-create-info --skip-add-drop-table --skip-comments "database_name" > db.sql {code} Command for file import: {code} mariadb -u root "database_name" < "db.sql" {code} |
I imported sql dump from MySQL 5.5.62 to MariaDB. Imported file has about 2GB. Import was successful, but after MariaDB restart AUTO_INCREMENT values on some tables changed (for example: on table with max ID 11504 AUTO_INCREMENT changed from 11505 to 2).
After some testing I figured out that removing UNIQUE_CHECKS option from import file fixes this. I cannot see any common cause, some affected tables have unique keys and some doesn't. There are no errors on log or anywhere. Import was tested on newly installed Ubuntu server without any additional software running. What other information should I provide? SQL dump was created with mysqldump Ver 10.13 Distrib 5.5.62: {code} mysqldump -p --single-transaction --no-create-db --no-create-info --skip-add-drop-table --skip-comments "database_name" > db.sql {code} Command for file import: {code} mariadb -u root "database_name" < "db.sql" {code} |
Attachment | image-2023-03-06-14-09-34-196.png [ 68707 ] | |
Description |
I imported sql dump from MySQL 5.5.62 to MariaDB. Imported file has about 2GB. Import was successful, but after MariaDB restart AUTO_INCREMENT values on some tables changed (for example: on table with max ID 11504 AUTO_INCREMENT changed from 11505 to 2).
After some testing I figured out that removing UNIQUE_CHECKS option from import file fixes this. I cannot see any common cause, some affected tables have unique keys and some doesn't. There are no errors on log or anywhere. Import was tested on newly installed Ubuntu server without any additional software running. What other information should I provide? SQL dump was created with mysqldump Ver 10.13 Distrib 5.5.62: {code} mysqldump -p --single-transaction --no-create-db --no-create-info --skip-add-drop-table --skip-comments "database_name" > db.sql {code} Command for file import: {code} mariadb -u root "database_name" < "db.sql" {code} |
I imported sql dump from MySQL 5.5.62 to MariaDB. Imported file has about 2GB. Import was successful, but after MariaDB restart AUTO_INCREMENT values on some tables changed (for example: on table with max ID 11504 AUTO_INCREMENT changed from 11505 to 2).
After some testing I figured out that removing UNIQUE_CHECKS option from import file fixes this. I cannot see any common cause, some affected tables have unique keys and some doesn't. There are no errors on log or anywhere. Import was tested on newly installed Ubuntu server without any additional software running. What other information should I provide? SQL dump was created with mysqldump Ver 10.13 Distrib 5.5.62: {code} mysqldump -p --single-transaction --no-create-db --no-create-info --skip-add-drop-table --skip-comments "database_name" > db.sql {code} Command for file import: {code} mariadb -u root "database_name" < "db.sql" {code} Using default configuration with these changes: !image-2023-03-06-14-09-34-196.png|thumbnail! |
Attachment | 1-create-tables.sql [ 68726 ] | |
Attachment | 2-import-broken.sql [ 68727 ] | |
Attachment | 3-import-fixed.sql [ 68728 ] |
Attachment | table-status-result.png [ 68729 ] |
Status | Open [ 1 ] | Needs Feedback [ 10501 ] |
Status | Needs Feedback [ 10501 ] | Open [ 1 ] |
Affects Version/s | 10.10 [ 27530 ] | |
Affects Version/s | 10.11 [ 27614 ] | |
Affects Version/s | 11.0 [ 28320 ] |
Affects Version/s | 10.9 [ 26905 ] |
Fix Version/s | 10.9 [ 26905 ] | |
Fix Version/s | 10.10 [ 27530 ] | |
Fix Version/s | 10.11 [ 27614 ] | |
Fix Version/s | 11.0 [ 28320 ] |
Labels | regression |
Affects Version/s | 10.7 [ 24805 ] | |
Affects Version/s | 10.8 [ 26121 ] |
Labels | regression | not-10.6 regression |
Assignee | Marko Mäkelä [ marko ] |
Status | Open [ 1 ] | Confirmed [ 10101 ] |
Link |
This issue is caused by |
Assignee | Marko Mäkelä [ marko ] | Thirunarayanan Balathandayuthapani [ thiru ] |
Status | Confirmed [ 10101 ] | In Progress [ 3 ] |
Assignee | Thirunarayanan Balathandayuthapani [ thiru ] | Marko Mäkelä [ marko ] |
Status | In Progress [ 3 ] | In Review [ 10002 ] |
Assignee | Marko Mäkelä [ marko ] | Thirunarayanan Balathandayuthapani [ thiru ] |
Status | In Review [ 10002 ] | Stalled [ 10000 ] |
Component/s | Storage Engine - InnoDB [ 10129 ] | |
Fix Version/s | 10.9.8 [ 29015 ] | |
Fix Version/s | 10.10.6 [ 29017 ] | |
Fix Version/s | 10.11.5 [ 29019 ] | |
Fix Version/s | 11.1.2 [ 28921 ] | |
Fix Version/s | 11.2.1 [ 29034 ] | |
Fix Version/s | 10.9 [ 26905 ] | |
Fix Version/s | 10.10 [ 27530 ] | |
Fix Version/s | 10.11 [ 27614 ] | |
Fix Version/s | 11.0 [ 28320 ] | |
Resolution | Fixed [ 1 ] | |
Status | Stalled [ 10000 ] | Closed [ 6 ] |
Link |
This issue causes |
Is the AUTO_INCREMENT on the primary or a secondary key? What table types are affected? Can you include some samples of SHOW CREATE TABLE for affected and unaffected tables? Obscure column names if you want to keep them private, but do keep them consistent with indexes. Text is preferred over images so its easier to recreate the test case.