Commit 5667baad authored by mkaruza's avatar mkaruza Committed by Jan Lindström

MDEV-25562 Assertion `pause_seqno_.is_undefined() == false' failed in void...

MDEV-25562 Assertion `pause_seqno_.is_undefined() == false' failed in void wsrep::server_state::resume()

If pause() is not executed in galera and returns seqno = -1 we should
skip resume().
parent 08b6fd93
connection node_2;
connection node_1;
SET SESSION WSREP_ON=0;
FLUSH TABLES WITH READ LOCK AND DISABLE CHECKPOINT;
SET SESSION WSREP_ON=1;
UNLOCK TABLES;
SET GLOBAL wsrep_ignore_apply_errors=1;
CREATE TABLE t1 (a CHAR(1)) engine=innodb;
CREATE TABLE t1 (a CHAR(1)) engine=innodb;
ERROR 42S01: Table 't1' already exists
SHOW PROCEDURE STATUS WHERE db = 'test';
Db Name Type Definer Modified Created Security_type Comment character_set_client collation_connection Database Collation
SET GLOBAL read_only=1;
SET GLOBAL wsrep_ignore_apply_errors=DEFAULT;
SET GLOBAL read_only=DEFAULT;
DROP TABLE t1;
#
# MDEV-25562 Assertion `pause_seqno_.is_undefined() == false' failed in void wsrep::server_state::resume()
#
--source include/galera_cluster.inc
--source include/have_innodb.inc
SET SESSION WSREP_ON=0;
FLUSH TABLES WITH READ LOCK AND DISABLE CHECKPOINT;
SET SESSION WSREP_ON=1;
UNLOCK TABLES;
SET GLOBAL wsrep_ignore_apply_errors=1;
CREATE TABLE t1 (a CHAR(1)) engine=innodb;
--error ER_TABLE_EXISTS_ERROR
CREATE TABLE t1 (a CHAR(1)) engine=innodb;
SHOW PROCEDURE STATUS WHERE db = 'test';
SET GLOBAL read_only=1;
SET GLOBAL wsrep_ignore_apply_errors=DEFAULT;
SET GLOBAL read_only=DEFAULT;
DROP TABLE t1;
......@@ -1102,21 +1102,22 @@ void Global_read_lock::unlock_global_read_lock(THD *thd)
thd->mdl_context.release_lock(m_mdl_global_read_lock);
#ifdef WITH_WSREP
if (m_state == GRL_ACQUIRED_AND_BLOCKS_COMMIT)
if (m_state == GRL_ACQUIRED_AND_BLOCKS_COMMIT &&
wsrep_locked_seqno != WSREP_SEQNO_UNDEFINED)
{
Wsrep_server_state& server_state= Wsrep_server_state::instance();
if (server_state.state() == Wsrep_server_state::s_donor ||
(WSREP_NNULL(thd) &&
server_state.state() != Wsrep_server_state::s_synced))
{
/* TODO: maybe redundant here?: */
wsrep_locked_seqno= WSREP_SEQNO_UNDEFINED;
server_state.resume();
wsrep_locked_seqno= WSREP_SEQNO_UNDEFINED;
}
else if (WSREP_NNULL(thd) &&
server_state.state() == Wsrep_server_state::s_synced)
{
server_state.resume_and_resync();
wsrep_locked_seqno= WSREP_SEQNO_UNDEFINED;
}
}
#endif /* WITH_WSREP */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment