1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-27 18:02:13 +03:00

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.
This commit is contained in:
He Zhenxing
2009-03-27 13:19:50 +08:00
parent f606cfeae3
commit 51a9116638
26 changed files with 674 additions and 63 deletions

View File

@ -3551,7 +3551,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);
}
}
@ -3586,7 +3587,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);
}
}
@ -3612,7 +3614,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);
}
}
@ -4394,7 +4397,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);
}
}