mirror of
https://github.com/MariaDB/server.git
synced 2025-07-27 18:02:13 +03:00
MDEV-7476: Allow SELECT to succeed even when node is not ready
Added a SESSION-only system variable "wsrep_dirty_reads" to allow SELECT queries to pass even when the node is not prepared to accept queries (wsrep_ready=OFF). Added a test case.
This commit is contained in:
@ -2607,11 +2607,13 @@ mysql_execute_command(THD *thd)
|
||||
}
|
||||
|
||||
/*
|
||||
* bail out if DB snapshot has not been installed. We however,
|
||||
* allow SET and SHOW queries
|
||||
*/
|
||||
Bail out if DB snapshot has not been installed. We however,
|
||||
allow SET and SHOW queries.
|
||||
*/
|
||||
if (lex->sql_command != SQLCOM_SET_OPTION &&
|
||||
!wsrep_is_show_query(lex->sql_command) &&
|
||||
!(thd->variables.wsrep_dirty_reads &&
|
||||
lex->sql_command == SQLCOM_SELECT) &&
|
||||
!wsrep_node_is_ready(thd))
|
||||
goto error;
|
||||
}
|
||||
|
Reference in New Issue
Block a user