@@ -2805,11 +2805,14 @@ mysql_execute_command(THD *thd)
2805
2805
case SQLCOM_SHOW_COLLATIONS:
2806
2806
case SQLCOM_SHOW_STORAGE_ENGINES:
2807
2807
case SQLCOM_SHOW_PROFILE:
2808
- WSREP_SYNC_WAIT (thd, WSREP_SYNC_WAIT_BEFORE_SHOW);
2809
2808
case SQLCOM_SELECT:
2810
2809
{
2811
- if (lex->sql_command == SQLCOM_SELECT)
2812
- WSREP_SYNC_WAIT (thd, WSREP_SYNC_WAIT_BEFORE_READ);
2810
+ #ifdef WITH_WSREP
2811
+ if (lex->sql_command == SQLCOM_SELECT)
2812
+ WSREP_SYNC_WAIT (thd, WSREP_SYNC_WAIT_BEFORE_READ)
2813
+ else
2814
+ WSREP_SYNC_WAIT (thd, WSREP_SYNC_WAIT_BEFORE_SHOW)
2815
+ #endif /* WITH_WSREP */
2813
2816
2814
2817
thd->status_var .last_query_cost = 0.0 ;
2815
2818
@@ -2933,6 +2936,7 @@ case SQLCOM_PREPARE:
2933
2936
case SQLCOM_SHOW_RELAYLOG_EVENTS: /* fall through */
2934
2937
case SQLCOM_SHOW_BINLOG_EVENTS:
2935
2938
{
2939
+ WSREP_SYNC_WAIT (thd, WSREP_SYNC_WAIT_BEFORE_SHOW);
2936
2940
if (check_global_access (thd, REPL_SLAVE_ACL))
2937
2941
goto error;
2938
2942
res = mysql_show_binlog_events (thd);
@@ -3495,6 +3499,7 @@ case SQLCOM_PREPARE:
3495
3499
{
3496
3500
if (check_global_access (thd, SUPER_ACL | REPL_CLIENT_ACL))
3497
3501
goto error;
3502
+ WSREP_SYNC_WAIT (thd, WSREP_SYNC_WAIT_BEFORE_SHOW);
3498
3503
res = show_binlogs (thd);
3499
3504
break ;
3500
3505
}
@@ -4778,6 +4783,7 @@ case SQLCOM_PREPARE:
4778
4783
if (!grant_user)
4779
4784
goto error;
4780
4785
4786
+ WSREP_SYNC_WAIT (thd, WSREP_SYNC_WAIT_BEFORE_SHOW);
4781
4787
res = mysql_show_grants (thd, grant_user);
4782
4788
break ;
4783
4789
}
0 commit comments