Files
MariaDB-open-code/mysql-test/suite/galera_sr/t/MDEV-27553.test
Daniele Sciascia 49e3bd2cbc MDEV-27553 Assertion `inited==INDEX' failed: in ha_index_end()
In wsrep_schema code, call ha_index_end() only if the corresponding
ha_index_init() call succeeded.

Reviewed-by: Jan Lindström <jan.lindstrom@mariadb.com>
2022-01-24 09:46:21 +02:00

33 lines
860 B
Plaintext

#
# MDEV-27553 Assertion `inited==INDEX' failed: int handler::ha_index_end()
#
--source include/galera_cluster.inc
CREATE TABLE t1 (f1 INTEGER PRIMARY KEY);
--connection node_1
--let $wsrep_cluster_address_orig = `SELECT @@wsrep_cluster_address`
SET SESSION wsrep_trx_fragment_size=1;
START TRANSACTION;
INSERT INTO t1 VALUES (1);
# This will result in failure to remove fragments
# from streaming log, in the following ROLLBACK.
SET @@global.debug_dbug="+d,ha_index_init_fail";
ROLLBACK;
--connection node_2
SELECT COUNT(*) `Expect 0` FROM mysql.wsrep_streaming_log;
--connection node_1
SET @@global.debug_dbug="";
SELECT COUNT(*) `Expect 1` FROM mysql.wsrep_streaming_log;
SET SESSION wsrep_on=OFF;
DELETE FROM mysql.wsrep_streaming_log;
SET SESSION wsrep_on=ON;
DROP TABLE t1;
CALL mtr.add_suppression("WSREP: Failed to init table for index scan");