mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
BUG#32205 Replaying statements from mysqlbinlog fails with a syntax error, replicates
fine The reason of this bug is that when mysqlbinlog dumps a query, the query is written to output with a delimeter appended right after it, if the query string ends with a '--' comment, then the delimeter would be considered as part of the comment, if there are any statements after this query, then it will cause a syntax error. Start a newline before appending delimiter after a query string mysql-test/r/mysqlbinlog.result: Update result for BUG#32205 mysql-test/r/mysqlbinlog2.result: Update result for BUG#32205 mysql-test/r/user_var-binlog.result: Update result for BUG#32205 mysql-test/suite/binlog/r/binlog_stm_ctype_ucs.result: Update result for BUG#32205 mysql-test/suite/binlog/r/binlog_stm_mix_innodb_myisam.result: Update result for BUG#32205 mysql-test/suite/binlog/t/binlog_stm_mix_innodb_myisam.test: fix test for BUG#32205 mysql-test/suite/rpl/r/rpl_row_mysqlbinlog.result: Update result for BUG#32205 mysql-test/suite/rpl/r/rpl_stm_charset.result: Update result for BUG#32205 sql/log_event.cc: Start a newline before appending delimiter after a query string mysql-test/suite/binlog/r/binlog_start_comment.result: Add test for BUG#32205 mysql-test/suite/binlog/t/binlog_start_comment.test: Add test for BUG#32205
This commit is contained in:
22
mysql-test/suite/binlog/t/binlog_start_comment.test
Normal file
22
mysql-test/suite/binlog/t/binlog_start_comment.test
Normal file
@ -0,0 +1,22 @@
|
||||
# Test case for bug#32205 Replaying statements from mysqlbinlog fails
|
||||
# with a syntax error, replicates fine
|
||||
|
||||
-- source include/have_log_bin.inc
|
||||
reset master;
|
||||
--disable_warnings
|
||||
drop table if exists t1,t2;
|
||||
--enable_warnings
|
||||
create table t1 (word varchar(20)) -- create table t1;
|
||||
create table t2 (word varchar(20)) -- create table t2;
|
||||
load data infile '../std_data_ln/words.dat' into table t1 -- load data to t1;
|
||||
insert into t2 values ("Ada");
|
||||
flush logs;
|
||||
select * from t2;
|
||||
--exec $MYSQL_BINLOG $MYSQLTEST_VARDIR/log/master-bin.000001 > $MYSQLTEST_VARDIR/tmp/binlog_start_comment.binlog
|
||||
--exec $MYSQL < $MYSQLTEST_VARDIR/tmp/binlog_start_comment.binlog
|
||||
flush logs;
|
||||
select * from t2;
|
||||
|
||||
# clean up
|
||||
drop table t1,t2;
|
||||
--system rm $MYSQLTEST_VARDIR/tmp/binlog_start_comment.binlog
|
Reference in New Issue
Block a user