Browse Source
BUG#32205 Replaying statements from mysqlbinlog fails with a syntax error, replicates fine
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/ctype_ucs_binlog.result: Update test result for BUG#32205 mysql-test/r/mix_innodb_myisam_binlog.result: Update test result for BUG#32205 mysql-test/r/mysqlbinlog.result: Update test result for BUG#32205 mysql-test/r/rpl_charset.result: Update test result for BUG#32205 mysql-test/r/rpl_timezone.result: Update test result for BUG#32205 mysql-test/r/user_var-binlog.result: Update test result for BUG#32205 mysql-test/t/mix_innodb_myisam_binlog.test: Fixed for BUG#32205 sql/log_event.cc: Start a newline before appending delimiter after a query string mysql-test/r/binlog_start_comment.result: Add test for BUG#32205 mysql-test/t/binlog_start_comment.test: Add test for BUG#32205pull/374/head
10 changed files with 171 additions and 74 deletions
-
13mysql-test/r/binlog_start_comment.result
-
3mysql-test/r/ctype_ucs_binlog.result
-
4mysql-test/r/mix_innodb_myisam_binlog.result
-
108mysql-test/r/mysqlbinlog.result
-
69mysql-test/r/rpl_charset.result
-
18mysql-test/r/rpl_timezone.result
-
6mysql-test/r/user_var-binlog.result
-
16mysql-test/t/binlog_start_comment.test
-
2mysql-test/t/mix_innodb_myisam_binlog.test
-
6sql/log_event.cc
@ -0,0 +1,13 @@ |
|||
drop table if exists t1,t2; |
|||
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; |
|||
word |
|||
Ada |
|||
flush logs; |
|||
select * from t2; |
|||
word |
|||
Ada |
|||
@ -0,0 +1,16 @@ |
|||
# Test case for bug#32205 Replaying statements from mysqlbinlog fails |
|||
# with a syntax error, replicates fine |
|||
|
|||
-- source include/have_log_bin.inc |
|||
--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 | $MYSQL |
|||
flush logs; |
|||
select * from t2; |
|||
Write
Preview
Loading…
Cancel
Save
Reference in new issue