mirror of
https://github.com/MariaDB/server.git
synced 2025-01-16 03:52:35 +01:00
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().
This commit is contained in:
parent
08b6fd9395
commit
5667baad5d
3 changed files with 43 additions and 3 deletions
16
mysql-test/suite/galera/r/MDEV-25562.result
Normal file
16
mysql-test/suite/galera/r/MDEV-25562.result
Normal file
|
@ -0,0 +1,16 @@
|
|||
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;
|
23
mysql-test/suite/galera/t/MDEV-25562.test
Normal file
23
mysql-test/suite/galera/t/MDEV-25562.test
Normal file
|
@ -0,0 +1,23 @@
|
|||
#
|
||||
# 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 */
|
||||
|
|
Loading…
Reference in a new issue