Commit a38b937b authored by Jan Lindström's avatar Jan Lindström

MDEV-25201 : Assertion `thd->wsrep_trx_meta.gtid.seqno == (-1)' failed in int...

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.
parent e32c21cb
...@@ -7,6 +7,7 @@ CREATE TABLE t1(i INT) ENGINE=INNODB; ...@@ -7,6 +7,7 @@ CREATE TABLE t1(i INT) ENGINE=INNODB;
CREATE TABLE t2(i INT) ENGINE=MYISAM; CREATE TABLE t2(i INT) ENGINE=MYISAM;
Warnings: Warnings:
Note 1266 Using storage engine InnoDB for table 't2' Note 1266 Using storage engine InnoDB for table 't2'
Note 1266 Using storage engine InnoDB for table 't2'
connection node_2; connection node_2;
SHOW TABLES; SHOW TABLES;
Tables_in_test Tables_in_test
......
...@@ -35,3 +35,12 @@ SELECT COUNT(*) = 0 FROM t2; ...@@ -35,3 +35,12 @@ SELECT COUNT(*) = 0 FROM t2;
COUNT(*) = 0 COUNT(*) = 0
1 1
DROP TABLE t1, t2, t3; 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;
...@@ -34,3 +34,16 @@ SELECT COUNT(*) = 0 FROM t2; ...@@ -34,3 +34,16 @@ SELECT COUNT(*) = 0 FROM t2;
SELECT COUNT(*) = 0 FROM t2; SELECT COUNT(*) = 0 FROM t2;
DROP TABLE t1, t2, t3; 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;
...@@ -4227,6 +4227,7 @@ bool open_tables(THD *thd, const DDL_options_st &options, ...@@ -4227,6 +4227,7 @@ bool open_tables(THD *thd, const DDL_options_st &options,
wsrep_thd_exec_mode(thd) == LOCAL_STATE && wsrep_thd_exec_mode(thd) == LOCAL_STATE &&
!is_stat_table((*start)->db, (*start)->alias) && !is_stat_table((*start)->db, (*start)->alias) &&
thd->get_command() != COM_STMT_PREPARE && thd->get_command() != COM_STMT_PREPARE &&
!thd->stmt_arena->is_stmt_prepare() &&
((thd->lex->sql_command == SQLCOM_INSERT || ((thd->lex->sql_command == SQLCOM_INSERT ||
thd->lex->sql_command == SQLCOM_INSERT_SELECT || thd->lex->sql_command == SQLCOM_INSERT_SELECT ||
thd->lex->sql_command == SQLCOM_REPLACE || thd->lex->sql_command == SQLCOM_REPLACE ||
......
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