#At file:///media/sdb2/hezx/work/mysql/bzrwork/b37145/5.0/
2731 He Zhenxing 2009-03-01
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.
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-01 10:02:32 +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;
}
=== 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-01 10:02:32 +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;
=== modified file 'sql/log.cc'
--- a/sql/log.cc 2008-12-11 11:06:50 +0000
+++ b/sql/log.cc 2009-03-01 10:02:32 +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-01 10:02:32 +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-01 10:02:32 +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-01 10:02:32 +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-01 10:02:32 +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-01 10:02:32 +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-01 10:02:32 +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-01 10:02:32 +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-01 10:02:32 +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-01 10:02:32 +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-01 10:02:32 +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-01 10:02:32 +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-01 10:02:32 +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-01 10:02:32 +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-01 10:02:32 +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-01 10:02:32 +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#37145 | He Zhenxing | 1 Mar |