diff options
author | Nirbhay Choubey <nirbhay@mariadb.com> | 2015-01-27 16:22:29 -0500 |
---|---|---|
committer | Nirbhay Choubey <nirbhay@mariadb.com> | 2015-01-27 16:22:29 -0500 |
commit | 9b7e3801f4d3b241d525c7f2d6f0e2aedb35e3cc (patch) | |
tree | 7198462a6fc9729acd3e4857a5c6828790d264ee /sql/sys_vars.cc | |
parent | 5b6f637caafba84457b91e08ce9c4f3fc6e8202f (diff) | |
download | mariadb-git-9b7e3801f4d3b241d525c7f2d6f0e2aedb35e3cc.tar.gz |
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.
Diffstat (limited to 'sql/sys_vars.cc')
-rw-r--r-- | sql/sys_vars.cc | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/sql/sys_vars.cc b/sql/sys_vars.cc index b796b1445e4..88760e2d602 100644 --- a/sql/sys_vars.cc +++ b/sql/sys_vars.cc @@ -3951,6 +3951,12 @@ static Sys_var_mybool Sys_wsrep_slave_UK_checks( static Sys_var_mybool Sys_wsrep_restart_slave( "wsrep_restart_slave", "Should MySQL slave be restarted automatically, when node joins back to cluster", GLOBAL_VAR(wsrep_restart_slave), CMD_LINE(OPT_ARG), DEFAULT(FALSE)); + +static Sys_var_mybool Sys_wsrep_dirty_reads( + "wsrep_dirty_reads", "Do not reject SELECT queries even when the node " + "is not ready.", SESSION_ONLY(wsrep_dirty_reads), NO_CMD_LINE, + DEFAULT(FALSE), NO_MUTEX_GUARD, NOT_IN_BINLOG); + #endif /* WITH_WSREP */ static Sys_var_charptr Sys_ignore_db_dirs( |