List:Commits« Previous MessageNext Message »
From:He Zhenxing Date:March 2 2009 1:25am
Subject:bzr commit into mysql-5.0-bugteam branch (zhenxing.he:2731) Bug#37145
View as plain text  
#At file:///media/sdb2/hezx/work/mysql/bzrwork/b37145/5.0/

 2731 He Zhenxing	2009-03-02
      BUG#37145 Killing a statement doing DDL may log binlog event with error code 1053
      
      When the thread executing a DDL was killed after finished its
      execution but before writing the binlog event, the error code in
      the binlog event could be set wrongly to ER_SERVER_SHUTDOWN or
      ER_QUERY_INTERRUPTED.
      
      This patch fixed the problem by ignoring the kill status when
      constructing the event for DDL statements.
      
      This patch also included the following changes in order to
      provide the test case.
      
       1) modified mysqltest to support variable for connection command
      
       2) modified mysql-test-run.pl, add new variable MYSQL_SLAVE to
          run mysql client against the slave mysqld.
added:
  mysql-test/include/diff_master_slave.inc
  mysql-test/include/kill_query.inc
  mysql-test/include/kill_query_and_diff_master_slave.inc
  mysql-test/r/rpl_killed_ddl.result
  mysql-test/t/rpl_killed_ddl.test
modified:
  client/mysqltest.c
  mysql-test/mysql-test-run.pl
  sql/log.cc
  sql/log_event.cc
  sql/log_event.h
  sql/sp.cc
  sql/sp_head.cc
  sql/sql_acl.cc
  sql/sql_base.cc
  sql/sql_db.cc
  sql/sql_delete.cc
  sql/sql_insert.cc
  sql/sql_parse.cc
  sql/sql_rename.cc
  sql/sql_table.cc
  sql/sql_trigger.cc
  sql/sql_update.cc
  sql/sql_view.cc

=== modified file 'client/mysqltest.c'
--- a/client/mysqltest.c	2009-01-09 18:30:55 +0000
+++ b/client/mysqltest.c	2009-03-02 01:24:09 +0000
@@ -4086,13 +4086,20 @@ int select_connection(struct st_command 
 
   if (!*p)
     die("Missing connection name in connect");
-  name= p;
-  while (*p && !my_isspace(charset_info,*p))
-    p++;
-  if (*p)
-    *p++= 0;
-  command->last_argument= p;
-  return select_connection_name(name);
+
+  static DYNAMIC_STRING ds_connection;
+  const struct command_arg connection_args[] = {
+    { "connection_name", ARG_STRING, TRUE, &ds_connection, "Name of the connection that we switch to." }
+  };
+  check_command_args(command, command->first_argument, connection_args,
+                     sizeof(connection_args)/sizeof(struct command_arg),
+                     ',');
+
+  DBUG_PRINT("info", ("changing connection: %s", ds_connection.str));
+
+  int ret= select_connection_name(ds_connection.str);
+  dynstr_free(&ds_connection);
+  return ret;
 }
 
 

=== added file 'mysql-test/include/diff_master_slave.inc'
--- a/mysql-test/include/diff_master_slave.inc	1970-01-01 00:00:00 +0000
+++ b/mysql-test/include/diff_master_slave.inc	2009-03-02 01:24:09 +0000
@@ -0,0 +1,33 @@
+# ==== Purpose ====
+#
+# Diff the output of a statement on master and slave
+#
+# ==== Usage =====
+#
+# let $diff_statement= select * from t1 where a < 100;
+# source include/diff_master_slave.inc;
+
+--echo source include/diff_master_slave.inc;
+disable_query_log;
+disable_result_log;
+
+connection master;
+if ($use_debug_lock)
+{
+  SELECT RELEASE_LOCK("debug_lock.before_query_log_event");
+}
+
+exec $MYSQL test -e "$diff_statement" > $MYSQLTEST_VARDIR/tmp/diff_master.out;
+sync_slave_with_master;
+exec $MYSQL_SLAVE test -e "$diff_statement" > $MYSQLTEST_VARDIR/tmp/diff_slave.out;
+
+diff_files $MYSQLTEST_VARDIR/tmp/diff_master.out $MYSQLTEST_VARDIR/tmp/diff_slave.out;
+
+connection master;
+if ($use_debug_lock)
+{
+  SELECT GET_LOCK("debug_lock.before_query_log_event", 10);
+}
+
+enable_result_log;
+enable_query_log;

=== added file 'mysql-test/include/kill_query.inc'
--- a/mysql-test/include/kill_query.inc	1970-01-01 00:00:00 +0000
+++ b/mysql-test/include/kill_query.inc	2009-03-02 01:24:09 +0000
@@ -0,0 +1,69 @@
+# ==== Purpose ====
+#
+# Kill a query in the master connection, and then try to reap the
+# result of the killed query.
+#
+# ==== Usage ====
+# 
+# The following variables should be set before sourcing this file.
+#
+# $use_debug_lock: if set, will lock/release
+#                  debug_lock.before_query_log_event accordingly, and
+#                  before sourcing this, connection 'master' should
+#                  get user lock 'debug_lock.before_query_log_event',
+#                  and run a query in another thread, which will block
+#                  before creating statement event.
+#
+# $connection_name: name of the connection that is waiting for the
+#                   lock, this can not be 'master'
+#
+# $connection_id: id of the connection that is waiting for the lock
+#
+# Example:
+# let $use_debug_lock= 0;
+# connection master1;
+# let $connection_name= master1;
+# let $connection_id= `SELECT CONNECTION_ID()`;
+# send CREATE TABLE t1;
+# source kill_query.inc;
+#
+# let $use_debug_lock= 1;
+# connection master;
+# SELECT GET_LOCK("debug_lock.before_query_log_event", 10);
+# connection master1;
+# let $connection_name= master1;
+# let $connection_id= `SELECT CONNECTION_ID()`;
+# send CREATE TABLE t1;
+# source kill_query.inc;
+
+
+--echo source include/kill_query.inc;
+disable_query_log;
+disable_result_log;
+connection master;
+
+# kill the query that is waiting
+eval kill query $connection_id;
+
+if ($use_debug_lock)
+{
+  # release the lock to allow binlog continue
+  SELECT RELEASE_LOCK("debug_lock.before_query_log_event");
+}
+
+# reap the result of the waiting query
+connection $connection_name;
+error 0, 1317, 1307, 1306, 1334, 1305;
+reap;
+
+connection master;
+
+if ($use_debug_lock)
+{
+  # get lock again to make the next query wait
+  SELECT GET_LOCK("debug_lock.before_query_log_event", 10);
+}
+
+connection $connection_name;
+enable_query_log;
+enable_result_log;

=== added file 'mysql-test/include/kill_query_and_diff_master_slave.inc'
--- a/mysql-test/include/kill_query_and_diff_master_slave.inc	1970-01-01 00:00:00 +0000
+++ b/mysql-test/include/kill_query_and_diff_master_slave.inc	2009-03-02 01:24:09 +0000
@@ -0,0 +1,23 @@
+# ==== Purpose ====
+#
+# Kill a query, sync master with slave, and diff the output of a
+# statement on master and slave to check if statement are correctly
+# replicated.
+#
+# ==== Usage ====
+#
+# connection <CONNECTION>;
+# let $connection_name=<CONNECTION>
+# let $connection_id=`SELECT CONNECTION_ID()`;
+# send <SQL COMMAND>;
+# let $diff_statement=<SQL COMMAND>;
+# source include/kill_query_and_diff_master_slave.inc;
+#
+# Note: <CONNECTION> must not be 'master'.
+#
+# See also kill_query.inc and diff_master_slave.inc for more
+# information
+
+source include/kill_query.inc;
+source include/diff_master_slave.inc;
+connection $connection_name;

=== modified file 'mysql-test/mysql-test-run.pl'
--- a/mysql-test/mysql-test-run.pl	2009-01-05 16:04:14 +0000
+++ b/mysql-test/mysql-test-run.pl	2009-03-02 01:24:09 +0000
@@ -2063,7 +2063,7 @@ sub environment_setup () {
   $ENV{'MYSQL_BINLOG'}= $cmdline_mysqlbinlog;
 
   # ----------------------------------------------------
-  # Setup env so childs can execute mysql
+  # Setup env so childs can execute mysql against master
   # ----------------------------------------------------
   my $cmdline_mysql=
     mtr_native_path($exe_mysql) .
@@ -2075,6 +2075,18 @@ sub environment_setup () {
   $ENV{'MYSQL'}= $cmdline_mysql;
 
   # ----------------------------------------------------
+  # Setup env so childs can execute mysql against slave
+  # ----------------------------------------------------
+  my $cmdline_mysql_slave=
+    mtr_native_path($exe_mysql) .
+    " --no-defaults --host=localhost  --user=root --password= " .
+    "--port=$slave->[0]->{'port'} " .
+    "--socket=$slave->[0]->{'path_sock'} ".
+    "--character-sets-dir=$path_charsetsdir";
+
+  $ENV{'MYSQL_SLAVE'}= $cmdline_mysql_slave;
+
+  # ----------------------------------------------------
   # Setup env so childs can execute bug25714
   # ----------------------------------------------------
   $ENV{'MYSQL_BUG25714'}=  $exe_bug25714;

=== added file 'mysql-test/r/rpl_killed_ddl.result'
--- a/mysql-test/r/rpl_killed_ddl.result	1970-01-01 00:00:00 +0000
+++ b/mysql-test/r/rpl_killed_ddl.result	2009-03-02 01:24:09 +0000
@@ -0,0 +1,130 @@
+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 DATABASE IF EXISTS d1;
+DROP DATABASE IF EXISTS d2;
+DROP DATABASE IF EXISTS d3;
+DROP DATABASE IF EXISTS d4;
+DROP FUNCTION IF EXISTS f1;
+DROP FUNCTION IF EXISTS f2;
+DROP FUNCTION IF EXISTS f3;
+DROP FUNCTION IF EXISTS f4;
+DROP TABLE IF EXISTS t1;
+DROP TABLE IF EXISTS t2;
+DROP TABLE IF EXISTS t3;
+DROP TABLE IF EXISTS t4;
+DROP PROCEDURE IF EXISTS p1;
+DROP PROCEDURE IF EXISTS p2;
+DROP PROCEDURE IF EXISTS p3;
+DROP PROCEDURE IF EXISTS p4;
+DROP TRIGGER IF EXISTS tr1;
+DROP TRIGGER IF EXISTS tr2;
+DROP TRIGGER IF EXISTS tr3;
+DROP TRIGGER IF EXISTS tr4;
+CREATE DATABASE d1;
+CREATE FUNCTION f1 () RETURNS INT DETERMINISTIC
+RETURN 1;
+CREATE PROCEDURE p1 (OUT rows INT)
+BEGIN
+SELECT COUNT(*) INTO rows FROM t1;
+END;
+//
+CREATE TABLE t1 (a int);
+CREATE TABLE t3 (a int);
+CREATE TRIGGER tr1 BEFORE INSERT ON t1
+FOR EACH ROW BEGIN
+DELETE FROM t4 WHERE a=NEW.a;
+END;
+//
+CREATE INDEX i1 ON t1 (a);
+CREATE VIEW v1 AS SELECT a FROM t1 WHERE a < 100;
+[on master]
+[on master1]
+CREATE DATABASE d2;
+source include/kill_query.inc;
+source include/diff_master_slave.inc;
+ALTER DATABASE d1
+DEFAULT CHARACTER SET = 'utf8';
+source include/kill_query.inc;
+source include/diff_master_slave.inc;
+DROP DATABASE d1;
+source include/kill_query.inc;
+source include/diff_master_slave.inc;
+DROP DATABASE d2;
+source include/kill_query.inc;
+source include/diff_master_slave.inc;
+CREATE FUNCTION f2 () RETURNS INT DETERMINISTIC
+RETURN 1;
+source include/kill_query.inc;
+source include/diff_master_slave.inc;
+ALTER FUNCTION f1 SQL SECURITY INVOKER;
+source include/kill_query.inc;
+source include/diff_master_slave.inc;
+DROP FUNCTION IF EXISTS f1;
+source include/kill_query.inc;
+source include/diff_master_slave.inc;
+DROP FUNCTION IF EXISTS f2;
+source include/kill_query.inc;
+source include/diff_master_slave.inc;
+CREATE PROCEDURE p2 (OUT rows INT)
+BEGIN
+SELECT COUNT(*) INTO rows FROM t2;
+END;
+//
+source include/kill_query.inc;
+source include/diff_master_slave.inc;
+ALTER PROCEDURE p1 SQL SECURITY INVOKER COMMENT 'return rows of table t1';
+source include/kill_query.inc;
+source include/diff_master_slave.inc;
+DROP PROCEDURE IF EXISTS p1;
+source include/kill_query.inc;
+source include/diff_master_slave.inc;
+DROP PROCEDURE IF EXISTS p2;
+source include/kill_query.inc;
+source include/diff_master_slave.inc;
+CREATE TABLE t2 (b int);
+source include/kill_query.inc;
+source include/diff_master_slave.inc;
+ALTER TABLE t1 ADD (d int);
+source include/kill_query.inc;
+source include/diff_master_slave.inc;
+RENAME TABLE t3 TO t4;
+source include/kill_query.inc;
+source include/diff_master_slave.inc;
+CREATE INDEX i2 on t1 (a);
+source include/kill_query.inc;
+source include/diff_master_slave.inc;
+DROP INDEX i1 on t1;
+source include/kill_query.inc;
+source include/diff_master_slave.inc;
+CREATE TRIGGER tr2 BEFORE INSERT ON t4
+FOR EACH ROW BEGIN
+DELETE FROM t1 WHERE a=NEW.a;
+END;
+//
+source include/kill_query.inc;
+source include/diff_master_slave.inc;
+DROP TRIGGER tr1;
+source include/kill_query.inc;
+source include/diff_master_slave.inc;
+DROP TRIGGER IF EXISTS tr2;
+source include/kill_query.inc;
+source include/diff_master_slave.inc;
+CREATE VIEW v2 AS SELECT a FROM t1 WHERE a > 100;
+source include/kill_query.inc;
+source include/diff_master_slave.inc;
+DROP VIEW v1;
+source include/kill_query.inc;
+source include/diff_master_slave.inc;
+DROP VIEW IF EXISTS v2;
+source include/kill_query.inc;
+source include/diff_master_slave.inc;
+DROP TABLE t1;
+source include/kill_query.inc;
+source include/diff_master_slave.inc;
+DROP TABLE IF EXISTS t2;
+source include/kill_query.inc;
+source include/diff_master_slave.inc;

=== added file 'mysql-test/t/rpl_killed_ddl.test'
--- a/mysql-test/t/rpl_killed_ddl.test	1970-01-01 00:00:00 +0000
+++ b/mysql-test/t/rpl_killed_ddl.test	2009-03-02 01:24:09 +0000
@@ -0,0 +1,295 @@
+# ==== Purpose ====
+#
+# This test check if DDL statements are correctly binlogged when the
+# thread is killed
+#
+# ==== Method ====
+#
+# Start a DDL query and kill it, check if the error code of the binlog
+# event is correct.
+#
+# DDL statements tested:
+# CREATE/ALTER/RENAME/DROP DATABASE
+# CREATE/ALTER/DROP        EVENT
+# CREATE/ALTER/DROP        FUNCITON
+# CREATE/ALTER/DROP 	   PROCEDURE
+# CREATE/ALTER/DROP 	   SERVER
+# CREATE/ALTER/RENAME/DROP TABLE
+# CREATE/DROP       	   TRIGGER
+# CREATE/ALTER/DROP 	   VIEW
+#
+# ==== Bugs =====
+#
+
+source include/master-slave.inc;
+
+let $use_debug_lock= 0;
+
+######## INITIALIZATION ########
+
+disable_warnings;
+DROP DATABASE IF EXISTS d1;
+DROP DATABASE IF EXISTS d2;
+DROP DATABASE IF EXISTS d3;
+DROP DATABASE IF EXISTS d4;
+# DROP EVENT IF EXIST e1;
+# DROP EVENT IF EXIST e2;
+# DROP EVENT IF EXIST e3;
+# DROP EVENT IF EXIST e4;
+DROP FUNCTION IF EXISTS f1;
+DROP FUNCTION IF EXISTS f2;
+DROP FUNCTION IF EXISTS f3;
+DROP FUNCTION IF EXISTS f4;
+# DROP SERVER IF EXISTS s1;
+# DROP SERVER IF EXISTS s2;
+# DROP SERVER IF EXISTS s3;
+# DROP SERVER IF EXISTS s4;
+DROP TABLE IF EXISTS t1;
+DROP TABLE IF EXISTS t2;
+DROP TABLE IF EXISTS t3;
+DROP TABLE IF EXISTS t4;
+DROP PROCEDURE IF EXISTS p1;
+DROP PROCEDURE IF EXISTS p2;
+DROP PROCEDURE IF EXISTS p3;
+DROP PROCEDURE IF EXISTS p4;
+DROP TRIGGER IF EXISTS tr1;
+DROP TRIGGER IF EXISTS tr2;
+DROP TRIGGER IF EXISTS tr3;
+DROP TRIGGER IF EXISTS tr4;
+enable_warnings;
+
+CREATE DATABASE d1;
+
+# CREATE EVENT e1 ON SCHEDULE AT CURRENT_TIMESTAMP + INTERVAL 1 HOUR
+#     DO
+#        INSERT INTO t1 values (1);
+
+CREATE FUNCTION f1 () RETURNS INT DETERMINISTIC
+    RETURN 1;
+
+DELIMITER //;
+CREATE PROCEDURE p1 (OUT rows INT)
+    BEGIN
+        SELECT COUNT(*) INTO rows FROM t1;
+    END;
+    //
+DELIMITER ;//
+
+# CREATE SERVER s1 FOREIGN DATA WRAPPER mysql
+#     OPTIONS (USER 'jason', HOST '192.168.1.105', DATABASE 'db1');
+
+CREATE TABLE t1 (a int);
+CREATE TABLE t3 (a int);
+
+DELIMITER //;
+CREATE TRIGGER tr1 BEFORE INSERT ON t1
+    FOR EACH ROW BEGIN
+        DELETE FROM t4 WHERE a=NEW.a;
+    END;
+    //
+DELIMITER ;//
+
+CREATE INDEX i1 ON t1 (a);
+
+CREATE VIEW v1 AS SELECT a FROM t1 WHERE a < 100;
+
+sync_slave_with_master;
+
+connection master1;
+let $connection_name= master1;
+let $connection_id= `SELECT CONNECTION_ID()`;
+
+connection master;
+echo [on master];
+
+if ($use_debug_lock)
+{
+  disable_query_log;
+  disable_result_log;
+  # This will cause the execution of a statement waiting before creating
+  # the query log event
+  SELECT IS_FREE_LOCK("debug_lock.before_query_log_event");
+  SELECT GET_LOCK("debug_lock.before_query_log_event", 10);
+  SELECT IS_FREE_LOCK("debug_lock.before_query_log_event");
+  enable_query_log;
+  enable_result_log;
+}
+
+######## START TEST ########
+
+connection master1;
+echo [on master1];
+
+disable_warnings;
+
+######## DATABASE ########
+
+let $diff_statement= SHOW DATABASES LIKE 'd%';
+
+send CREATE DATABASE d2;
+source include/kill_query_and_diff_master_slave.inc;
+
+send ALTER DATABASE d1
+       DEFAULT CHARACTER SET = 'utf8';
+source include/kill_query_and_diff_master_slave.inc;
+
+# send RENAME DATABASE d1 TO db1;
+# source include/kill_query.inc;
+
+# send RENAME DATABASE d2 TO db2;
+# source include/kill_query.inc;
+
+send DROP DATABASE d1;
+source include/kill_query_and_diff_master_slave.inc;
+
+send DROP DATABASE d2;
+source include/kill_query_and_diff_master_slave.inc;
+
+######## EVENT ########
+
+# let $diff_statement= SHOW EVENTS LIKE 'e%';
+
+# send CREATE EVENT e2 ON SCHEDULE AT CURRENT_TIMESTAMP + INTERVAL 1 HOUR
+#      DO
+#        INSERT INTO t2 values (1);
+# source include/kill_query_and_diff_master_slave.inc;
+
+# send ALTER EVENT e1 ON SCHEDULE AT CURRENT_TIMESTAMP + INTERVAL 2 HOUR
+# source include/kill_query_and_diff_master_slave.inc;
+
+# send DROP EVENT e1;
+# source include/kill_query_and_diff_master_slave.inc;
+
+# send DROP EVENT e2;
+# source include/kill_query_and_diff_master_slave.inc;
+
+######## FUNCTION ########
+
+let $diff_statement= SHOW FUNCTION STATUS LIKE 'f%';
+
+send CREATE FUNCTION f2 () RETURNS INT DETERMINISTIC
+     RETURN 1;
+source include/kill_query_and_diff_master_slave.inc;
+
+send ALTER FUNCTION f1 SQL SECURITY INVOKER;
+source include/kill_query_and_diff_master_slave.inc;
+
+# function f1 probably does not exist because the ALTER query was
+# killed
+send DROP FUNCTION IF EXISTS f1;
+source include/kill_query_and_diff_master_slave.inc;
+
+# function f2 probably does not exist because the CREATE query was
+# killed
+send DROP FUNCTION IF EXISTS f2;
+source include/kill_query_and_diff_master_slave.inc;
+
+######## PROCEDURE ########
+
+let $diff_statement= SHOW PROCEDURE STATUS LIKE 'p%';
+
+DELIMITER //;
+send CREATE PROCEDURE p2 (OUT rows INT)
+     BEGIN
+       SELECT COUNT(*) INTO rows FROM t2;
+     END;
+     //
+DELIMITER ;//
+source include/kill_query_and_diff_master_slave.inc;
+
+send ALTER PROCEDURE p1 SQL SECURITY INVOKER COMMENT 'return rows of table t1';
+source include/kill_query_and_diff_master_slave.inc;
+
+send DROP PROCEDURE IF EXISTS p1;
+source include/kill_query_and_diff_master_slave.inc;
+
+send DROP PROCEDURE IF EXISTS p2;
+source include/kill_query_and_diff_master_slave.inc;
+
+######## SERVER ########
+
+# let $diff_statement= SHOW SERVERS LIKE 's%';
+
+# send DROP SERVER IF EXISTS s1, s1;
+# source include/kill_query_and_diff_master_slave.inc;
+
+# send CREATE SERVER s2 FOREIGN DATA WRAPPER mysql
+#        OPTIONS (USER 'jason', HOST '192.168.1.106', DATABASE 'db1');
+# source include/kill_query_and_diff_master_slave.inc;
+
+# send ALTER SERVER s1 OPTIONS (DATABASE db2);
+# source include/kill_query_and_diff_master_slave.inc;
+
+# send ALTER SERVER s2 OPTIONS (DATABASE db2);
+# source include/kill_query_and_diff_master_slave.inc;
+
+# send DROP SERVER s1;
+# source include/kill_query_and_diff_master_slave.inc;
+
+# send DROP SERVER s2;
+# source include/kill_query_and_diff_master_slave.inc;
+
+######## TABLE ########
+
+let $diff_statement= SHOW TABLES LIKE 't%';
+
+send CREATE TABLE t2 (b int);
+source include/kill_query_and_diff_master_slave.inc;
+
+send ALTER TABLE t1 ADD (d int);
+source include/kill_query_and_diff_master_slave.inc;
+
+send RENAME TABLE t3 TO t4;
+source include/kill_query_and_diff_master_slave.inc;
+
+######## INDEX ########
+
+let $diff_statement= SHOW INDEX FROM t1;
+
+send CREATE INDEX i2 on t1 (a);
+source include/kill_query_and_diff_master_slave.inc;
+
+send DROP INDEX i1 on t1;
+source include/kill_query_and_diff_master_slave.inc;
+
+######## TRIGGER ########
+
+let $diff_statement= SHOW TRIGGERS LIKE 'v%';
+
+DELIMITER //;
+send CREATE TRIGGER tr2 BEFORE INSERT ON t4
+       FOR EACH ROW BEGIN
+         DELETE FROM t1 WHERE a=NEW.a;
+       END;
+       //
+DELIMITER ;//
+source include/kill_query_and_diff_master_slave.inc;
+
+send DROP TRIGGER tr1;
+source include/kill_query_and_diff_master_slave.inc;
+
+send DROP TRIGGER IF EXISTS tr2;
+source include/kill_query_and_diff_master_slave.inc;
+
+######## VIEW ########
+
+let $diff_statement= SHOW TABLES LIKE 'v%';
+
+send CREATE VIEW v2 AS SELECT a FROM t1 WHERE a > 100;
+source include/kill_query_and_diff_master_slave.inc;
+
+send DROP VIEW v1;
+source include/kill_query_and_diff_master_slave.inc;
+
+send DROP VIEW IF EXISTS v2;
+source include/kill_query_and_diff_master_slave.inc;
+
+######## DROP TABLE ########
+
+let $diff_statement= SHOW TABLES LIKE 't%';
+
+send DROP TABLE t1;
+source include/kill_query_and_diff_master_slave.inc;
+
+send DROP TABLE IF EXISTS t2;
+source include/kill_query_and_diff_master_slave.inc;

=== modified file 'sql/log.cc'
--- a/sql/log.cc	2008-12-11 11:06:50 +0000
+++ b/sql/log.cc	2009-03-02 01:24:09 +0000
@@ -158,7 +158,8 @@ static int binlog_commit(THD *thd, bool 
   */
   if (all || !(thd->options & (OPTION_NOT_AUTOCOMMIT | OPTION_BEGIN)))
   {
-    Query_log_event qev(thd, STRING_WITH_LEN("COMMIT"), TRUE, FALSE);
+    Query_log_event qev(thd, STRING_WITH_LEN("COMMIT"),
+                        TRUE, FALSE, THD::KILLED_NO_VALUE);
     qev.error_code= 0; // see comment in MYSQL_LOG::write(THD, IO_CACHE)
     DBUG_RETURN(binlog_end_trans(thd, trans_log, &qev));
   }
@@ -202,7 +203,8 @@ static int binlog_rollback(THD *thd, boo
   */
   if (unlikely(thd->transaction.all.modified_non_trans_table))
   {
-    Query_log_event qev(thd, STRING_WITH_LEN("ROLLBACK"), TRUE, FALSE);
+    Query_log_event qev(thd, STRING_WITH_LEN("ROLLBACK"),
+                        TRUE, FALSE, THD::KILLED_NO_VALUE);
     qev.error_code= 0; // see comment in MYSQL_LOG::write(THD, IO_CACHE)
     error= binlog_end_trans(thd, trans_log, &qev);
   }
@@ -240,7 +242,8 @@ static int binlog_savepoint_set(THD *thd
 
   *(my_off_t *)sv= my_b_tell(trans_log);
   /* Write it to the binary log */
-  Query_log_event qinfo(thd, thd->query, thd->query_length, TRUE, FALSE);
+  Query_log_event qinfo(thd, thd->query, thd->query_length,
+                        TRUE, FALSE, THD::KILLED_NO_VALUE);
   DBUG_RETURN(mysql_bin_log.write(&qinfo));
 }
 
@@ -257,7 +260,8 @@ static int binlog_savepoint_rollback(THD
   */
   if (unlikely(thd->transaction.all.modified_non_trans_table))
   {
-    Query_log_event qinfo(thd, thd->query, thd->query_length, TRUE, FALSE);
+    Query_log_event qinfo(thd, thd->query, thd->query_length,
+                          TRUE, FALSE, THD::KILLED_NO_VALUE);
     DBUG_RETURN(mysql_bin_log.write(&qinfo));
   }
   reinit_io_cache(trans_log, WRITE_CACHE, *(my_off_t *)sv, 0, 0);
@@ -2089,7 +2093,8 @@ bool MYSQL_LOG::write(THD *thd, IO_CACHE
       transaction is either a BEGIN..COMMIT block or a single
       statement in autocommit mode.
     */
-    Query_log_event qinfo(thd, STRING_WITH_LEN("BEGIN"), TRUE, FALSE);
+    Query_log_event qinfo(thd, STRING_WITH_LEN("BEGIN"),
+                          TRUE, FALSE, THD::KILLED_NO_VALUE);
     /*
       Imagine this is rollback due to net timeout, after all
       statements of the transaction succeeded. Then we want a

=== modified file 'sql/log_event.cc'
--- a/sql/log_event.cc	2008-07-07 07:58:27 +0000
+++ b/sql/log_event.cc	2009-03-02 01:24:09 +0000
@@ -1352,6 +1352,8 @@ Query_log_event::Query_log_event(THD* th
 {
   time_t end_time;
 
+  DBUG_SYNC_POINT("debug_lock.before_query_log_event", 10);
+
   if (killed_status_arg == THD::KILLED_NO_VALUE)
     killed_status_arg= thd_arg->killed;
   error_code=

=== modified file 'sql/log_event.h'
--- a/sql/log_event.h	2007-10-29 13:20:59 +0000
+++ b/sql/log_event.h	2009-03-02 01:24:09 +0000
@@ -805,7 +805,7 @@ public:
 
   Query_log_event(THD* thd_arg, const char* query_arg, ulong query_length,
                   bool using_trans, bool suppress_use,
-                  THD::killed_state killed_err_arg= THD::KILLED_NO_VALUE);
+                  THD::killed_state killed_err_arg);
   const char* get_db() { return db; }
 #ifdef HAVE_REPLICATION
   void pack_info(Protocol* protocol);

=== modified file 'sql/sp.cc'
--- a/sql/sp.cc	2008-07-14 21:41:30 +0000
+++ b/sql/sp.cc	2009-03-02 01:24:09 +0000
@@ -646,7 +646,7 @@ db_create_routine(THD *thd, int type, sp
 
       /* Such a statement can always go directly to binlog, no trans cache */
       Query_log_event qinfo(thd, log_query.c_ptr(), log_query.length(), 0,
-                            FALSE);
+                            FALSE, THD::NOT_KILLED);
       mysql_bin_log.write(&qinfo);
     }
 
@@ -680,7 +680,8 @@ db_drop_routine(THD *thd, int type, sp_n
     if (mysql_bin_log.is_open())
     {
       thd->clear_error();
-      Query_log_event qinfo(thd, thd->query, thd->query_length, 0, FALSE);
+      Query_log_event qinfo(thd, thd->query, thd->query_length,
+                            0, FALSE, THD::NOT_KILLED);
       mysql_bin_log.write(&qinfo);
     }
   }
@@ -725,7 +726,8 @@ db_update_routine(THD *thd, int type, sp
     if (mysql_bin_log.is_open())
     {
       thd->clear_error();
-      Query_log_event qinfo(thd, thd->query, thd->query_length, 0, FALSE);
+      Query_log_event qinfo(thd, thd->query, thd->query_length,
+                            0, FALSE, THD::NOT_KILLED);
       mysql_bin_log.write(&qinfo);
     }
   }

=== modified file 'sql/sp_head.cc'
--- a/sql/sp_head.cc	2009-01-15 10:48:31 +0000
+++ b/sql/sp_head.cc	2009-03-02 01:24:09 +0000
@@ -1601,7 +1601,8 @@ sp_head::execute_function(THD *thd, Item
   if (need_binlog_call && thd->binlog_evt_union.unioned_events)
   {
     Query_log_event qinfo(thd, binlog_buf.ptr(), binlog_buf.length(),
-                          thd->binlog_evt_union.unioned_events_trans, FALSE);
+                          thd->binlog_evt_union.unioned_events_trans,
+                          FALSE, THD::KILLED_NO_VALUE);
     if (mysql_bin_log.write(&qinfo) &&
         thd->binlog_evt_union.unioned_events_trans)
     {

=== modified file 'sql/sql_acl.cc'
--- a/sql/sql_acl.cc	2008-12-24 14:45:47 +0000
+++ b/sql/sql_acl.cc	2009-03-02 01:24:09 +0000
@@ -1506,7 +1506,8 @@ bool change_password(THD *thd, const cha
                   acl_user->host.hostname ? acl_user->host.hostname : "",
                   new_password));
     thd->clear_error();
-    Query_log_event qinfo(thd, buff, query_length, 0, FALSE);
+    Query_log_event qinfo(thd, buff, query_length,
+                          0, FALSE, THD::NOT_KILLED);
     mysql_bin_log.write(&qinfo);
   }
 end:
@@ -3014,7 +3015,8 @@ int mysql_table_grant(THD *thd, TABLE_LI
     if (mysql_bin_log.is_open())
     {
       thd->clear_error();
-      Query_log_event qinfo(thd, thd->query, thd->query_length, 0, FALSE);
+      Query_log_event qinfo(thd, thd->query, thd->query_length,
+                            0, FALSE, THD::NOT_KILLED);
       mysql_bin_log.write(&qinfo);
     }
   }
@@ -3181,7 +3183,8 @@ bool mysql_routine_grant(THD *thd, TABLE
     if (mysql_bin_log.is_open())
     {
       thd->clear_error();
-      Query_log_event qinfo(thd, thd->query, thd->query_length, 0, FALSE);
+      Query_log_event qinfo(thd, thd->query, thd->query_length,
+                            0, FALSE, THD::NOT_KILLED);
       mysql_bin_log.write(&qinfo);
     }
   }
@@ -3294,7 +3297,8 @@ bool mysql_grant(THD *thd, const char *d
     if (mysql_bin_log.is_open())
     {
       thd->clear_error();
-      Query_log_event qinfo(thd, thd->query, thd->query_length, 0, FALSE);
+      Query_log_event qinfo(thd, thd->query, thd->query_length,
+                            0, FALSE, THD::NOT_KILLED);
       mysql_bin_log.write(&qinfo);
     }
   }
@@ -5388,7 +5392,8 @@ bool mysql_create_user(THD *thd, List <L
 
   if (some_users_created && mysql_bin_log.is_open())
   {
-    Query_log_event qinfo(thd, thd->query, thd->query_length, 0, FALSE);
+    Query_log_event qinfo(thd, thd->query, thd->query_length,
+                          0, FALSE, THD::NOT_KILLED);
     mysql_bin_log.write(&qinfo);
   }
 
@@ -5457,7 +5462,8 @@ bool mysql_drop_user(THD *thd, List <LEX
 
   if (some_users_deleted && mysql_bin_log.is_open())
   {
-    Query_log_event qinfo(thd, thd->query, thd->query_length, 0, FALSE);
+    Query_log_event qinfo(thd, thd->query, thd->query_length, 
+                          0, FALSE, THD::NOT_KILLED);
     mysql_bin_log.write(&qinfo);
   }
 
@@ -5537,7 +5543,8 @@ bool mysql_rename_user(THD *thd, List <L
   
   if (some_users_renamed && mysql_bin_log.is_open())
   {
-    Query_log_event qinfo(thd, thd->query, thd->query_length, 0, FALSE);
+    Query_log_event qinfo(thd, thd->query, thd->query_length, 
+                          0, FALSE, THD::NOT_KILLED);
     mysql_bin_log.write(&qinfo);
   }
 
@@ -5715,7 +5722,8 @@ bool mysql_revoke_all(THD *thd,  List <L
 
   if (mysql_bin_log.is_open())
   {
-    Query_log_event qinfo(thd, thd->query, thd->query_length, 0, FALSE);
+    Query_log_event qinfo(thd, thd->query, thd->query_length,
+                          0, FALSE, THD::NOT_KILLED);
     mysql_bin_log.write(&qinfo);
   }
 

=== modified file 'sql/sql_base.cc'
--- a/sql/sql_base.cc	2008-11-27 14:54:23 +0000
+++ b/sql/sql_base.cc	2009-03-02 01:24:09 +0000
@@ -793,18 +793,9 @@ void close_temporary_tables(THD *thd)
       thd->variables.character_set_client= system_charset_info;
       Query_log_event qinfo(thd, s_query.ptr(),
                             s_query.length() - 1 /* to remove trailing ',' */,
-                            0, FALSE);
+                            0, FALSE, THD::NOT_KILLED);
       thd->variables.character_set_client= cs_save;
-      /*
-        Imagine the thread had created a temp table, then was doing a SELECT, and
-        the SELECT was killed. Then it's not clever to mark the statement above as
-        "killed", because it's not really a statement updating data, and there
-        are 99.99% chances it will succeed on slave.
-        If a real update (one updating a persistent table) was killed on the
-        master, then this real update will be logged with error_code=killed,
-        rightfully causing the slave to stop.
-      */
-      qinfo.error_code= 0;
+      DBUG_ASSERT(qinfo.error_code= 0);
       mysql_bin_log.write(&qinfo);
     }
     else
@@ -2578,7 +2569,8 @@ static int open_unireg_entry(THD *thd, T
       {
         end = strxmov(strmov(query, "DELETE FROM `"),
                       db,"`.`",name,"`", NullS);
-        Query_log_event qinfo(thd, query, (ulong)(end-query), 0, FALSE);
+        Query_log_event qinfo(thd, query, (ulong)(end-query),
+                              0, FALSE, THD::NOT_KILLED);
         mysql_bin_log.write(&qinfo);
         my_free(query, MYF(0));
       }

=== modified file 'sql/sql_db.cc'
--- a/sql/sql_db.cc	2009-01-15 11:08:09 +0000
+++ b/sql/sql_db.cc	2009-03-02 01:24:09 +0000
@@ -70,7 +70,7 @@ static byte* dboptions_get_key(my_dbopt_
 static inline void write_to_binlog(THD *thd, char *query, uint q_len,
                                    char *db, uint db_len)
 {
-  Query_log_event qinfo(thd, query, q_len, 0, 0);
+  Query_log_event qinfo(thd, query, q_len, 0, 0, THD::NOT_KILLED);
   qinfo.error_code= 0;
   qinfo.db= db;
   qinfo.db_len= db_len;
@@ -562,7 +562,7 @@ int mysql_create_db(THD *thd, char *db, 
     if (mysql_bin_log.is_open())
     {
       Query_log_event qinfo(thd, query, query_length, 0, 
-			    /* suppress_use */ TRUE);
+			    /* suppress_use */ TRUE, THD::NOT_KILLED);
 
       /*
 	Write should use the database being created as the "current
@@ -645,7 +645,7 @@ bool mysql_alter_db(THD *thd, const char
   if (mysql_bin_log.is_open())
   {
     Query_log_event qinfo(thd, thd->query, thd->query_length, 0,
-			  /* suppress_use */ TRUE);
+			  /* suppress_use */ TRUE, THD::NOT_KILLED);
 
     /*
       Write should use the database being created as the "current
@@ -770,7 +770,7 @@ bool mysql_rm_db(THD *thd,char *db,bool 
     if (mysql_bin_log.is_open())
     {
       Query_log_event qinfo(thd, query, query_length, 0, 
-			    /* suppress_use */ TRUE);
+			    /* suppress_use */ TRUE, THD::NOT_KILLED);
       /*
         Write should use the database being created as the "current
         database" and not the threads current database, which is the

=== modified file 'sql/sql_delete.cc'
--- a/sql/sql_delete.cc	2008-07-15 14:13:21 +0000
+++ b/sql/sql_delete.cc	2009-03-02 01:24:09 +0000
@@ -730,7 +730,7 @@ void multi_delete::send_error(uint errco
     if (mysql_bin_log.is_open())
     {
       Query_log_event qinfo(thd, thd->query, thd->query_length,
-                            transactional_tables, FALSE);
+                            transactional_tables, FALSE, THD::KILLED_NO_VALUE);
       mysql_bin_log.write(&qinfo);
     }
     thd->transaction.all.modified_non_trans_table= true;
@@ -958,7 +958,7 @@ end:
       {
         thd->clear_error();
 	Query_log_event qinfo(thd, thd->query, thd->query_length,
-			      0, FALSE);
+			      0, FALSE, THD::NOT_KILLED);
 	mysql_bin_log.write(&qinfo);
       }
       send_ok(thd);		// This should return record count

=== modified file 'sql/sql_insert.cc'
--- a/sql/sql_insert.cc	2008-10-15 13:55:52 +0000
+++ b/sql/sql_insert.cc	2009-03-02 01:24:09 +0000
@@ -2515,7 +2515,8 @@ bool Delayed_insert::handle_inserts(void
     }
     if (row->query && row->log_query && using_bin_log)
     {
-      Query_log_event qinfo(&thd, row->query, row->query_length, 0, FALSE);
+      Query_log_event qinfo(&thd, row->query, row->query_length,
+                            0, FALSE, THD::KILLED_NO_VALUE);
       mysql_bin_log.write(&qinfo);
     }
     if (table->s->blob_fields)
@@ -3074,7 +3075,7 @@ void select_insert::abort()
     if (mysql_bin_log.is_open())
     {
       Query_log_event qinfo(thd, thd->query, thd->query_length,
-                            transactional_table, FALSE);
+                            transactional_table, FALSE, THD::KILLED_NO_VALUE);
       mysql_bin_log.write(&qinfo);
     }
     if (thd->transaction.stmt.modified_non_trans_table)

=== modified file 'sql/sql_parse.cc'
--- a/sql/sql_parse.cc	2009-01-15 10:48:31 +0000
+++ b/sql/sql_parse.cc	2009-03-02 01:24:09 +0000
@@ -3504,7 +3504,8 @@ end_with_restore_list:
       if (mysql_bin_log.is_open())
       {
 	thd->clear_error(); // No binlog error generated
-        Query_log_event qinfo(thd, thd->query, thd->query_length, 0, FALSE);
+        Query_log_event qinfo(thd, thd->query, thd->query_length,
+                              0, FALSE, THD::NOT_KILLED);
         mysql_bin_log.write(&qinfo);
       }
     }
@@ -3539,7 +3540,8 @@ end_with_restore_list:
       if (mysql_bin_log.is_open())
       {
 	thd->clear_error(); // No binlog error generated
-        Query_log_event qinfo(thd, thd->query, thd->query_length, 0, FALSE);
+        Query_log_event qinfo(thd, thd->query, thd->query_length,
+                              0, FALSE, THD::NOT_KILLED);
         mysql_bin_log.write(&qinfo);
       }
     }
@@ -3565,7 +3567,8 @@ end_with_restore_list:
       if (mysql_bin_log.is_open())
       {
 	thd->clear_error(); // No binlog error generated
-        Query_log_event qinfo(thd, thd->query, thd->query_length, 0, FALSE);
+        Query_log_event qinfo(thd, thd->query, thd->query_length,
+                              0, FALSE, THD::NOT_KILLED);
         mysql_bin_log.write(&qinfo);
       }
     }
@@ -4347,7 +4350,8 @@ end_with_restore_list:
       {
         if (mysql_bin_log.is_open())
         {
-          Query_log_event qinfo(thd, thd->query, thd->query_length, 0, FALSE);
+          Query_log_event qinfo(thd, thd->query, thd->query_length,
+                                0, FALSE, THD::NOT_KILLED);
           mysql_bin_log.write(&qinfo);
         }
       }

=== modified file 'sql/sql_rename.cc'
--- a/sql/sql_rename.cc	2006-12-31 00:02:27 +0000
+++ b/sql/sql_rename.cc	2009-03-02 01:24:09 +0000
@@ -84,7 +84,8 @@ bool mysql_rename_tables(THD *thd, TABLE
     if (mysql_bin_log.is_open())
     {
       thd->clear_error();
-      Query_log_event qinfo(thd, thd->query, thd->query_length, 0, FALSE);
+      Query_log_event qinfo(thd, thd->query, thd->query_length,
+                            0, FALSE, THD::NOT_KILLED);
       mysql_bin_log.write(&qinfo);
     }
     send_ok(thd);

=== modified file 'sql/sql_table.cc'
--- a/sql/sql_table.cc	2008-12-09 12:38:52 +0000
+++ b/sql/sql_table.cc	2009-03-02 01:24:09 +0000
@@ -333,7 +333,8 @@ int mysql_rm_table_part2(THD *thd, TABLE
     {
       if (!error)
         thd->clear_error();
-      Query_log_event qinfo(thd, thd->query, thd->query_length, FALSE, FALSE);
+      Query_log_event qinfo(thd, thd->query, thd->query_length,
+                            FALSE, FALSE, THD::NOT_KILLED);
       mysql_bin_log.write(&qinfo);
     }
   }
@@ -1814,7 +1815,8 @@ bool mysql_create_table(THD *thd,const c
   if (!internal_tmp_table && mysql_bin_log.is_open())
   {
     thd->clear_error();
-    Query_log_event qinfo(thd, thd->query, thd->query_length, FALSE, FALSE);
+    Query_log_event qinfo(thd, thd->query, thd->query_length,
+                          FALSE, FALSE, THD::NOT_KILLED);
     mysql_bin_log.write(&qinfo);
   }
   error= FALSE;
@@ -2898,7 +2900,8 @@ bool mysql_create_like_table(THD* thd, T
   if (mysql_bin_log.is_open())
   {
     thd->clear_error();
-    Query_log_event qinfo(thd, thd->query, thd->query_length, FALSE, FALSE);
+    Query_log_event qinfo(thd, thd->query, thd->query_length,
+                          FALSE, FALSE, THD::NOT_KILLED);
     mysql_bin_log.write(&qinfo);
   }
   res= FALSE;
@@ -3007,7 +3010,8 @@ mysql_discard_or_import_tablespace(THD *
     goto err;
   if (mysql_bin_log.is_open())
   {
-    Query_log_event qinfo(thd, thd->query, thd->query_length, FALSE, FALSE);
+    Query_log_event qinfo(thd, thd->query, thd->query_length,
+                          FALSE, FALSE, THD::NOT_KILLED);
     mysql_bin_log.write(&qinfo);
   }
 err:
@@ -3163,7 +3167,8 @@ bool mysql_alter_table(THD *thd,char *ne
       if (mysql_bin_log.is_open())
       {
         thd->clear_error();
-        Query_log_event qinfo(thd, thd->query, thd->query_length, 0, FALSE);
+        Query_log_event qinfo(thd, thd->query, thd->query_length,
+                              0, FALSE, THD::NOT_KILLED);
         mysql_bin_log.write(&qinfo);
       }
       send_ok(thd);
@@ -3355,7 +3360,8 @@ view_err:
       if (mysql_bin_log.is_open())
       {
 	thd->clear_error();
-	Query_log_event qinfo(thd, thd->query, thd->query_length, FALSE, FALSE);
+	Query_log_event qinfo(thd, thd->query, thd->query_length,
+                              FALSE, FALSE, THD::NOT_KILLED);
 	mysql_bin_log.write(&qinfo);
       }
       send_ok(thd);
@@ -3867,7 +3873,8 @@ view_err:
     if (mysql_bin_log.is_open())
     {
       thd->clear_error();
-      Query_log_event qinfo(thd, thd->query, thd->query_length, FALSE, FALSE);
+      Query_log_event qinfo(thd, thd->query, thd->query_length,
+                            FALSE, FALSE, THD::NOT_KILLED);
       mysql_bin_log.write(&qinfo);
     }
     goto end_temporary;
@@ -4002,7 +4009,8 @@ view_err:
   if (mysql_bin_log.is_open())
   {
     thd->clear_error();
-    Query_log_event qinfo(thd, thd->query, thd->query_length, FALSE, FALSE);
+    Query_log_event qinfo(thd, thd->query, thd->query_length,
+                          FALSE, FALSE, THD::NOT_KILLED);
     mysql_bin_log.write(&qinfo);
   }
   broadcast_refresh();

=== modified file 'sql/sql_trigger.cc'
--- a/sql/sql_trigger.cc	2009-01-15 11:08:09 +0000
+++ b/sql/sql_trigger.cc	2009-03-02 01:24:09 +0000
@@ -304,7 +304,7 @@ end:
 
       /* Such a statement can always go directly to binlog, no trans cache. */
       Query_log_event qinfo(thd, stmt_query.ptr(), stmt_query.length(), 0,
-                            FALSE);
+                            FALSE, THD::NOT_KILLED);
       mysql_bin_log.write(&qinfo);
     }
   }

=== modified file 'sql/sql_update.cc'
--- a/sql/sql_update.cc	2008-11-27 13:57:34 +0000
+++ b/sql/sql_update.cc	2009-03-02 01:24:09 +0000
@@ -1575,7 +1575,7 @@ void multi_update::send_error(uint errco
         into repl event.
       */
       Query_log_event qinfo(thd, thd->query, thd->query_length,
-                            transactional_tables, FALSE);
+                            transactional_tables, FALSE, THD::KILLED_NO_VALUE);
       mysql_bin_log.write(&qinfo);
     }
     thd->transaction.all.modified_non_trans_table= TRUE;

=== modified file 'sql/sql_view.cc'
--- a/sql/sql_view.cc	2009-01-15 11:08:09 +0000
+++ b/sql/sql_view.cc	2009-03-02 01:24:09 +0000
@@ -655,7 +655,8 @@ bool mysql_create_view(THD *thd, TABLE_L
     else if (views->with_check == VIEW_CHECK_CASCADED)
       buff.append(STRING_WITH_LEN(" WITH CASCADED CHECK OPTION"));
 
-    Query_log_event qinfo(thd, buff.ptr(), buff.length(), 0, FALSE);
+    Query_log_event qinfo(thd, buff.ptr(), buff.length(),
+                          0, FALSE, THD::NOT_KILLED);
     mysql_bin_log.write(&qinfo);
   }
 
@@ -1544,7 +1545,8 @@ bool mysql_drop_view(THD *thd, TABLE_LIS
   {
     if (!something_wrong)
       thd->clear_error();
-    Query_log_event qinfo(thd, thd->query, thd->query_length, 0, FALSE);
+    Query_log_event qinfo(thd, thd->query, thd->query_length,
+                          0, FALSE, THD::NOT_KILLED);
     mysql_bin_log.write(&qinfo);
   }
 

Thread
bzr commit into mysql-5.0-bugteam branch (zhenxing.he:2731) Bug#37145He Zhenxing2 Mar
  • Re: bzr commit into mysql-5.0-bugteam branch (zhenxing.he:2731)Bug#37145Luís Soares5 Mar
    • Re: bzr commit into mysql-5.0-bugteam branch (zhenxing.he:2731)Bug#37145He Zhenxing6 Mar