summaryrefslogtreecommitdiff
path: root/mysql-test/suite/innodb/t/stat_tables.test
blob: dd18c265e990363dbe3206674e40a2678c15a5aa (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
source include/have_innodb.inc;

#
# MDEV-20354 All but last insert ignored in InnoDB tables when table locked
#
rename table mysql.table_stats to mysql.table_stats_save;
flush tables;
set use_stat_tables= PREFERABLY;
create table t1 (a int) engine=InnoDB;
start transaction;
insert t1 values (1);
insert t1 values (2);
commit;
select * from t1;
drop table t1;
rename table mysql.table_stats_save to mysql.table_stats;
flush tables;

--echo #
--echo # MDEV-26753 Assertion state == TRX_STATE_PREPARED ||... failed
--echo #
CREATE TABLE t1(a INT PRIMARY KEY) ENGINE=InnoDB;
XA START 'test';
SELECT COUNT(*)>0 FROM mysql.innodb_index_stats LOCK IN SHARE MODE;
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;

--echo # End of 10.6 tests