summaryrefslogtreecommitdiff
path: root/sql/log_event.h
diff options
context:
space:
mode:
authorHe Zhenxing <zhenxing.he@sun.com>2009-03-27 13:19:50 +0800
committerHe Zhenxing <zhenxing.he@sun.com>2009-03-27 13:19:50 +0800
commit95301268221bfcf72baaa9f34f234ff6231235c8 (patch)
treec64191bf0f499c4e0d6b020460f019c04f7dc2e8 /sql/log_event.h
parent75ab3274c8f36aa0be49d03e3616e5c557890b2a (diff)
downloadmariadb-git-95301268221bfcf72baaa9f34f234ff6231235c8.tar.gz
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.
Diffstat (limited to 'sql/log_event.h')
-rw-r--r--sql/log_event.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/sql/log_event.h b/sql/log_event.h
index 6ccbf8e4d5c..45e3d11b48c 100644
--- a/sql/log_event.h
+++ b/sql/log_event.h
@@ -813,9 +813,13 @@ public:
#ifndef MYSQL_CLIENT
+ /*
+ for argument killed_err_arg, use ` THD::NOT_KILLED ' if the killed
+ status should be ignored, otherwise use `THD::KILLED_NO_VALUE'
+ */
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);