1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-27 18:02:13 +03:00

MW-384 protect access to wsrep_ready variable with mutex

This commit is contained in:
Alexey Yurchenko
2017-06-19 17:23:02 +07:00
committed by Jan Lindström
parent 8da6b4ef52
commit 86d31ce9f1
8 changed files with 33 additions and 23 deletions

View File

@ -851,7 +851,7 @@ bool do_command(THD *thd)
* bail out if DB snapshot has not been installed. We however,
* allow queries "SET" and "SHOW", they are trapped later in execute_command
*/
if (thd->variables.wsrep_on && !thd->wsrep_applier && !wsrep_ready &&
if (thd->variables.wsrep_on && !thd->wsrep_applier && !wsrep_ready_get() &&
command != COM_QUERY &&
command != COM_PING &&
command != COM_QUIT &&
@ -2382,7 +2382,7 @@ mysql_execute_command(THD *thd)
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 &&
if (thd->variables.wsrep_on && !thd->wsrep_applier && !wsrep_ready_get() &&
lex->sql_command != SQLCOM_SET_OPTION &&
!(thd->variables.wsrep_dirty_reads &&
!is_update_query(lex->sql_command)) &&