1
0
mirror of https://github.com/MariaDB/server.git synced 2025-12-03 05:41:09 +03:00

MDEV-11479 Improved wsrep_dirty_reads

Tasks:-
         Changes in wsrep_dirty_reads variable
         1.) Global + Session scope (Current: session-only)
         2.) Can be set using command line.
         3.) Allow all commands that do not change data (besides SELECT)
         4.) Allow prepared Statements that do not change data
         5.) Works with wsrep_sync_wait enabled
This commit is contained in:
Sachin Setiya
2016-12-14 17:14:42 +05:30
parent 95422c445d
commit 5ddd8149e4
9 changed files with 191 additions and 9 deletions

View File

@@ -2386,13 +2386,16 @@ 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. SET and SHOW commands,
however, are always allowed.
We additionally allow all other commands that do not change data in
case wsrep_dirty_reads is enabled.
*/
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) &&
!is_update_query(lex->sql_command)) &&
!wsrep_is_show_query(lex->sql_command))
{
#if DIRTY_HACK