mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
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
This commit is contained in:
committed by
Jan Lindström
parent
e2ccbe1aea
commit
62cd7553d9
@ -2805,11 +2805,14 @@ mysql_execute_command(THD *thd)
|
|||||||
case SQLCOM_SHOW_COLLATIONS:
|
case SQLCOM_SHOW_COLLATIONS:
|
||||||
case SQLCOM_SHOW_STORAGE_ENGINES:
|
case SQLCOM_SHOW_STORAGE_ENGINES:
|
||||||
case SQLCOM_SHOW_PROFILE:
|
case SQLCOM_SHOW_PROFILE:
|
||||||
WSREP_SYNC_WAIT(thd, WSREP_SYNC_WAIT_BEFORE_SHOW);
|
|
||||||
case SQLCOM_SELECT:
|
case SQLCOM_SELECT:
|
||||||
{
|
{
|
||||||
if (lex->sql_command == SQLCOM_SELECT)
|
#ifdef WITH_WSREP
|
||||||
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;
|
thd->status_var.last_query_cost= 0.0;
|
||||||
|
|
||||||
@ -2933,6 +2936,7 @@ case SQLCOM_PREPARE:
|
|||||||
case SQLCOM_SHOW_RELAYLOG_EVENTS: /* fall through */
|
case SQLCOM_SHOW_RELAYLOG_EVENTS: /* fall through */
|
||||||
case SQLCOM_SHOW_BINLOG_EVENTS:
|
case SQLCOM_SHOW_BINLOG_EVENTS:
|
||||||
{
|
{
|
||||||
|
WSREP_SYNC_WAIT(thd, WSREP_SYNC_WAIT_BEFORE_SHOW);
|
||||||
if (check_global_access(thd, REPL_SLAVE_ACL))
|
if (check_global_access(thd, REPL_SLAVE_ACL))
|
||||||
goto error;
|
goto error;
|
||||||
res = mysql_show_binlog_events(thd);
|
res = mysql_show_binlog_events(thd);
|
||||||
@ -3495,6 +3499,7 @@ end_with_restore_list:
|
|||||||
{
|
{
|
||||||
if (check_global_access(thd, SUPER_ACL | REPL_CLIENT_ACL))
|
if (check_global_access(thd, SUPER_ACL | REPL_CLIENT_ACL))
|
||||||
goto error;
|
goto error;
|
||||||
|
WSREP_SYNC_WAIT(thd, WSREP_SYNC_WAIT_BEFORE_SHOW);
|
||||||
res = show_binlogs(thd);
|
res = show_binlogs(thd);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@ -4778,6 +4783,7 @@ end_with_restore_list:
|
|||||||
if (!grant_user)
|
if (!grant_user)
|
||||||
goto error;
|
goto error;
|
||||||
|
|
||||||
|
WSREP_SYNC_WAIT(thd, WSREP_SYNC_WAIT_BEFORE_SHOW);
|
||||||
res = mysql_show_grants(thd, grant_user);
|
res = mysql_show_grants(thd, grant_user);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -226,8 +226,8 @@ inline bool is_supported_parser_charset(CHARSET_INFO *cs)
|
|||||||
&& wsrep_to_isolation_begin(thd, db_, table_, table_list_)) goto error;
|
&& wsrep_to_isolation_begin(thd, db_, table_, table_list_)) goto error;
|
||||||
|
|
||||||
#define WSREP_SYNC_WAIT(thd_, before_) \
|
#define WSREP_SYNC_WAIT(thd_, before_) \
|
||||||
if (WSREP_CLIENT(thd_) && \
|
{ if (WSREP_CLIENT(thd_) && \
|
||||||
wsrep_sync_wait(thd_, before_)) goto error;
|
wsrep_sync_wait(thd_, before_)) goto error; }
|
||||||
|
|
||||||
#else
|
#else
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user