[MDEV-30959] Import with disabled keys corrupts meta-data like rows, indexes, ... Created: 2023-03-29 Updated: 2023-08-07 Resolved: 2023-08-07 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | Backup, Data Manipulation - Insert, Storage Engine - InnoDB |
| Affects Version/s: | 10.6 |
| Fix Version/s: | N/A |
| Type: | Bug | Priority: | Major |
| Reporter: | Alex | Assignee: | Marko Mäkelä |
| Resolution: | Incomplete | Votes: | 0 |
| Labels: | None | ||
| Environment: |
CentOS 7 |
||
| Attachments: |
|
||||||||
| Issue Links: |
|
||||||||
| Description |
|
When importing a dump created by mysqldump with default options meta-data like Rows and Avg_row_length are 0 and Data_length is 16 KB and indexes are not available anymore which leads to long running or locking queries. Only after executing an optimize table afterwards corrects this or whem using the option skip-disable-keys for creating dump. Attached test-script to reproduce the problem and output. Already reported at |
| Comments |
| Comment by Marko Mäkelä [ 2023-03-29 ] | ||||||
|
Thank you for the bug report. InnoDB has never supported ALTER TABLE…DISABLE KEYS or ALTER TABLE…ENABLE KEYS. If I understood the contents of the attachments correctly, the claimed problem is that the fix of
Can you please add a similar wait to your test script and see what happens? | ||||||
| Comment by Alex [ 2023-03-29 ] | ||||||
|
Thanks for the fast response. I modified the test-script, so that it now measures the duration when the statistics are updated: test-duration.sh However, this was just a setted up test-case. In reality the problem was that after an import of a bigger database the indexes are not available anymore which leaded to long running or locking queries. How do I check if the indexes are correctly generated? | ||||||
| Comment by Marko Mäkelä [ 2023-07-06 ] | ||||||
|
InnoDB should always create all indexes correctly. Do they exist in the output of SHOW CREATE TABLE and does CHECK TABLE report any inconsistency? Note: a possibly related bug |