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-27 16:22:29 -05:00
parent 5b6f637caa
commit 9b7e3801f4
8 changed files with 154 additions and 3 deletions

View File

@ -2392,11 +2392,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