summaryrefslogtreecommitdiff
path: root/sql
diff options
context:
space:
mode:
authorAndrei <andrei.elkin@mariadb.com>2023-01-05 20:08:01 +0200
committerAndrei <andrei.elkin@mariadb.com>2023-01-24 20:18:03 +0200
commit7fe932444d08e2f442c04a6b30be9cbac40f0099 (patch)
treed50e3cde7b07b0dac1a221ce52b1bdf3cfc93445 /sql
parent3aa04c0debabb8119c4aa13a45ea87482a540fd8 (diff)
downloadmariadb-git-7fe932444d08e2f442c04a6b30be9cbac40f0099.tar.gz
MDEV-30323 Some DDLs like ANALYZE can complete on parallel slave out of orderbb-10.3-andrei
ANALYZE was observed to race over a preceding in binlog order DML in updating the binlog and slave gtid states. Tagging ANALYZE and other admin class commands in binlog by the fixes of MDEV-17515 left a flaw allowing such race leading to the gtid mode out-of-order error. This is fixed now to observe by ADMIN commands the ordered access to the slave gtid status variables and binlog.
Diffstat (limited to 'sql')
-rw-r--r--sql/sql_admin.cc6
1 files changed, 3 insertions, 3 deletions
diff --git a/sql/sql_admin.cc b/sql/sql_admin.cc
index 71afba74215..a6c87f9824e 100644
--- a/sql/sql_admin.cc
+++ b/sql/sql_admin.cc
@@ -1249,16 +1249,16 @@ send_result_message:
goto err;
DEBUG_SYNC(thd, "admin_command_kill_after_modify");
}
+ thd->resume_subsequent_commits(suspended_wfc);
+ DBUG_EXECUTE_IF("inject_analyze_table_sleep", my_sleep(500000););
if (is_table_modified && is_cmd_replicated &&
(!opt_readonly || thd->slave_thread) && !thd->lex->no_write_to_binlog)
{
if (write_bin_log(thd, TRUE, thd->query(), thd->query_length()))
goto err;
}
-
my_eof(thd);
- thd->resume_subsequent_commits(suspended_wfc);
- DBUG_EXECUTE_IF("inject_analyze_table_sleep", my_sleep(500000););
+
DBUG_RETURN(FALSE);
err: