MDEV-6832: ER_LOCK_WAIT_TIMEOUT on SHOW STATUS
Synchronous read view should not be needed for SHOW commands.
This commit is contained in:
parent
96e505e4b7
commit
25aaa652c4
11
mysql-test/suite/wsrep/r/mdev_6832.result
Normal file
11
mysql-test/suite/wsrep/r/mdev_6832.result
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
#
|
||||||
|
# MDEV-6832: ER_LOCK_WAIT_TIMEOUT on SHOW STATUS
|
||||||
|
#
|
||||||
|
SHOW STATUS LIKE 'wsrep_ready';
|
||||||
|
Variable_name Value
|
||||||
|
wsrep_ready ON
|
||||||
|
SHOW STATUS LIKE 'wsrep_ready';
|
||||||
|
Variable_name Value
|
||||||
|
wsrep_ready OFF
|
||||||
|
SET @@global.wsrep_cluster_address='gcomm://';
|
||||||
|
# End of test.
|
@ -141,7 +141,6 @@ SET GLOBAL wsrep_provider=none;
|
|||||||
#
|
#
|
||||||
# MDEV#6206: wsrep_slave_threads subtracts from max_connections
|
# MDEV#6206: wsrep_slave_threads subtracts from max_connections
|
||||||
#
|
#
|
||||||
call mtr.add_suppression("safe_mutex: Found wrong usage of mutex 'LOCK_wsrep_slave_threads' and 'LOCK_global_system_variables'");
|
|
||||||
call mtr.add_suppression("WSREP: Failed to get provider options");
|
call mtr.add_suppression("WSREP: Failed to get provider options");
|
||||||
SELECT @@global.wsrep_provider;
|
SELECT @@global.wsrep_provider;
|
||||||
@@global.wsrep_provider
|
@@global.wsrep_provider
|
||||||
|
1
mysql-test/suite/wsrep/t/mdev_6832.opt
Normal file
1
mysql-test/suite/wsrep/t/mdev_6832.opt
Normal file
@ -0,0 +1 @@
|
|||||||
|
--wsrep-provider=$WSREP_PROVIDER --wsrep-cluster-address=gcomm:// --wsrep_provider_options='base_port=$GALERA_BASE_PORT' --wsrep-on=1 --wsrep_causal_reads=ON
|
15
mysql-test/suite/wsrep/t/mdev_6832.test
Normal file
15
mysql-test/suite/wsrep/t/mdev_6832.test
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
--source include/have_wsrep_provider.inc
|
||||||
|
--source include/have_binlog_format_row.inc
|
||||||
|
|
||||||
|
--echo #
|
||||||
|
--echo # MDEV-6832: ER_LOCK_WAIT_TIMEOUT on SHOW STATUS
|
||||||
|
--echo #
|
||||||
|
|
||||||
|
SHOW STATUS LIKE 'wsrep_ready';
|
||||||
|
--disable_query_log
|
||||||
|
eval SET @@global.wsrep_provider='$WSREP_PROVIDER';
|
||||||
|
--enable_query_log
|
||||||
|
SHOW STATUS LIKE 'wsrep_ready';
|
||||||
|
SET @@global.wsrep_cluster_address='gcomm://';
|
||||||
|
|
||||||
|
--echo # End of test.
|
@ -78,7 +78,6 @@ SET GLOBAL wsrep_provider=none;
|
|||||||
--echo #
|
--echo #
|
||||||
--echo # MDEV#6206: wsrep_slave_threads subtracts from max_connections
|
--echo # MDEV#6206: wsrep_slave_threads subtracts from max_connections
|
||||||
--echo #
|
--echo #
|
||||||
call mtr.add_suppression("safe_mutex: Found wrong usage of mutex 'LOCK_wsrep_slave_threads' and 'LOCK_global_system_variables'");
|
|
||||||
call mtr.add_suppression("WSREP: Failed to get provider options");
|
call mtr.add_suppression("WSREP: Failed to get provider options");
|
||||||
|
|
||||||
--disable_query_log
|
--disable_query_log
|
||||||
|
@ -2754,10 +2754,10 @@ mysql_execute_command(THD *thd)
|
|||||||
#endif
|
#endif
|
||||||
case SQLCOM_SHOW_STATUS:
|
case SQLCOM_SHOW_STATUS:
|
||||||
{
|
{
|
||||||
#ifdef WITH_WSREP
|
|
||||||
if (WSREP_CLIENT(thd) && wsrep_sync_wait(thd)) goto error;
|
|
||||||
#endif /* WITH_WSREP */
|
|
||||||
execute_show_status(thd, all_tables);
|
execute_show_status(thd, all_tables);
|
||||||
|
#ifdef WITH_WSREP
|
||||||
|
wsrep_free_status(thd);
|
||||||
|
#endif /* WITH_WSREP */
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case SQLCOM_SHOW_EXPLAIN:
|
case SQLCOM_SHOW_EXPLAIN:
|
||||||
|
@ -365,7 +365,14 @@ bool wsrep_cluster_address_update (sys_var *self, THD* thd, enum_var_type type)
|
|||||||
*/
|
*/
|
||||||
mysql_mutex_unlock(&LOCK_global_system_variables);
|
mysql_mutex_unlock(&LOCK_global_system_variables);
|
||||||
wsrep_stop_replication(thd);
|
wsrep_stop_replication(thd);
|
||||||
|
|
||||||
|
/*
|
||||||
|
Unlock and lock LOCK_wsrep_slave_threads to maintain lock order & avoid
|
||||||
|
any potential deadlock.
|
||||||
|
*/
|
||||||
|
mysql_mutex_unlock(&LOCK_wsrep_slave_threads);
|
||||||
mysql_mutex_lock(&LOCK_global_system_variables);
|
mysql_mutex_lock(&LOCK_global_system_variables);
|
||||||
|
mysql_mutex_lock(&LOCK_wsrep_slave_threads);
|
||||||
|
|
||||||
if (wsrep_start_replication())
|
if (wsrep_start_replication())
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user