1
0
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:
Nirbhay Choubey
2015-01-22 18:00:37 -05:00
parent ab440b0fb7
commit 0105bf349a
12 changed files with 175 additions and 5 deletions

View File

@ -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;
}