From 4eb8e51c269eb9447d3765a6e4deba0dc68dfa37 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20Lindstr=C3=B6m?= Date: Wed, 30 Nov 2022 13:10:52 +0200 Subject: Merge 10.4 into 10.5 --- sql/sql_parse.cc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'sql/sql_parse.cc') diff --git a/sql/sql_parse.cc b/sql/sql_parse.cc index faaab33a589..64be8f937e5 100644 --- a/sql/sql_parse.cc +++ b/sql/sql_parse.cc @@ -1158,7 +1158,7 @@ static bool wsrep_tables_accessible_when_detached(const TABLE_LIST *tables) if (get_table_category(&db, &tn) < TABLE_CATEGORY_INFORMATION) return false; } - return true; + return tables != NULL; } static bool wsrep_command_no_result(char command) @@ -3758,6 +3758,8 @@ mysql_execute_command(THD *thd) (sql_command_flags[lex->sql_command] & CF_CHANGES_DATA) == 0) && !wsrep_tables_accessible_when_detached(all_tables) && lex->sql_command != SQLCOM_SET_OPTION && + lex->sql_command != SQLCOM_CHANGE_DB && + !(lex->sql_command == SQLCOM_SELECT && !all_tables) && !wsrep_is_show_query(lex->sql_command)) { my_message(ER_UNKNOWN_COM_ERROR, -- cgit v1.2.1