From bc3bfcf943b817b19a41e4f599b4f2e9a259b263 Mon Sep 17 00:00:00 2001 From: Daniele Sciascia Date: Mon, 20 Mar 2023 15:20:32 +0100 Subject: MDEV-30862 Assertion `mode_ == m_high_priority' failed CREATE TABLE AS SELECT is not supported in combination with streaming replication. --- sql/sql_table.cc | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'sql/sql_table.cc') diff --git a/sql/sql_table.cc b/sql/sql_table.cc index 9f13dcde40f..1e88e7722e3 100644 --- a/sql/sql_table.cc +++ b/sql/sql_table.cc @@ -11569,6 +11569,19 @@ bool Sql_cmd_create_table_like::execute(THD *thd) } #endif +#ifdef WITH_WSREP + if (select_lex->item_list.elements && // With SELECT + WSREP(thd) && thd->variables.wsrep_trx_fragment_size > 0) + { + my_message( + ER_NOT_ALLOWED_COMMAND, + "CREATE TABLE AS SELECT is not supported with streaming replication", + MYF(0)); + res= 1; + goto end_with_restore_list; + } +#endif /* WITH_WSREP */ + if (select_lex->item_list.elements || select_lex->tvc) // With select or TVC { select_result *result; -- cgit v1.2.1