From 58721c3e38f1d5cd9261c6da205126cf0ae2ab24 Mon Sep 17 00:00:00 2001 From: Monty Date: Sat, 26 May 2018 16:57:18 +0300 Subject: MDEV-16286 Killed CREATE SEQUENCE leaves sequence in unusable state Fixed by deleting the sequence if we where not able to initialize it I also noticed that we didn't always set the error message when check_killed(), which could lead to aborted queries without error beeing properly set. Fixed by default setting error message if check_error() noticed that killed had been called. This allowed me to remove a lot of calls to thd->send_kill_message(). --- sql/rpl_gtid.cc | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'sql/rpl_gtid.cc') diff --git a/sql/rpl_gtid.cc b/sql/rpl_gtid.cc index 6cd02f6ee9f..ad885c925d9 100644 --- a/sql/rpl_gtid.cc +++ b/sql/rpl_gtid.cc @@ -169,7 +169,6 @@ rpl_slave_state::check_duplicate_gtid(rpl_gtid *gtid, rpl_group_info *rgi) thd= rgi->thd; if (unlikely(thd->check_killed())) { - thd->send_kill_message(); res= -1; break; } @@ -2602,7 +2601,7 @@ gtid_waiting::wait_for_gtid(THD *thd, rpl_gtid *wait_gtid, &stage_master_gtid_wait_primary, &old_stage); do { - if (unlikely(thd->check_killed())) + if (unlikely(thd->check_killed(1))) break; else if (wait_until) { @@ -2654,7 +2653,7 @@ gtid_waiting::wait_for_gtid(THD *thd, rpl_gtid *wait_gtid, &stage_master_gtid_wait, &old_stage); did_enter_cond= true; } - while (!elem.done && likely(!thd->check_killed())) + while (!elem.done && likely(!thd->check_killed(1))) { thd_wait_begin(thd, THD_WAIT_BINLOG); if (wait_until) -- cgit v1.2.1