List:Commits« Previous MessageNext Message »
From:hezx Date:December 15 2007 12:51pm
Subject:bk commit into 5.0 tree (hezx:1.2559) BUG#32205
View as plain text  
Below is the list of changes that have just been committed into a local
5.0 repository of hezx. When hezx does a push these changes will
be propagated to the main repository and, within 24 hours after the
push, to the public repository.
For information on how to access the public repository
see http://dev.mysql.com/doc/mysql/en/installing-source-tree.html

ChangeSet@stripped, 2007-12-15 19:50:23+08:00, hezx@hezx.(none) +10 -0
  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/binlog_start_comment.result@stripped, 2007-12-15 19:50:21+08:00,
hezx@hezx.(none) +13 -0
    Add test for BUG#32205

  mysql-test/r/binlog_start_comment.result@stripped, 2007-12-15 19:50:21+08:00,
hezx@hezx.(none) +0 -0

  mysql-test/r/ctype_ucs_binlog.result@stripped, 2007-12-15 19:50:21+08:00, hezx@hezx.(none) +2
-1
    Update test result for BUG#32205

  mysql-test/r/mix_innodb_myisam_binlog.result@stripped, 2007-12-15 19:50:21+08:00,
hezx@hezx.(none) +2 -2
    Update test result for BUG#32205

  mysql-test/r/mysqlbinlog.result@stripped, 2007-12-15 19:50:21+08:00, hezx@hezx.(none) +72
-36
    Update test result for BUG#32205

  mysql-test/r/rpl_charset.result@stripped, 2007-12-15 19:50:21+08:00, hezx@hezx.(none) +46
-23
    Update test result for BUG#32205

  mysql-test/r/rpl_timezone.result@stripped, 2007-12-15 19:50:21+08:00, hezx@hezx.(none) +12
-6
    Update test result for BUG#32205

  mysql-test/r/user_var-binlog.result@stripped, 2007-12-15 19:50:21+08:00, hezx@hezx.(none) +4
-2
    Update test result for BUG#32205

  mysql-test/t/binlog_start_comment.test@stripped, 2007-12-15 19:50:21+08:00, hezx@hezx.(none)
+16 -0
    Add test for BUG#32205

  mysql-test/t/binlog_start_comment.test@stripped, 2007-12-15 19:50:21+08:00, hezx@hezx.(none)
+0 -0

  mysql-test/t/mix_innodb_myisam_binlog.test@stripped, 2007-12-15 19:50:21+08:00,
hezx@hezx.(none) +1 -1
    Fixed for BUG#32205

  sql/log_event.cc@stripped, 2007-12-15 19:50:21+08:00, hezx@hezx.(none) +3 -3
    Start a newline before appending delimiter after a query string

diff -Nrup a/mysql-test/r/binlog_start_comment.result
b/mysql-test/r/binlog_start_comment.result
--- /dev/null	Wed Dec 31 16:00:00 196900
+++ b/mysql-test/r/binlog_start_comment.result	2007-12-15 19:50:21 +08:00
@@ -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
diff -Nrup a/mysql-test/r/ctype_ucs_binlog.result b/mysql-test/r/ctype_ucs_binlog.result
--- a/mysql-test/r/ctype_ucs_binlog.result	2006-11-28 20:26:08 +08:00
+++ b/mysql-test/r/ctype_ucs_binlog.result	2007-12-15 19:50:21 +08:00
@@ -18,7 +18,8 @@ SET @@session.foreign_key_checks=1, @@se
 SET @@session.sql_mode=0/*!*/;
 /*!\C latin1 *//*!*/;
 SET
@@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8/*!*/;
-insert into t2 values (@v)/*!*/;
+insert into t2 values (@v)
+/*!*/;
 DELIMITER ;
 # End of log file
 ROLLBACK /* added by mysqlbinlog */;
diff -Nrup a/mysql-test/r/mix_innodb_myisam_binlog.result
b/mysql-test/r/mix_innodb_myisam_binlog.result
--- a/mysql-test/r/mix_innodb_myisam_binlog.result	2007-10-13 20:49:37 +08:00
+++ b/mysql-test/r/mix_innodb_myisam_binlog.result	2007-12-15 19:50:21 +08:00
@@ -275,9 +275,9 @@ is not null;
 is not null
 1
 select
-@a like "%#%error_code=0%ROLLBACK/*!*/;%ROLLBACK /* added by mysqlbinlog */;%",
+@a like "%#%error_code=0%ROLLBACK\n/*!*/;%ROLLBACK /* added by mysqlbinlog */;%",
 @a not like "%#%error_code=%error_code=%";
-@a like "%#%error_code=0%ROLLBACK/*!*/;%ROLLBACK /* added by mysqlbinlog */;%"	@a not
like "%#%error_code=%error_code=%"
+@a like "%#%error_code=0%ROLLBACK\n/*!*/;%ROLLBACK /* added by mysqlbinlog */;%"	@a not
like "%#%error_code=%error_code=%"
 1	1
 drop table t1, t2;
 create temporary table tt (a int unique);
diff -Nrup a/mysql-test/r/mysqlbinlog.result b/mysql-test/r/mysqlbinlog.result
--- a/mysql-test/r/mysqlbinlog.result	2007-11-09 20:43:07 +08:00
+++ b/mysql-test/r/mysqlbinlog.result	2007-12-15 19:50:21 +08:00
@@ -23,24 +23,33 @@ SET @@session.foreign_key_checks=1, @@se
 SET @@session.sql_mode=0/*!*/;
 /*!\C latin1 *//*!*/;
 SET
@@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8/*!*/;
-drop table if exists t1,t2,t3,t4,t5,t03,t04/*!*/;
+drop table if exists t1,t2,t3,t4,t5,t03,t04
+/*!*/;
 SET TIMESTAMP=1000000000/*!*/;
-create table t1 (word varchar(20))/*!*/;
+create table t1 (word varchar(20))
+/*!*/;
 SET TIMESTAMP=1000000000/*!*/;
-create table t2 (id int auto_increment not null primary key)/*!*/;
+create table t2 (id int auto_increment not null primary key)
+/*!*/;
 SET TIMESTAMP=1000000000/*!*/;
-insert into t1 values ("abirvalg")/*!*/;
+insert into t1 values ("abirvalg")
+/*!*/;
 SET INSERT_ID=1/*!*/;
 SET TIMESTAMP=1000000000/*!*/;
-insert into t2 values ()/*!*/;
+insert into t2 values ()
+/*!*/;
 SET TIMESTAMP=1000000000/*!*/;
-load data LOCAL INFILE 'MYSQLTEST_VARDIR/tmp/SQL_LOAD_MB-1-0' INTO table t1/*!*/;
+load data LOCAL INFILE 'MYSQLTEST_VARDIR/tmp/SQL_LOAD_MB-1-0' INTO table t1
+/*!*/;
 SET TIMESTAMP=1000000000/*!*/;
-load data LOCAL INFILE 'MYSQLTEST_VARDIR/tmp/SQL_LOAD_MB-2-0' INTO table t1/*!*/;
+load data LOCAL INFILE 'MYSQLTEST_VARDIR/tmp/SQL_LOAD_MB-2-0' INTO table t1
+/*!*/;
 SET TIMESTAMP=1000000000/*!*/;
-load data LOCAL INFILE 'MYSQLTEST_VARDIR/tmp/SQL_LOAD_MB-3-0' INTO table t1/*!*/;
+load data LOCAL INFILE 'MYSQLTEST_VARDIR/tmp/SQL_LOAD_MB-3-0' INTO table t1
+/*!*/;
 SET TIMESTAMP=1000000000/*!*/;
-load data LOCAL INFILE 'MYSQLTEST_VARDIR/tmp/SQL_LOAD_MB-4-0' INTO table t1/*!*/;
+load data LOCAL INFILE 'MYSQLTEST_VARDIR/tmp/SQL_LOAD_MB-4-0' INTO table t1
+/*!*/;
 DELIMITER ;
 # End of log file
 ROLLBACK /* added by mysqlbinlog */;
@@ -56,7 +65,8 @@ SET @@session.foreign_key_checks=1, @@se
 SET @@session.sql_mode=0/*!*/;
 /*!\C latin1 *//*!*/;
 SET
@@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8/*!*/;
-insert into t1 values ("Alas")/*!*/;
+insert into t1 values ("Alas")
+/*!*/;
 DELIMITER ;
 # End of log file
 ROLLBACK /* added by mysqlbinlog */;
@@ -83,7 +93,8 @@ SET @@session.foreign_key_checks=1, @@se
 SET @@session.sql_mode=0/*!*/;
 /*!\C latin1 *//*!*/;
 SET
@@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8/*!*/;
-insert into t1 values ("Alas")/*!*/;
+insert into t1 values ("Alas")
+/*!*/;
 DELIMITER ;
 # End of log file
 ROLLBACK /* added by mysqlbinlog */;
@@ -100,24 +111,33 @@ SET @@session.foreign_key_checks=1, @@se
 SET @@session.sql_mode=0/*!*/;
 /*!\C latin1 *//*!*/;
 SET
@@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8/*!*/;
-drop table if exists t1,t2,t3,t4,t5,t03,t04/*!*/;
+drop table if exists t1,t2,t3,t4,t5,t03,t04
+/*!*/;
 SET TIMESTAMP=1000000000/*!*/;
-create table t1 (word varchar(20))/*!*/;
+create table t1 (word varchar(20))
+/*!*/;
 SET TIMESTAMP=1000000000/*!*/;
-create table t2 (id int auto_increment not null primary key)/*!*/;
+create table t2 (id int auto_increment not null primary key)
+/*!*/;
 SET TIMESTAMP=1000000000/*!*/;
-insert into t1 values ("abirvalg")/*!*/;
+insert into t1 values ("abirvalg")
+/*!*/;
 SET INSERT_ID=1/*!*/;
 SET TIMESTAMP=1000000000/*!*/;
-insert into t2 values ()/*!*/;
+insert into t2 values ()
+/*!*/;
 SET TIMESTAMP=1000000000/*!*/;
-load data LOCAL INFILE 'MYSQLTEST_VARDIR/tmp/SQL_LOAD_MB-1-2' INTO table t1/*!*/;
+load data LOCAL INFILE 'MYSQLTEST_VARDIR/tmp/SQL_LOAD_MB-1-2' INTO table t1
+/*!*/;
 SET TIMESTAMP=1000000000/*!*/;
-load data LOCAL INFILE 'MYSQLTEST_VARDIR/tmp/SQL_LOAD_MB-2-2' INTO table t1/*!*/;
+load data LOCAL INFILE 'MYSQLTEST_VARDIR/tmp/SQL_LOAD_MB-2-2' INTO table t1
+/*!*/;
 SET TIMESTAMP=1000000000/*!*/;
-load data LOCAL INFILE 'MYSQLTEST_VARDIR/tmp/SQL_LOAD_MB-3-2' INTO table t1/*!*/;
+load data LOCAL INFILE 'MYSQLTEST_VARDIR/tmp/SQL_LOAD_MB-3-2' INTO table t1
+/*!*/;
 SET TIMESTAMP=1000000000/*!*/;
-load data LOCAL INFILE 'MYSQLTEST_VARDIR/tmp/SQL_LOAD_MB-4-2' INTO table t1/*!*/;
+load data LOCAL INFILE 'MYSQLTEST_VARDIR/tmp/SQL_LOAD_MB-4-2' INTO table t1
+/*!*/;
 DELIMITER ;
 # End of log file
 ROLLBACK /* added by mysqlbinlog */;
@@ -133,7 +153,8 @@ SET @@session.foreign_key_checks=1, @@se
 SET @@session.sql_mode=0/*!*/;
 /*!\C latin1 *//*!*/;
 SET
@@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8/*!*/;
-insert into t1 values ("Alas")/*!*/;
+insert into t1 values ("Alas")
+/*!*/;
 DELIMITER ;
 # End of log file
 ROLLBACK /* added by mysqlbinlog */;
@@ -160,7 +181,8 @@ SET @@session.foreign_key_checks=1, @@se
 SET @@session.sql_mode=0/*!*/;
 /*!\C latin1 *//*!*/;
 SET
@@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8/*!*/;
-insert into t1 values ("Alas")/*!*/;
+insert into t1 values ("Alas")
+/*!*/;
 DELIMITER ;
 # End of log file
 ROLLBACK /* added by mysqlbinlog */;
@@ -173,9 +195,11 @@ DELIMITER /*!*/;
 ROLLBACK/*!*/;
 use test/*!*/;
 SET TIMESTAMP=1108844556/*!*/;
-BEGIN/*!*/;
+BEGIN
+/*!*/;
 SET TIMESTAMP=1108844555/*!*/;
-insert t1 values (1)/*!*/;
+insert t1 values (1)
+/*!*/;
 DELIMITER ;
 # End of log file
 ROLLBACK /* added by mysqlbinlog */;
@@ -185,9 +209,11 @@ ROLLBACK /* added by mysqlbinlog */;
 DELIMITER /*!*/;
 use test/*!*/;
 SET TIMESTAMP=1108844556/*!*/;
-BEGIN/*!*/;
+BEGIN
+/*!*/;
 SET TIMESTAMP=1108844555/*!*/;
-insert t1 values (1)/*!*/;
+insert t1 values (1)
+/*!*/;
 DELIMITER ;
 # End of log file
 ROLLBACK /* added by mysqlbinlog */;
@@ -245,7 +271,8 @@ SET @@session.character_set_client=8,@@s
 CREATE DEFINER=`root`@`localhost` procedure p1()
 begin
 select 1;
-end/*!*/;
+end
+/*!*/;
 DELIMITER ;
 # End of log file
 ROLLBACK /* added by mysqlbinlog */;
@@ -287,27 +314,36 @@ SET @@session.foreign_key_checks=1, @@se
 SET @@session.sql_mode=0/*!*/;
 /*!\C latin1 *//*!*/;
 SET
@@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8/*!*/;
-create table t1 (a varchar(64) character set utf8)/*!*/;
+create table t1 (a varchar(64) character set utf8)
+/*!*/;
 SET TIMESTAMP=1000000000/*!*/;
-load data LOCAL INFILE 'MYSQLTEST_VARDIR/tmp/SQL_LOAD_MB-6-0' INTO table t1/*!*/;
+load data LOCAL INFILE 'MYSQLTEST_VARDIR/tmp/SQL_LOAD_MB-6-0' INTO table t1
+/*!*/;
 SET TIMESTAMP=1000000000/*!*/;
 SET @@session.collation_database=7/*!*/;
-load data LOCAL INFILE 'MYSQLTEST_VARDIR/tmp/SQL_LOAD_MB-7-0' INTO table t1/*!*/;
+load data LOCAL INFILE 'MYSQLTEST_VARDIR/tmp/SQL_LOAD_MB-7-0' INTO table t1
+/*!*/;
 SET TIMESTAMP=1000000000/*!*/;
 SET @@session.collation_database=DEFAULT/*!*/;
-load data LOCAL INFILE 'MYSQLTEST_VARDIR/tmp/SQL_LOAD_MB-8-0' INTO table t1/*!*/;
+load data LOCAL INFILE 'MYSQLTEST_VARDIR/tmp/SQL_LOAD_MB-8-0' INTO table t1
+/*!*/;
 SET TIMESTAMP=1000000000/*!*/;
-load data LOCAL INFILE 'MYSQLTEST_VARDIR/tmp/SQL_LOAD_MB-9-0' INTO table t1/*!*/;
+load data LOCAL INFILE 'MYSQLTEST_VARDIR/tmp/SQL_LOAD_MB-9-0' INTO table t1
+/*!*/;
 SET TIMESTAMP=1000000000/*!*/;
 SET @@session.collation_database=7/*!*/;
-load data LOCAL INFILE 'MYSQLTEST_VARDIR/tmp/SQL_LOAD_MB-a-0' INTO table t1/*!*/;
+load data LOCAL INFILE 'MYSQLTEST_VARDIR/tmp/SQL_LOAD_MB-a-0' INTO table t1
+/*!*/;
 SET TIMESTAMP=1000000000/*!*/;
 SET @@session.collation_database=DEFAULT/*!*/;
-load data LOCAL INFILE 'MYSQLTEST_VARDIR/tmp/SQL_LOAD_MB-b-0' INTO table t1/*!*/;
+load data LOCAL INFILE 'MYSQLTEST_VARDIR/tmp/SQL_LOAD_MB-b-0' INTO table t1
+/*!*/;
 SET TIMESTAMP=1000000000/*!*/;
-load data LOCAL INFILE 'MYSQLTEST_VARDIR/tmp/SQL_LOAD_MB-c-0' INTO table t1 character set
koi8r/*!*/;
+load data LOCAL INFILE 'MYSQLTEST_VARDIR/tmp/SQL_LOAD_MB-c-0' INTO table t1 character set
koi8r
+/*!*/;
 SET TIMESTAMP=1000000000/*!*/;
-drop table t1/*!*/;
+drop table t1
+/*!*/;
 DELIMITER ;
 # End of log file
 ROLLBACK /* added by mysqlbinlog */;
diff -Nrup a/mysql-test/r/rpl_charset.result b/mysql-test/r/rpl_charset.result
--- a/mysql-test/r/rpl_charset.result	2006-11-28 20:26:08 +08:00
+++ b/mysql-test/r/rpl_charset.result	2007-12-15 19:50:21 +08:00
@@ -183,78 +183,101 @@ SET @@session.foreign_key_checks=1, @@se
 SET @@session.sql_mode=0/*!*/;
 /*!\C latin1 *//*!*/;
 SET
@@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8/*!*/;
-drop database if exists mysqltest2/*!*/;
+drop database if exists mysqltest2
+/*!*/;
 SET TIMESTAMP=1000000000/*!*/;
-drop database if exists mysqltest3/*!*/;
+drop database if exists mysqltest3
+/*!*/;
 SET TIMESTAMP=1000000000/*!*/;
-create database mysqltest2 character set latin2/*!*/;
+create database mysqltest2 character set latin2
+/*!*/;
 SET TIMESTAMP=1000000000/*!*/;
 /*!\C latin1 *//*!*/;
 SET
@@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=30/*!*/;
-create database mysqltest3/*!*/;
+create database mysqltest3
+/*!*/;
 SET TIMESTAMP=1000000000/*!*/;
 /*!\C latin1 *//*!*/;
 SET
@@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=64/*!*/;
-drop database mysqltest3/*!*/;
+drop database mysqltest3
+/*!*/;
 SET TIMESTAMP=1000000000/*!*/;
-create database mysqltest3/*!*/;
+create database mysqltest3
+/*!*/;
 use mysqltest2/*!*/;
 SET TIMESTAMP=1000000000/*!*/;
-create table t1 (a int auto_increment primary key, b varchar(100))/*!*/;
+create table t1 (a int auto_increment primary key, b varchar(100))
+/*!*/;
 SET INSERT_ID=1/*!*/;
 SET TIMESTAMP=1000000000/*!*/;
 /*!\C cp850 *//*!*/;
 SET
@@session.character_set_client=4,@@session.collation_connection=27,@@session.collation_server=64/*!*/;
-insert into t1 (b) values(@@character_set_server)/*!*/;
+insert into t1 (b) values(@@character_set_server)
+/*!*/;
 SET INSERT_ID=2/*!*/;
 SET TIMESTAMP=1000000000/*!*/;
-insert into t1 (b) values(@@collation_server)/*!*/;
+insert into t1 (b) values(@@collation_server)
+/*!*/;
 SET INSERT_ID=3/*!*/;
 SET TIMESTAMP=1000000000/*!*/;
-insert into t1 (b) values(@@character_set_client)/*!*/;
+insert into t1 (b) values(@@character_set_client)
+/*!*/;
 SET INSERT_ID=4/*!*/;
 SET TIMESTAMP=1000000000/*!*/;
-insert into t1 (b) values(@@character_set_connection)/*!*/;
+insert into t1 (b) values(@@character_set_connection)
+/*!*/;
 SET INSERT_ID=5/*!*/;
 SET TIMESTAMP=1000000000/*!*/;
-insert into t1 (b) values(@@collation_connection)/*!*/;
+insert into t1 (b) values(@@collation_connection)
+/*!*/;
 SET TIMESTAMP=1000000000/*!*/;
 /*!\C latin1 *//*!*/;
 SET
@@session.character_set_client=8,@@session.collation_connection=5,@@session.collation_server=64/*!*/;
-truncate table t1/*!*/;
+truncate table t1
+/*!*/;
 SET INSERT_ID=1/*!*/;
 SET TIMESTAMP=1000000000/*!*/;
-insert into t1 (b) values(@@collation_connection)/*!*/;
+insert into t1 (b) values(@@collation_connection)
+/*!*/;
 SET INSERT_ID=2/*!*/;
 SET TIMESTAMP=1000000000/*!*/;
-insert into t1 (b) values(LEAST("Müller","Muffler"))/*!*/;
+insert into t1 (b) values(LEAST("Müller","Muffler"))
+/*!*/;
 SET INSERT_ID=3/*!*/;
 SET TIMESTAMP=1000000000/*!*/;
 /*!\C latin1 *//*!*/;
 SET
@@session.character_set_client=8,@@session.collation_connection=31,@@session.collation_server=64/*!*/;
-insert into t1 (b) values(@@collation_connection)/*!*/;
+insert into t1 (b) values(@@collation_connection)
+/*!*/;
 SET INSERT_ID=4/*!*/;
 SET TIMESTAMP=1000000000/*!*/;
-insert into t1 (b) values(LEAST("Müller","Muffler"))/*!*/;
+insert into t1 (b) values(LEAST("Müller","Muffler"))
+/*!*/;
 SET TIMESTAMP=1000000000/*!*/;
-truncate table t1/*!*/;
+truncate table t1
+/*!*/;
 SET INSERT_ID=1/*!*/;
 SET @`a`:=_cp850 0x4DFC6C6C6572 COLLATE `cp850_general_ci`/*!*/;
 SET TIMESTAMP=1000000000/*!*/;
-insert into t1 (b) values(collation(@a))/*!*/;
+insert into t1 (b) values(collation(@a))
+/*!*/;
 SET TIMESTAMP=1000000000/*!*/;
-drop database mysqltest2/*!*/;
+drop database mysqltest2
+/*!*/;
 SET TIMESTAMP=1000000000/*!*/;
-drop database mysqltest3/*!*/;
+drop database mysqltest3
+/*!*/;
 use test/*!*/;
 SET TIMESTAMP=1000000000/*!*/;
 /*!\C latin1 *//*!*/;
 SET
@@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=30/*!*/;
-CREATE TABLE t1 (c1 VARBINARY(255), c2 VARBINARY(255))/*!*/;
+CREATE TABLE t1 (c1 VARBINARY(255), c2 VARBINARY(255))
+/*!*/;
 SET TIMESTAMP=1000000000/*!*/;
 /*!\C koi8r *//*!*/;
 SET
@@session.character_set_client=7,@@session.collation_connection=51,@@session.collation_server=30/*!*/;
-INSERT INTO t1 (c1, c2) VALUES ('îÕ, ÚÁ ÒÙÂÁÌËÕ','îÕ, ÚÁ ÒÙÂÁÌËÕ')/*!*/;
+INSERT INTO t1 (c1, c2) VALUES ('îÕ, ÚÁ ÒÙÂÁÌËÕ','îÕ, ÚÁ ÒÙÂÁÌËÕ')
+/*!*/;
 DELIMITER ;
 # End of log file
 ROLLBACK /* added by mysqlbinlog */;
diff -Nrup a/mysql-test/r/rpl_timezone.result b/mysql-test/r/rpl_timezone.result
--- a/mysql-test/r/rpl_timezone.result	2007-08-06 19:57:26 +08:00
+++ b/mysql-test/r/rpl_timezone.result	2007-12-15 19:50:21 +08:00
@@ -52,20 +52,26 @@ SET @@session.foreign_key_checks=1, @@se
 SET @@session.sql_mode=0/*!*/;
 /*!\C latin1 *//*!*/;
 SET
@@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8/*!*/;
-create table t1 (t timestamp)/*!*/;
+create table t1 (t timestamp)
+/*!*/;
 SET TIMESTAMP=100000000/*!*/;
-create table t2 (t char(32))/*!*/;
+create table t2 (t char(32))
+/*!*/;
 SET TIMESTAMP=100000000/*!*/;
 SET @@session.time_zone='Europe/Moscow'/*!*/;
-insert into t1 values ('20050101000000'), ('20050611093902')/*!*/;
+insert into t1 values ('20050101000000'), ('20050611093902')
+/*!*/;
 SET TIMESTAMP=100000000/*!*/;
 SET @@session.time_zone='UTC'/*!*/;
-insert into t1 values ('20040101000000'), ('20040611093902')/*!*/;
+insert into t1 values ('20040101000000'), ('20040611093902')
+/*!*/;
 SET TIMESTAMP=100000000/*!*/;
-delete from t1/*!*/;
+delete from t1
+/*!*/;
 SET TIMESTAMP=100000000/*!*/;
 SET @@session.time_zone='Europe/Moscow'/*!*/;
-insert into t1 values ('20040101000000'), ('20040611093902')/*!*/;
+insert into t1 values ('20040101000000'), ('20040611093902')
+/*!*/;
 DELIMITER ;
 # End of log file
 ROLLBACK /* added by mysqlbinlog */;
diff -Nrup a/mysql-test/r/user_var-binlog.result b/mysql-test/r/user_var-binlog.result
--- a/mysql-test/r/user_var-binlog.result	2006-11-28 20:26:08 +08:00
+++ b/mysql-test/r/user_var-binlog.result	2007-12-15 19:50:21 +08:00
@@ -24,11 +24,13 @@ SET @@session.foreign_key_checks=1, @@se
 SET @@session.sql_mode=0/*!*/;
 /*!\C latin1 *//*!*/;
 SET
@@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8/*!*/;
-INSERT INTO t1 VALUES(@`a b`)/*!*/;
+INSERT INTO t1 VALUES(@`a b`)
+/*!*/;
 SET @`var1`:=_latin1 0x273B616161 COLLATE `latin1_swedish_ci`/*!*/;
 SET @`var2`:=_binary 0x61 COLLATE `binary`/*!*/;
 SET TIMESTAMP=10000/*!*/;
-insert into t1 values (@var1),(@var2)/*!*/;
+insert into t1 values (@var1),(@var2)
+/*!*/;
 DELIMITER ;
 # End of log file
 ROLLBACK /* added by mysqlbinlog */;
diff -Nrup a/mysql-test/t/binlog_start_comment.test
b/mysql-test/t/binlog_start_comment.test
--- /dev/null	Wed Dec 31 16:00:00 196900
+++ b/mysql-test/t/binlog_start_comment.test	2007-12-15 19:50:21 +08:00
@@ -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;
diff -Nrup a/mysql-test/t/mix_innodb_myisam_binlog.test
b/mysql-test/t/mix_innodb_myisam_binlog.test
--- a/mysql-test/t/mix_innodb_myisam_binlog.test	2007-10-13 20:49:38 +08:00
+++ b/mysql-test/t/mix_innodb_myisam_binlog.test	2007-12-15 19:50:21 +08:00
@@ -262,7 +262,7 @@ eval select
 is not null;
 --replace_result $MYSQL_TEST_DIR MYSQL_TEST_DIR
 eval select
-@a like "%#%error_code=0%ROLLBACK/*!*/;%ROLLBACK /* added by mysqlbinlog */;%",
+@a like "%#%error_code=0%ROLLBACK\\n/*!*/;%ROLLBACK /* added by mysqlbinlog */;%",
 @a not like "%#%error_code=%error_code=%";
 drop table t1, t2;
 
diff -Nrup a/sql/log_event.cc b/sql/log_event.cc
--- a/sql/log_event.cc	2007-11-13 16:43:25 +08:00
+++ b/sql/log_event.cc	2007-12-15 19:50:21 +08:00
@@ -1862,7 +1862,7 @@ void Query_log_event::print(FILE* file, 
 {
   print_query_header(file, print_event_info);
   my_fwrite(file, (byte*) query, q_len, MYF(MY_NABP | MY_WME));
-  fprintf(file, "%s\n", print_event_info->delimiter);
+  fprintf(file, "\n%s\n", print_event_info->delimiter);
 }
 #endif /* MYSQL_CLIENT */
 
@@ -5180,12 +5180,12 @@ void Execute_load_query_log_event::print
     fprintf(file, " INTO");
     my_fwrite(file, (byte*) query + fn_pos_end, q_len-fn_pos_end,
         MYF(MY_NABP | MY_WME));
-    fprintf(file, "%s\n", print_event_info->delimiter);
+    fprintf(file, "\n%s\n", print_event_info->delimiter);
   }
   else
   {
     my_fwrite(file, (byte*) query, q_len, MYF(MY_NABP | MY_WME));
-    fprintf(file, "%s\n", print_event_info->delimiter);
+    fprintf(file, "\n%s\n", print_event_info->delimiter);
   }
 
   if (!print_event_info->short_form)
Thread
bk commit into 5.0 tree (hezx:1.2559) BUG#32205hezx15 Dec