Bug#28388217 - SERVER CAN FAIL WHILE REPLICATING CONDITIONAL COMMENTS

test case
This commit is contained in:
Sergei Golubchik 2020-04-27 15:49:27 +02:00
parent 4d1de554bb
commit 59880df8cd
2 changed files with 26 additions and 1 deletions

View File

@ -60,5 +60,20 @@ include/diff_tables.inc [master:t1,slave:t1]
# comments
SELECT c1 FROM /*!99999 t1 WHEREN;
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '/*!99999 t1 WHEREN' at line 1
insert t1 values (/*!50505 1 /* foo */ */ + 2);
insert t1 values (/*!999999 10 /* foo */ */ + 20);
show binlog events from <binlog_start>;
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 # Query # # BEGIN
master-bin.000001 # Query # # use `test`; insert t1 values (/*!50505 1 /* foo */ */ + 2)
master-bin.000001 # Query # # COMMIT
master-bin.000001 # Query # # BEGIN
master-bin.000001 # Query # # use `test`; insert t1 values (/* 999999 10 (* foo *) */ + 20)
master-bin.000001 # Query # # COMMIT
select * from t1;
c1
62
3
20
DROP TABLE t1;
include/rpl_end.inc

View File

@ -68,7 +68,17 @@ sync_slave_with_master;
--echo # comments
--connection master
--error 1064
SELECT c1 FROM /*!99999 t1 WHEREN;
SELECT c1 FROM /*!99999 t1 WHEREN; #*/
#
# Bug#28388217 - SERVER CAN FAIL WHILE REPLICATING CONDITIONAL COMMENTS
#
insert t1 values (/*!50505 1 /* foo */ */ + 2);
insert t1 values (/*!999999 10 /* foo */ */ + 20);
source include/show_binlog_events.inc;
sync_slave_with_master;
select * from t1;
connection master;
DROP TABLE t1;
--source include/rpl_end.inc