1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-30 16:24:05 +03:00

MDEV-25201 : Assertion `thd->wsrep_trx_meta.gtid.seqno == (-1)' failed in int wsrep_to_isolation_begin(THD*, const char*, const char*, const TABLE_LIST*, Alter_info*)

Test case does not assert anymore but works incorrectly. We should
not replicate PREPARE using TOI.
This commit is contained in:
Jan Lindström
2022-01-09 09:37:44 +02:00
parent e32c21cb93
commit a38b937bf1
4 changed files with 24 additions and 0 deletions

View File

@ -7,6 +7,7 @@ CREATE TABLE t1(i INT) ENGINE=INNODB;
CREATE TABLE t2(i INT) ENGINE=MYISAM;
Warnings:
Note 1266 Using storage engine InnoDB for table 't2'
Note 1266 Using storage engine InnoDB for table 't2'
connection node_2;
SHOW TABLES;
Tables_in_test

View File

@ -35,3 +35,12 @@ SELECT COUNT(*) = 0 FROM t2;
COUNT(*) = 0
1
DROP TABLE t1, t2, t3;
SET SESSION lock_wait_timeout=2;
SET GLOBAL wsrep_replicate_myisam= ON;
CREATE TEMPORARY TABLE t1 (i INT, PRIMARY KEY pk (i)) ENGINE=MyISAM;
PREPARE stmt FROM "INSERT INTO t1 (id) SELECT * FROM (SELECT 4 AS i) AS y";
INSERT INTO t1 VALUES(4);
DEALLOCATE PREPARE stmt;
COMMIT;
DROP TABLE t1;
SET GLOBAL wsrep_replicate_myisam=OFF;

View File

@ -34,3 +34,16 @@ SELECT COUNT(*) = 0 FROM t2;
SELECT COUNT(*) = 0 FROM t2;
DROP TABLE t1, t2, t3;
#
# MDEV-25201 : Assertion `thd->wsrep_trx_meta.gtid.seqno == (-1)' failed in int wsrep_to_isolation_begin(THD*, const char*, const char*, const TABLE_LIST*, Alter_info*)
#
SET SESSION lock_wait_timeout=2;
SET GLOBAL wsrep_replicate_myisam= ON;
CREATE TEMPORARY TABLE t1 (i INT, PRIMARY KEY pk (i)) ENGINE=MyISAM;
PREPARE stmt FROM "INSERT INTO t1 (id) SELECT * FROM (SELECT 4 AS i) AS y";
INSERT INTO t1 VALUES(4);
DEALLOCATE PREPARE stmt;
COMMIT;
DROP TABLE t1;
SET GLOBAL wsrep_replicate_myisam=OFF;

View File

@ -4227,6 +4227,7 @@ restart:
wsrep_thd_exec_mode(thd) == LOCAL_STATE &&
!is_stat_table((*start)->db, (*start)->alias) &&
thd->get_command() != COM_STMT_PREPARE &&
!thd->stmt_arena->is_stmt_prepare() &&
((thd->lex->sql_command == SQLCOM_INSERT ||
thd->lex->sql_command == SQLCOM_INSERT_SELECT ||
thd->lex->sql_command == SQLCOM_REPLACE ||