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:
@ -2615,11 +2615,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 (thd->variables.wsrep_on && !thd->wsrep_applier && !wsrep_ready &&
|
||||
lex->sql_command != SQLCOM_SET_OPTION &&
|
||||
!(thd->variables.wsrep_dirty_reads &&
|
||||
lex->sql_command == SQLCOM_SELECT) &&
|
||||
!wsrep_is_show_query(lex->sql_command))
|
||||
{
|
||||
#if DIRTY_HACK
|
||||
|
Reference in New Issue
Block a user