diff options
author | Jan Lindström <jan.lindstrom@mariadb.com> | 2021-09-27 15:09:50 +0300 |
---|---|---|
committer | Jan Lindström <jan.lindstrom@mariadb.com> | 2021-09-27 15:09:50 +0300 |
commit | 690c4725914377914640d7d714a7e93127ee169d (patch) | |
tree | a4599eb4cd5f634e0cbb84a4058951d76a5fce1e /sql/wsrep_schema.cc | |
parent | 83c4523f0378ec37986501104d55b0258e6ac9f2 (diff) | |
download | mariadb-git-690c4725914377914640d7d714a7e93127ee169d.tar.gz |
MDEV-21613 : galera_sr.GCF-1018B MTR failed: Failed to open table mysql.wsrep_streaming_log for writingbb-10.5-MDEV-21613b-galera
Query can be bf aborted already earlier and then we should not
even try to open table.
Diffstat (limited to 'sql/wsrep_schema.cc')
-rw-r--r-- | sql/wsrep_schema.cc | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/sql/wsrep_schema.cc b/sql/wsrep_schema.cc index 252f41cb380..fe45c4d1711 100644 --- a/sql/wsrep_schema.cc +++ b/sql/wsrep_schema.cc @@ -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); } |