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-13 17:38:55+08:00, hezx@hezx.(none) +4 -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.
Output the delimeter on a newline after a query string
mysql-test/r/rpl_charset.result@stripped, 2007-12-13 17:38:39+08:00, hezx@hezx.(none) +46
-23
Update test result for BUG#32205
mysql-test/r/rpl_start_comment.result@stripped, 2007-12-13 17:38:39+08:00, hezx@hezx.(none)
+15 -0
Add test file for BUG#32205
mysql-test/r/rpl_start_comment.result@stripped, 2007-12-13 17:38:39+08:00, hezx@hezx.(none)
+0 -0
mysql-test/r/rpl_timezone.result@stripped, 2007-12-13 17:38:39+08:00, hezx@hezx.(none) +12
-6
Update test result for BUG#32205
sql/log_event.cc@stripped, 2007-12-13 17:38:39+08:00, hezx@hezx.(none) +1 -1
Output the delimeter on a newline after a query string
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-13 17:38:39 +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_start_comment.result b/mysql-test/r/rpl_start_comment.result
--- /dev/null Wed Dec 31 16:00:00 196900
+++ b/mysql-test/r/rpl_start_comment.result 2007-12-13 17:38:39 +08:00
@@ -0,0 +1,15 @@
+stop slave;
+drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
+reset master;
+reset slave;
+drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
+start slave;
+drop table if exists t1;
+create table t1 (a int) -- create table t1;
+insert into t1 values (1);
+flush logs;
+select * from t1;
+a
+1
+select * from t1;
+a
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-13 17:38:39 +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/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-13 17:38:39 +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 */
| Thread |
|---|
| • bk commit into 5.0 tree (hezx:1.2558) BUG#32205 | hezx | 13 Dec |