Details
-
Bug
-
Status: Closed (View Workflow)
-
Major
-
Resolution: Fixed
-
10.1.17, 10.0(EOL), 10.1(EOL)
-
10.0.28
Description
Before doing anything, I recreated a fresh datadir with the following commands:
sudo systemctl stop mariadb
|
sudo rm -fr /var/lib/mysql/*
|
sudo mysql_install_db --user=mysql
|
sudo systemctl start mariadb
|
And then I took a backup with the following command:
mysqldump -u root --all-databases --events --routines --triggers --add-drop-database --single-transaction > /tmp/backupTest.sql
|
And now watch what happens if I try to load this backup twice:
$ mysql -u root --execute="show tables;" mysql
|
+---------------------------+
|
| Tables_in_mysql |
|
+---------------------------+
|
| column_stats |
|
| columns_priv |
|
| db |
|
| event |
|
| func |
|
| general_log |
|
| gtid_slave_pos |
|
| help_category |
|
| help_keyword |
|
| help_relation |
|
| help_topic |
|
| host |
|
| index_stats |
|
| innodb_index_stats |
|
| innodb_table_stats |
|
| plugin |
|
| proc |
|
| procs_priv |
|
| proxies_priv |
|
| roles_mapping |
|
| servers |
|
| slow_log |
|
| table_stats |
|
| tables_priv |
|
| time_zone |
|
| time_zone_leap_second |
|
| time_zone_name |
|
| time_zone_transition |
|
| time_zone_transition_type |
|
| user |
|
+---------------------------+
|
$ mysql -u root < /tmp/backupTest.sql
|
$ mysql -u root --execute="show tables;" mysql
|
+---------------------------+
|
| Tables_in_mysql |
|
+---------------------------+
|
| column_stats |
|
| columns_priv |
|
| db |
|
| event |
|
| func |
|
| general_log |
|
| gtid_slave_pos |
|
| help_category |
|
| help_keyword |
|
| help_relation |
|
| help_topic |
|
| host |
|
| index_stats |
|
| innodb_index_stats |
|
| innodb_table_stats |
|
| plugin |
|
| proc |
|
| procs_priv |
|
| proxies_priv |
|
| roles_mapping |
|
| servers |
|
| slow_log |
|
| table_stats |
|
| tables_priv |
|
| time_zone |
|
| time_zone_leap_second |
|
| time_zone_name |
|
| time_zone_transition |
|
| time_zone_transition_type |
|
| user |
|
+---------------------------+
|
$ mysql -u root < /tmp/backupTest.sql
|
ERROR 1146 (42S02) at line 22: Table 'mysql.proc' doesn't exist
|
$ mysql -u root --execute="show tables;" mysql
|
The error message above says that the error occurs at line 22. The statement at this line is:
$ sed -n '22p' /tmp/backupTest.sql
|
/*!40000 DROP DATABASE IF EXISTS `mysql`*/;
|
Why does the MariaDB think the mysql.proc table doesn't exist at this point?
Why does the backup work the first time, but not the second time?
The backup works when I run it a third time.
$ mysql -u root < /tmp/backupTest.sql
|
$ mysql -u root < /tmp/backupTest.sql
|
ERROR 1146 (42S02) at line 22: Table 'mysql.proc' doesn't exist
|
$ mysql -u root < /tmp/backupTest.sql
|
Attachments
Issue Links
- includes
-
MDEV-11105 Table named 'db' has weird side effect.
- Closed
- is duplicated by
-
MDEV-11098 main.mysqldump is not re-executable
- Closed