1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-07 00:04:31 +03:00

MDEV-26753 Assertion state == TRX_STATE_PREPARED ||... failed

dict_stats_save(): Do not attempt to commit an already committed
transaction.
This commit is contained in:
Marko Mäkelä
2022-04-26 18:09:14 +03:00
parent 2ca1123464
commit 2c005261cb
3 changed files with 32 additions and 2 deletions

View File

@@ -13,3 +13,17 @@ a
drop table t1;
rename table mysql.table_stats_save to mysql.table_stats;
flush tables;
#
# MDEV-26753 Assertion state == TRX_STATE_PREPARED ||... failed
#
CREATE TABLE t1(a INT PRIMARY KEY) ENGINE=InnoDB;
XA START 'test';
SELECT COUNT(*)>0 FROM mysql.innodb_index_stats LOCK IN SHARE MODE;
COUNT(*)>0
1
INSERT INTO t1 VALUES (1),(2);
UPDATE mysql.innodb_table_stats SET last_update=NULL WHERE table_name='t1';
XA END 'test';
XA ROLLBACK 'test';
DROP TABLE t1;
# End of 10.6 tests