Skip to content

Commit 15f0655

Browse files
author
Jan Lindström
committed
MDEV-17883: CREATE TABLE IF NOT EXISTS locking changes in 10.3.10
Based on pull request #999 by mkaruza@galeracluster.com
1 parent b85aa20 commit 15f0655

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

sql/sql_base.cc

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4389,10 +4389,10 @@ lock_table_names(THD *thd, const DDL_options_st &options,
43894389
mdl_requests.push_front(&global_request);
43904390

43914391
if (create_table)
4392-
#ifdef WITH_WSREP
4393-
if (thd->lex->sql_command != SQLCOM_CREATE_TABLE &&
4394-
thd->wsrep_exec_mode != REPL_RECV)
4395-
#endif
4392+
#ifdef WITH_WSREP
4393+
if (!(thd->lex->sql_command == SQLCOM_CREATE_TABLE &&
4394+
thd->wsrep_exec_mode == REPL_RECV))
4395+
#endif
43964396
lock_wait_timeout= 0; // Don't wait for timeout
43974397
}
43984398

@@ -4403,6 +4403,7 @@ lock_table_names(THD *thd, const DDL_options_st &options,
44034403
bool res= thd->mdl_context.acquire_locks(&mdl_requests, lock_wait_timeout);
44044404
if (create_table)
44054405
thd->pop_internal_handler();
4406+
44064407
if (!res)
44074408
DBUG_RETURN(FALSE); // Got locks
44084409

0 commit comments

Comments
 (0)