Commit 690c4725 authored by Jan Lindström's avatar Jan Lindström

MDEV-21613 : galera_sr.GCF-1018B MTR failed: Failed to open table...

MDEV-21613 : galera_sr.GCF-1018B MTR failed: Failed to open table mysql.wsrep_streaming_log for writing

Query can be bf aborted already earlier and then we should not
even try to open table.
parent 83c4523f
......@@ -289,7 +289,14 @@ static int open_table(THD* thd,
NULL, lock_type);
thd->lex->query_tables_own_last= 0;
if (!open_n_lock_single_table(thd, &tables, tables.lock_type, flags)) {
// No need to open table if the query was bf aborted,
// thd client will get ER_LOCK_DEADLOCK in the end.
const bool interrupted= thd->killed ||
(thd->is_error() &&
(thd->get_stmt_da()->sql_errno() == ER_QUERY_INTERRUPTED));
if (interrupted ||
!open_n_lock_single_table(thd, &tables, tables.lock_type, flags)) {
close_thread_tables(thd);
DBUG_RETURN(1);
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment