Details
-
Bug
-
Status: Closed (View Workflow)
-
Critical
-
Resolution: Fixed
-
10.2.27, 10.1.41, 10.3.18, 10.4.8
-
None
Description
mysqldump ignores some internal tables by default, such as:
- mysql.apply_status
- mysql.schema
- mysql.general_log
- mysql.slow_log
- mysql.transaction_registry
See here:
https://github.com/MariaDB/server/blob/mariadb-10.4.8/client/mysqldump.c#L1001
I think the following tables should also be ignored by default:
- mysql.innodb_index_stats
- mysql.innodb_table_stats
The reason is that if someone tries to import a dump created by mysqldump, then a race condition between the import and the InnoDB persistent statistics calculation exists, and the user can see errors like this:
Duplicate 'PRIMARY-n_diff_pfx01' for key 'primary' for database 'xxxx98'.
|
This was reported long ago in the following upstream bug report:
https://bugs.mysql.com/bug.php?id=71814
The workaround mentioned in that bug report is to disable InnoDB persistent statistics prior to the import:
SET GLOBAL innodb_stats_auto_recalc=0;
|
SET GLOBAL innodb_stats_persistent=0;
|
However, it would be more ideal to make this workaround unnecessary by fixing the problem.
Attachments
Issue Links
- relates to
-
MDEV-22037 Add ability to skip content of some tables (work around for MDEV-20939)
-
- Closed
-
- links to
Activity
Field | Original Value | New Value |
---|---|---|
Remote Link | This issue links to "MySQL bug #71814 - persistent stats activity conflicts with mysqldump import of same info. (Web Link)" [ 29307 ] |
Assignee | Sergei Golubchik [ serg ] | Oleksandr Byelkin [ sanja ] |
Priority | Major [ 3 ] | Critical [ 2 ] |
Status | Open [ 1 ] | In Progress [ 3 ] |
Assignee | Oleksandr Byelkin [ sanja ] | Alexander Barkov [ bar ] |
Status | In Progress [ 3 ] | In Review [ 10002 ] |
Assignee | Alexander Barkov [ bar ] | Oleksandr Byelkin [ sanja ] |
Status | In Review [ 10002 ] | Stalled [ 10000 ] |
Link |
This issue relates to |
Assignee | Oleksandr Byelkin [ sanja ] | Marko Mäkelä [ marko ] |
Link |
This issue is blocked by |
Fix Version/s | 10.5 [ 23123 ] | |
Fix Version/s | 10.6 [ 24028 ] | |
Assignee | Marko Mäkelä [ marko ] | Sergei Petrunia [ psergey ] |
Fix Version/s | 10.6 [ 24028 ] |
Fix Version/s | 10.1 [ 16100 ] |
Link |
This issue is blocked by |
Assignee | Sergei Petrunia [ psergey ] | Rucha Deodhar [ rucha174 ] |
Status | Stalled [ 10000 ] | In Progress [ 3 ] |
Assignee | Rucha Deodhar [ rucha174 ] | Sergei Golubchik [ serg ] |
Status | In Progress [ 3 ] | In Review [ 10002 ] |
Assignee | Sergei Golubchik [ serg ] | Rucha Deodhar [ rucha174 ] |
Status | In Review [ 10002 ] | Stalled [ 10000 ] |
Status | Stalled [ 10000 ] | In Progress [ 3 ] |
Assignee | Rucha Deodhar [ rucha174 ] | Sergei Golubchik [ serg ] |
Status | In Progress [ 3 ] | In Review [ 10002 ] |
Status | In Review [ 10002 ] | Stalled [ 10000 ] |
Assignee | Sergei Golubchik [ serg ] | Rucha Deodhar [ rucha174 ] |
Fix Version/s | 10.2.37 [ 25112 ] | |
Fix Version/s | 10.3.28 [ 25111 ] | |
Fix Version/s | 10.4.18 [ 25110 ] | |
Fix Version/s | 10.5.9 [ 25109 ] | |
Fix Version/s | 10.2 [ 14601 ] | |
Fix Version/s | 10.3 [ 22126 ] | |
Fix Version/s | 10.4 [ 22408 ] | |
Fix Version/s | 10.5 [ 23123 ] | |
Resolution | Fixed [ 1 ] | |
Status | Stalled [ 10000 ] | Closed [ 6 ] |
Workflow | MariaDB v3 [ 100739 ] | MariaDB v4 [ 156924 ] |
Zendesk Related Tickets | 132213 |
I am afraid we can not just ignore the tables:
2020-03-18 11:51:58 7fa31c4e2700 InnoDB: Error: Table "mysql"."innodb_table_stats" not found.