Debian Codegraph @

mysql-test/suite/innodb/t/shrink_cached_undo.test

raw
1 --source include/have_innodb.inc
2 --source include/have_sequence.inc
3 --source include/have_debug.inc
4 --source include/not_embedded.inc
5 --source include/big_test.inc
6 --echo #
7 --echo # MDEV-35398 Improve shrinking of system tablespace
8 --echo #
9 # Make pre-10.6.13 version data directory which skips the
10 # purging of cached undo log records
11 let $restart_parameters=--debug_dbug=d,skip_cached_undo;
12 --source include/restart_mysqld.inc
13 SET GLOBAL innodb_file_per_table= 0;
14 CREATE TABLE t1(f1 INT PRIMARY KEY)ENGINE=InnoDB;
15 CREATE TABLE t2(f1 INT PRIMARY KEY)ENGINE=InnoDB;
16
17 SET STATEMENT unique_checks=0,foreign_key_checks=0 FOR
18 INSERT INTO t1 SELECT seq FROM seq_1_to_24576;
19 SET STATEMENT unique_checks=0,foreign_key_checks=0 FOR
20 INSERT INTO t2 SELECT seq FROM seq_1_to_24576;
21
22 --echo # Insert 34 transaction which has undo cached records
23 --disable_query_log
24 let $c = 34;
25 while ($c)
26 {
27 connect (con$c,localhost,root,,);
28 START TRANSACTION;
29 eval INSERT INTO t1 SELECT seq+$c*32768 FROM seq_1_to_3753;
30 dec $c;
31 }
32
33 connection default;
34 let $c = 34;
35 while ($c)
36 {
37 disconnect con$c;
38 dec $c;
39 }
40 --enable_query_log
41
42 DROP TABLE t2, t1;
43 SET GLOBAL innodb_fast_shutdown=0;
44 SELECT NAME, FILE_SIZE FROM information_schema.innodb_sys_tablespaces WHERE SPACE = 0;
45 let $restart_parameters=;
46 --source include/restart_mysqld.inc
47 SELECT NAME, FILE_SIZE FROM information_schema.innodb_sys_tablespaces WHERE SPACE = 0;