[MDEV-19507] In multi-statement: Error 'Table doesn't exist' on MySQL master not picked up by MariaDB slave Created: 2019-05-17  Updated: 2024-02-02  Resolved: 2019-05-20

Status: Closed
Project: MariaDB Server
Component/s: Replication
Affects Version/s: 10.3.14
Fix Version/s: N/A

Type: Bug Priority: Major
Reporter: susil.behera Assignee: Unassigned
Resolution: Not a Bug Votes: 0
Labels: None
Environment:

CentOS 7



 Description   

On a replication setup from MySQL 5.7 master to MariaDB 10.3.14 slave, if we execute multiple statements which drop one existing-table and another non-existing-table then Error 'Table doesn't exist' on master is not picked up by slave.

Repro Steps -
Setup replication (format=statement)
master: MySQL 5.7
slave: MariaDB 10.3.14

@master

drop database if exists db1; 
create database db1;
create table db1.t1 (id int);
insert into db1.t1 values (1);

select count(*) from db1.t1;
+----------+
| count(*) |
+----------+
|        1 |
+----------+

@slave

select count(*) from db1.t1;
+----------+
| count(*) |
+----------+
|        1 |
+----------+

@master

drop table db1.t1, db1.t2;
ERROR 1051 (42S02): Unknown table 'db1.t2'

@slave

show slave status\G
                Slave_IO_State: Waiting for master to send event
                   Master_Host: mcrae
                   Master_User: root
                   Master_Port: 60538
                 Connect_Retry: 60
               Master_Log_File: binlog.000001
           Read_Master_Log_Pos: 1788987
                Relay_Log_File: mcrae-relay-bin.000002
                 Relay_Log_Pos: 1030
         Relay_Master_Log_File: binlog.000001
              Slave_IO_Running: Yes
             Slave_SQL_Running: Yes
               Replicate_Do_DB:
           Replicate_Ignore_DB:
            Replicate_Do_Table:
        Replicate_Ignore_Table:
       Replicate_Wild_Do_Table:
   Replicate_Wild_Ignore_Table:
                    Last_Errno: 0
                    Last_Error:
                  Skip_Counter: 0
           Exec_Master_Log_Pos: 1788987
               Relay_Log_Space: 1339
               Until_Condition: None
                Until_Log_File:
                 Until_Log_Pos: 0
            Master_SSL_Allowed: No
            Master_SSL_CA_File:
            Master_SSL_CA_Path:
               Master_SSL_Cert:
             Master_SSL_Cipher:
                Master_SSL_Key:
         Seconds_Behind_Master: 0
 Master_SSL_Verify_Server_Cert: No
                 Last_IO_Errno: 0
                 Last_IO_Error:
                Last_SQL_Errno: 0
                Last_SQL_Error:
   Replicate_Ignore_Server_Ids:
              Master_Server_Id: 60538
                Master_SSL_Crl:
            Master_SSL_Crlpath:
                    Using_Gtid: No
                   Gtid_IO_Pos:
       Replicate_Do_Domain_Ids:
   Replicate_Ignore_Domain_Ids:
                 Parallel_Mode: conservative
                     SQL_Delay: 0
           SQL_Remaining_Delay: NULL
       Slave_SQL_Running_State: Slave has read all relay log; waiting for the slave I/O thread to update it
              Slave_DDL_Groups: 0
Slave_Non_Transactional_Groups: 0
    Slave_Transactional_Groups: 0
1 row in set (0.00 sec)

Expected -
In multi-statement, Error 'Table doesn't exist' on master should be picked up by MariaDB slave.



 Comments   
Comment by Elena Stepanova [ 2019-05-20 ]

susil,

I don't see anything wrong in the output that you provided. Please clarify what is the problem here and what you mean by "error is not picked up by slave". Replication replicates schema and data updates, not error messages.

Comment by susil kumar behera (Inactive) [ 2019-05-20 ]

elenst,
Thank you for looking into it. You're correct, MariaDB is behaving the same way as MySQL. Actually when I did the same steps on Clustrix master -> MySQL slave, the error is passed on to the slave, so I thought this was the correct behavior.

Here are my further observations:
Clustrix master -> MySQL slave: error is passed on to slave
MySQL master -> MySQL slave: no error on slave
MySQL master -> MariaDB slave: no error on slave
Clustrix master -> MariaDB slave: no error on slave

I think we at the Clustrix side need to see why are we doing differently from MySQL.

Sorry for the trouble. We can close this bug.

Generated at Thu Feb 08 08:52:13 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.