mirror of
https://github.com/MariaDB/server.git
synced 2025-08-27 13:04:36 +03:00
MDEV-11016 wsrep_node_is_ready() check is too strict
Problem:- The condition that checks for node readiness is too strict as it does not allow SELECTs even if these selects do not access any tables. For example,if we run SELECT 1; OR SELECT @@max_allowed_packet; Solution:- We need not to report this error when all_tables(lex->query_tables) is NULL:
This commit is contained in:
@@ -2650,12 +2650,15 @@ mysql_execute_command(THD *thd)
|
||||
|
||||
/*
|
||||
Bail out if DB snapshot has not been installed. We however, allow SET,
|
||||
SHOW and SELECT queries (only if wsrep_dirty_reads is set).
|
||||
SHOW and SELECT queries (only if wsrep_dirty_reads is set or when it
|
||||
does not access any table).
|
||||
*/
|
||||
if (lex->sql_command != SQLCOM_SET_OPTION &&
|
||||
!wsrep_is_show_query(lex->sql_command) &&
|
||||
!(thd->variables.wsrep_dirty_reads &&
|
||||
lex->sql_command == SQLCOM_SELECT) &&
|
||||
!(lex->sql_command == SQLCOM_SELECT &&
|
||||
!all_tables) &&
|
||||
!wsrep_node_is_ready(thd))
|
||||
goto error;
|
||||
}
|
||||
|
Reference in New Issue
Block a user