diff options
author | Alexey Yurchenko <ayurchen@galeracluster.com> | 2017-06-19 17:23:02 +0700 |
---|---|---|
committer | Jan Lindström <jan.lindstrom@mariadb.com> | 2017-10-19 09:34:09 +0300 |
commit | 86d31ce9f141d34fffcf7f355d4c0e6e54077eb3 (patch) | |
tree | f67f470ef746d475691f322e6a2992250f56338f /sql/sql_parse.cc | |
parent | 8da6b4ef5260179b1577843517c46e4b95a9e911 (diff) | |
download | mariadb-git-86d31ce9f141d34fffcf7f355d4c0e6e54077eb3.tar.gz |
MW-384 protect access to wsrep_ready variable with mutex
Diffstat (limited to 'sql/sql_parse.cc')
-rw-r--r-- | sql/sql_parse.cc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sql/sql_parse.cc b/sql/sql_parse.cc index f0f021d4047..d102c6162d0 100644 --- a/sql/sql_parse.cc +++ b/sql/sql_parse.cc @@ -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)) && |