From cdeabcfd436c65e0a97e74b1722d0259ba907541 Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 24 Aug 2012 10:06:16 +0200 Subject: MDEV-382: Incorrect quoting Various places in the server replication code was incorrectly quoting strings, which could lead to incorrect SQL on the slave/mysqlbinlog. --- mysql-test/r/mysqlbinlog.result | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) (limited to 'mysql-test/r/mysqlbinlog.result') diff --git a/mysql-test/r/mysqlbinlog.result b/mysql-test/r/mysqlbinlog.result index 45068ddfaec..540ecd99479 100644 --- a/mysql-test/r/mysqlbinlog.result +++ b/mysql-test/r/mysqlbinlog.result @@ -18,7 +18,7 @@ flush logs; /*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/; DELIMITER /*!*/; ROLLBACK/*!*/; -use test/*!*/; +use `test`/*!*/; SET TIMESTAMP=1000000000/*!*/; SET @@session.pseudo_thread_id=999999999/*!*/; SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1, @@session.autocommit=1/*!*/; @@ -64,7 +64,7 @@ ROLLBACK /* added by mysqlbinlog */; /*!40019 SET @@session.max_insert_delayed_threads=0*/; /*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/; DELIMITER /*!*/; -use test/*!*/; +use `test`/*!*/; SET TIMESTAMP=1000000000/*!*/; SET @@session.pseudo_thread_id=999999999/*!*/; SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1, @@session.autocommit=1/*!*/; @@ -97,7 +97,7 @@ Warning: The option '--position' is deprecated and will be removed in a future r /*!40019 SET @@session.max_insert_delayed_threads=0*/; /*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/; DELIMITER /*!*/; -use test/*!*/; +use `test`/*!*/; SET TIMESTAMP=1000000000/*!*/; SET @@session.pseudo_thread_id=999999999/*!*/; SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1, @@session.autocommit=1/*!*/; @@ -119,7 +119,7 @@ ROLLBACK /* added by mysqlbinlog */; /*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/; DELIMITER /*!*/; ROLLBACK/*!*/; -use test/*!*/; +use `test`/*!*/; SET TIMESTAMP=1000000000/*!*/; SET @@session.pseudo_thread_id=999999999/*!*/; SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1, @@session.autocommit=1/*!*/; @@ -165,7 +165,7 @@ ROLLBACK /* added by mysqlbinlog */; /*!40019 SET @@session.max_insert_delayed_threads=0*/; /*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/; DELIMITER /*!*/; -use test/*!*/; +use `test`/*!*/; SET TIMESTAMP=1000000000/*!*/; SET @@session.pseudo_thread_id=999999999/*!*/; SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1, @@session.autocommit=1/*!*/; @@ -198,7 +198,7 @@ Warning: The option '--position' is deprecated and will be removed in a future r /*!40019 SET @@session.max_insert_delayed_threads=0*/; /*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/; DELIMITER /*!*/; -use test/*!*/; +use `test`/*!*/; SET TIMESTAMP=1000000000/*!*/; SET @@session.pseudo_thread_id=999999999/*!*/; SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1, @@session.autocommit=1/*!*/; @@ -220,7 +220,7 @@ ROLLBACK /* added by mysqlbinlog */; /*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/; DELIMITER /*!*/; ROLLBACK/*!*/; -use test/*!*/; +use `test`/*!*/; SET TIMESTAMP=1108844556/*!*/; SET @@session.pseudo_thread_id=999999999/*!*/; SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/; @@ -239,7 +239,7 @@ Warning: The option '--position' is deprecated and will be removed in a future r /*!40019 SET @@session.max_insert_delayed_threads=0*/; /*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/; DELIMITER /*!*/; -use test/*!*/; +use `test`/*!*/; SET TIMESTAMP=1108844556/*!*/; SET @@session.pseudo_thread_id=999999999/*!*/; SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/; @@ -299,7 +299,7 @@ ERROR 42000: PROCEDURE test.p1 does not exist /*!40019 SET @@session.max_insert_delayed_threads=0*/; /*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/; DELIMITER /*!*/; -use test/*!*/; +use `test`/*!*/; SET TIMESTAMP=1000000000/*!*/; SET @@session.pseudo_thread_id=999999999/*!*/; SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1, @@session.autocommit=1/*!*/; @@ -349,7 +349,7 @@ flush logs; /*!40019 SET @@session.max_insert_delayed_threads=0*/; /*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/; DELIMITER /*!*/; -use test/*!*/; +use `test`/*!*/; SET TIMESTAMP=1000000000/*!*/; SET @@session.pseudo_thread_id=999999999/*!*/; SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1, @@session.autocommit=1/*!*/; @@ -484,7 +484,7 @@ FLUSH LOGS; /*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/; DELIMITER /*!*/; ROLLBACK/*!*/; -use test/*!*/; +use `test`/*!*/; SET TIMESTAMP=1253783037/*!*/; SET @@session.pseudo_thread_id=999999999/*!*/; SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1, @@session.autocommit=1/*!*/; @@ -581,22 +581,22 @@ SET @@session.lc_time_names=0/*!*/; SET @@session.collation_database=DEFAULT/*!*/; BEGIN /*!*/; -use test/*!*/; +use `test`/*!*/; SET TIMESTAMP=1266652094/*!*/; SavePoint mixed_cases /*!*/; -use db1/*!*/; +use `db1`/*!*/; SET TIMESTAMP=1266652094/*!*/; INSERT INTO db1.t2 VALUES("in savepoint mixed_cases") /*!*/; SET TIMESTAMP=1266652094/*!*/; INSERT INTO db1.t1 VALUES(40) /*!*/; -use test/*!*/; +use `test`/*!*/; SET TIMESTAMP=1266652094/*!*/; ROLLBACK TO mixed_cases /*!*/; -use db1/*!*/; +use `db1`/*!*/; SET TIMESTAMP=1266652094/*!*/; INSERT INTO db1.t2 VALUES("after rollback to") /*!*/; @@ -624,7 +624,7 @@ SET @@session.lc_time_names=0/*!*/; SET @@session.collation_database=DEFAULT/*!*/; BEGIN /*!*/; -use test/*!*/; +use `test`/*!*/; SET TIMESTAMP=1266652094/*!*/; SavePoint mixed_cases /*!*/; -- cgit v1.2.1 From 288eeb3a31e4bfb52180f3906a4d354ac9cc457e Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 13 Sep 2012 14:31:29 +0200 Subject: MDEV-232: Remove one fsync() from commit phase. Introduce a new storage engine API method commit_checkpoint_request(). This is used to replace the fsync() at the end of every storage engine commit with a single fsync() when a binlog is rotated. Binlog rotation is now done during group commit instead of being delayed until unlog(), removing some server stall and avoiding an expensive lock/unlock of LOCK_log inside unlog(). --- mysql-test/r/mysqlbinlog.result | 1 + 1 file changed, 1 insertion(+) (limited to 'mysql-test/r/mysqlbinlog.result') diff --git a/mysql-test/r/mysqlbinlog.result b/mysql-test/r/mysqlbinlog.result index 33904dfd9bd..255b0679244 100644 --- a/mysql-test/r/mysqlbinlog.result +++ b/mysql-test/r/mysqlbinlog.result @@ -892,6 +892,7 @@ DROP DATABASE test1; FLUSH LOGS; show binlog events in 'master-bin.000002' from ; Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000002 # Binlog_checkpoint # # master-bin.000002 master-bin.000002 # Query # # CREATE DATABASE test1 master-bin.000002 # Query # # use `test1`; CREATE TABLE t1(id int) master-bin.000002 # Query # # DROP DATABASE test1 -- cgit v1.2.1