Bug #87455 MTR's internal check of the test case 'main.mysqldump' fails
Submitted: 17 Aug 2017 13:47 Modified: 30 Apr 2018 18:13
Reporter: Yura Sorokin (OCA) Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: Tests Severity:S3 (Non-critical)
Version:5.7.19 OS:Any
Assigned to: CPU Architecture:Any

[17 Aug 2017 13:47] Yura Sorokin
Description:
Running 'main.mysqldump' generates the following output

MTR's internal check of the test case 'main.mysqldump' failed.
This means that the test case does not preserve the state that existed
before the test case was executed.  Most likely the test case did not
do a proper clean-up. It could also be caused by the previous test run
by this thread, if the server wasn't restarted.
This is the diff of the states of the servers before and after the
test case was executed:
mysqltest: Logging to '/home/yura/ws/mysql-build/mysql-test/var/tmp/check-mysqld_1.log'.
mysqltest: Results saved in '/home/yura/ws/mysql-build/mysql-test/var/tmp/check-mysqld_1.result'.
mysqltest: Connecting to server localhost:13000 (socket /home/yura/ws/mysql-build/mysql-test/var/tmp/mysqld.1.sock) as 'root', connection 'default', attempt 0 ...
mysqltest: ... Connected.
mysqltest: Start processing test commands from './include/check-testcase.test' ...
mysqltest: ... Done processing test commands.
--- /home/yura/ws/mysql-build/mysql-test/var/tmp/check-mysqld_1.result  2017-08-17 16:38:40.251567717 +0300
+++ /home/yura/ws/mysql-build/mysql-test/var/tmp/check-mysqld_1.reject  2017-08-17 16:39:00.020316886 +0300
@@ -628,7 +628,6 @@
 mysql.event
 mysql.func
 mysql.general_log
-mysql.gtid_executed
 mysql.help_category
 mysql.help_keyword
 mysql.help_relation
@@ -721,9 +720,6 @@
 mysql.general_log      server_id       4       NULL    NO      int     NULL    NULL    10      0       NULL   NULL     int(10) unsigned
 mysql.general_log      command_type    5       NULL    NO      varchar 64      192     NULL    NULL    utf8   utf8_general_ci  varchar(64)
 mysql.general_log      argument        6       NULL    NO      mediumblob      16777215        16777215       NULL     NULL    NULL    NULL    mediumblob
-mysql.gtid_executed    source_uuid     1       NULL    NO      char    36      36      NULL    NULL    latin1 latin1_swedish_ci        char(36)        PRI             uuid of the source where the transaction was originally executed.
-mysql.gtid_executed    interval_start  2       NULL    NO      bigint  NULL    NULL    19      0       NULL   NULL     bigint(20)      PRI             First number of interval.
-mysql.gtid_executed    interval_end    3       NULL    NO      bigint  NULL    NULL    19      0       NULL   NULL     bigint(20)                      Last number of interval.
 mysql.help_category    help_category_id        1       NULL    NO      smallint        NULL    NULL    5      0NULL    NULL    smallint(5) unsigned    PRI
 mysql.help_category    name    2       NULL    NO      char    64      192     NULL    NULL    utf8    utf8_general_ci char(64)        UNI
 mysql.help_category    parent_category_id      3       NULL    YES     smallint        NULL    NULL    5      0NULL    NULL    smallint(5) unsigned

mysqltest: Result content mismatch

How to repeat:
./mysql-test/mtr --debug-server main.mysqldump

Suggested fix:
This happens because of the changes in 'mysqldump' utility introduced in 5.7.19.

Replication: MySQL lost its GTID position following a restart when a dump from mysqldump had been used to load data.

To keep this problem from occurring, the mysql.gtid_executed table is now excluded automatically from dumps made by mysqldump. (Bug #82848, Bug #24590891)

Fix by backing up and restoring 'mysql.gtid_executed' similarly to 'mysql.proc'
[17 Aug 2017 13:55] Yura Sorokin
Suggested patch

Attachment: bug87455_mysqldump_check_testcase.diff (application/octet-stream, text), 977 bytes.

[17 Aug 2017 14:25] MySQL Verification Team
Hello Yura Sorokin,

Thank you for the report and contribution.

Thanks,
Umesh
[30 Apr 2018 18:13] Paul DuBois
Posted by developer:
 
Fixed in 5.7.23, 8.0.12.

In MySQL 5.7.19, the mysql.gtid_executed table was excluded from
dumps. This table is no longer excluded but its data is not dumped.