From 16384fae63ed37e2115cb0d694d817bf0104dd46 Mon Sep 17 00:00:00 2001 From: mkaruza Date: Wed, 29 Aug 2018 16:45:28 +0200 Subject: [PATCH] MDEV-15845 Test failure on galera.galera_concurrent_ctas While executing CTAS galera applier thread can cause CTAS to abort and rollback. Rollback can take time causing applier thread to shutdown node after serial unsuccessful retries to apply transaction. Don't set lock_wait_timeout to zero to wait for lock. --- sql/sql_base.cc | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/sql/sql_base.cc b/sql/sql_base.cc index dc1122ffad8..fecb5686541 100644 --- a/sql/sql_base.cc +++ b/sql/sql_base.cc @@ -4379,6 +4379,10 @@ lock_table_names(THD *thd, const DDL_options_st &options, mdl_requests.push_front(&global_request); if (create_table) + #ifdef WITH_WSREP + if (thd->lex->sql_command != SQLCOM_CREATE_TABLE && + thd->wsrep_exec_mode != REPL_RECV) + #endif lock_wait_timeout= 0; // Don't wait for timeout }