summaryrefslogtreecommitdiff
path: root/sql/rpl_gtid.cc
diff options
context:
space:
mode:
authorMonty <monty@mariadb.org>2018-05-26 16:57:18 +0300
committerMonty <monty@mariadb.org>2018-05-27 19:47:17 +0300
commit58721c3e38f1d5cd9261c6da205126cf0ae2ab24 (patch)
tree53d3a77617ca85823b5cae33eb257749990df2cc /sql/rpl_gtid.cc
parentb3a27618073c74ec5dbf0eeb57afeecf7e8bfa1c (diff)
downloadmariadb-git-58721c3e38f1d5cd9261c6da205126cf0ae2ab24.tar.gz
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().
Diffstat (limited to 'sql/rpl_gtid.cc')
-rw-r--r--sql/rpl_gtid.cc5
1 files changed, 2 insertions, 3 deletions
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)