Debian Codegraph @

mysql-test/suite/innodb_zip/t/recover.test

raw
1 --source include/innodb_page_size_small.inc
2 --source include/not_embedded.inc
3
4 # This test kills the server, which could corrupt some mysql.* tables
5 # that are not created with ENGINE=InnoDB.
6 # Flush any non-InnoDB tables to prevent that from happening.
7 FLUSH TABLES;
8
9 --echo #
10 --echo # MDEV-21892 Assertion 'index != clust_index || row_get_rec_trx_id()'
11 --echo #
12 connect (con1,localhost,root);
13 CREATE TABLE t1 (pk INT PRIMARY KEY) ENGINE=InnoDB ROW_FORMAT=COMPRESSED;
14 INSERT INTO t1 VALUES (1),(2);
15 BEGIN;
16 --error ER_DUP_ENTRY
17 UPDATE t1 SET pk=1;
18 connection default;
19
20 --echo #
21 --echo # MDEV-12720 recovery fails with "Generic error"
22 --echo # for ROW_FORMAT=compressed
23 --echo #
24 CREATE TABLE a(i INT PRIMARY KEY AUTO_INCREMENT, s VARCHAR(255)) ENGINE=InnoDB
25 ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=1;
26
27 BEGIN;
28 insert into a(i) select null;
29 insert into a select null, uuid() from a a, a b, a c;
30 insert into a select null, uuid() from a a, a b, a c;
31 insert into a select null, uuid() from a a, a b, a c;
32 SET GLOBAL innodb_flush_log_at_trx_commit=1;
33 COMMIT;
34
35 --let $shutdown_timeout=0
36 --source include/restart_mysqld.inc
37 disconnect con1;
38
39 SELECT * FROM t1;
40 DROP TABLE t1;
41 SELECT COUNT(*) from a;
42 DROP TABLE a;