Bug #85931 drop database - different errors on master and slave.
Submitted: 13 Apr 2017 12:12 Modified: 5 May 2017 13:43
Reporter: Sergej Kunz Email Updates:
Status: Can't repeat Impact on me:
None 
Category:MySQL Server: Replication Severity:S1 (Critical)
Version:mysql-5.7.18 OS:Red Hat (Red Hat Enterprise Linux Server release 6.5 (Santiago))
Assigned to: CPU Architecture:Any
Tags: drop database

[13 Apr 2017 12:12] Sergej Kunz
Description:
We are using master-master replication mysql server 5.7.18.
Run mysql query DROP DATABASE on master, after that slave has Error:

2017-04-13T11:48:09.819698Z 8812 [ERROR] Slave SQL for channel '': Query caused different errors on master and slave. Error on master: message (format)='Failed to open mysql.event' error code=1545; Error on slave:actual message='no error', error code=0. Default database:'x_db'. Query:'DROP DATABASE IF EXISTS x_db', Error_code: 3002

How to repeat:
Test
1. master-master replication
2. run mysql query on master DROP DATABASE test;
3. check slave for Error: SHOW SLAVE STATUS\G

Suggested fix:
Workaround:
run that on defect slave server
1. STOP SLAVE;
2. SET GLOBAL sql_slave_skip_counter = 1; 
3. START SLAVE;
[20 Apr 2017 13:16] MySQL Verification Team
Hello Sergej Kunz,

Thank you for the report.
I couldn't reproduce the reported issue at my end with master-master environment created using sandbox. Looking at the error on master "Failed to open mysql.event", how did you setup master node(s)? Using logical  dump? In that case you might have skipped to include the table(--events parameter to mysqldump) which is causing the issue here. Imho, you will have to fix the issue and if you are still seeing this issue then report us back with exact conf files, and CREATE DATABASE.. statement executed on master which triggered this issue. If you can provide more information, feel free to add it to this bug and change the status back to 'Open'.

Thank you for your interest in MySQL.

Thanks,
umesh
[20 Apr 2017 13:16] MySQL Verification Team
test results

Attachment: 85931.results (application/octet-stream, text), 15.19 KiB.

[21 Apr 2017 11:19] Sergej Kunz
1. Create master-master replication using mysql-5.7.18

2. Run create and drop command on master
master:
2.1. CREATE DATABASE x_db;
2.2. DROP DATABASE IF EXISTS x_db;

2. After that Check your Error on slave
slave:
3.1 SHOW SLAVE STATUS\G
[5 May 2017 13:43] Sergej Kunz
Any progress here?