mirror of
https://github.com/MariaDB/server.git
synced 2026-05-15 11:27:39 +02: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:
parent
25a9a3da34
commit
0c79de2419
8 changed files with 188 additions and 9 deletions
|
|
@ -2649,13 +2649,16 @@ mysql_execute_command(THD *thd)
|
|||
}
|
||||
|
||||
/*
|
||||
Bail out if DB snapshot has not been installed. We however, allow SET,
|
||||
SHOW and SELECT queries (only if wsrep_dirty_reads is set).
|
||||
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 (lex->sql_command != SQLCOM_SET_OPTION &&
|
||||
!wsrep_is_show_query(lex->sql_command) &&
|
||||
!(thd->variables.wsrep_dirty_reads &&
|
||||
lex->sql_command == SQLCOM_SELECT) &&
|
||||
!is_update_query(lex->sql_command)) &&
|
||||
!wsrep_node_is_ready(thd))
|
||||
goto error;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue