diff options
author | Daniele Sciascia <daniele.sciascia@galeracluster.com> | 2017-03-13 15:35:04 +0100 |
---|---|---|
committer | Jan Lindström <jan.lindstrom@mariadb.com> | 2017-07-20 14:16:52 +0300 |
commit | 34853fa7937b8081516eddb0226e8031f06ba96f (patch) | |
tree | cf86a8dda79ce1cc6a5c3d9b368087daa2014405 /sql/sql_parse.cc | |
parent | a82611771b58fcfee024ce59c13adc2a928c5428 (diff) | |
download | mariadb-git-34853fa7937b8081516eddb0226e8031f06ba96f.tar.gz |
MW-86 Additional wsrep_sync_wait coverage
The following commands are now subject to wsrep_sync_wait
with bitmask value 8:
SHOW BINARY LOGS
SHOW BINLOG EVENTS
SHOW GRANTS
Signed-off-by: Jan Lindström <jan.lindstrom@mariadb.com>
Diffstat (limited to 'sql/sql_parse.cc')
-rw-r--r-- | sql/sql_parse.cc | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/sql/sql_parse.cc b/sql/sql_parse.cc index 3862de0c135..c222adbbac2 100644 --- a/sql/sql_parse.cc +++ b/sql/sql_parse.cc @@ -2502,7 +2502,6 @@ mysql_execute_command(THD *thd) case SQLCOM_SHOW_COLLATIONS: case SQLCOM_SHOW_STORAGE_ENGINES: case SQLCOM_SHOW_PROFILE: - WSREP_SYNC_WAIT(thd, WSREP_SYNC_WAIT_BEFORE_SHOW); case SQLCOM_SHOW_CLIENT_STATS: case SQLCOM_SHOW_USER_STATS: case SQLCOM_SHOW_TABLE_STATS: @@ -2510,8 +2509,10 @@ mysql_execute_command(THD *thd) case SQLCOM_SELECT: { #ifdef WITH_WSREP - if (lex->sql_command == SQLCOM_SELECT) - WSREP_SYNC_WAIT(thd, WSREP_SYNC_WAIT_BEFORE_READ); + if (lex->sql_command == SQLCOM_SELECT) + WSREP_SYNC_WAIT(thd, WSREP_SYNC_WAIT_BEFORE_READ) + else + WSREP_SYNC_WAIT(thd, WSREP_SYNC_WAIT_BEFORE_SHOW) #endif /* WITH_WSREP */ thd->status_var.last_query_cost= 0.0; @@ -2635,6 +2636,7 @@ case SQLCOM_PREPARE: case SQLCOM_SHOW_RELAYLOG_EVENTS: /* fall through */ case SQLCOM_SHOW_BINLOG_EVENTS: { + WSREP_SYNC_WAIT(thd, WSREP_SYNC_WAIT_BEFORE_SHOW); if (check_global_access(thd, REPL_SLAVE_ACL)) goto error; res = mysql_show_binlog_events(thd); @@ -3061,6 +3063,7 @@ end_with_restore_list: { if (check_global_access(thd, SUPER_ACL | REPL_CLIENT_ACL)) goto error; + WSREP_SYNC_WAIT(thd, WSREP_SYNC_WAIT_BEFORE_SHOW); res = show_binlogs(thd); break; } @@ -4163,6 +4166,7 @@ end_with_restore_list: !strcmp(thd->security_ctx->priv_user, grant_user->user.str)) || !check_access(thd, SELECT_ACL, "mysql", NULL, NULL, 1, 0)) { + WSREP_SYNC_WAIT(thd, WSREP_SYNC_WAIT_BEFORE_SHOW); res = mysql_show_grants(thd, grant_user); } break; |