summaryrefslogtreecommitdiff
path: root/sql/sql_delete.cc
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
commit51a91166387760546d563ebf72bfa037fcff24a8 (patch)
treec64191bf0f499c4e0d6b020460f019c04f7dc2e8 /sql/sql_delete.cc
parentf606cfeae3f934b4e6864693994ed80b7f2631ef (diff)
downloadmariadb-git-51a91166387760546d563ebf72bfa037fcff24a8.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/sql_delete.cc')
-rw-r--r--sql/sql_delete.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/sql/sql_delete.cc b/sql/sql_delete.cc
index 38f89683065..a757b7c28a5 100644
--- a/sql/sql_delete.cc
+++ b/sql/sql_delete.cc
@@ -730,7 +730,7 @@ void multi_delete::send_error(uint errcode,const char *err)
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