File: undo_leak_fail.test

package info (click to toggle)
mariadb 1%3A11.8.3-1
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 772,520 kB
  • sloc: ansic: 2,414,714; cpp: 1,791,394; asm: 381,336; perl: 62,905; sh: 49,647; pascal: 40,897; java: 39,363; python: 20,791; yacc: 20,432; sql: 17,907; xml: 12,344; ruby: 8,544; cs: 6,542; makefile: 6,145; ada: 1,879; lex: 1,193; javascript: 996; objc: 80; tcl: 73; awk: 46; php: 22
file content (119 lines) | stat: -rw-r--r-- 5,703 bytes parent folder | download | duplicates (2)
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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
--source include/have_innodb.inc
--source include/have_sequence.inc
--source include/have_debug.inc
--source include/not_embedded.inc

call mtr.add_suppression("InnoDB: Cannot free the unused segments in system tablespace because a previous shutdown was not with innodb_fast_shutdown=0");
call mtr.add_suppression("InnoDB: :autoshrink failed to read the used segment");
call mtr.add_suppression("InnoDB: :autoshrink failed due to .* in FSP_SEG_INODES_FULL list");
call mtr.add_suppression("InnoDB: :autoshrink failed due to .* in FSP_SEG_INODES_FREE list");
call mtr.add_suppression("InnoDB: :autoshrink failed to free the segment");
call mtr.add_suppression("Found .* prepared XA transactions");
SELECT NAME, FILE_SIZE FROM information_schema.innodb_sys_tablespaces WHERE SPACE = 0;

SET GLOBAL INNODB_FILE_PER_TABLE=0;
CREATE TABLE t1(f1 INT NOT NULL, f2 INT NOT NULL)STATS_PERSISTENT=0, ENGINE=InnoDB;
XA START 'x';
insert into t1 values (1, 1);
XA END 'x';
XA PREPARE 'x';
set GLOBAL innodb_fast_shutdown=0;
--source include/restart_mysqld.inc
--echo # Fail to free the segment due to XA PREPARE transaction
let SEARCH_PATTERN= InnoDB: Cannot free the unused segments in system tablespace because a previous shutdown was not with innodb_fast_shutdown=0;
let SEARCH_FILE= $MYSQLTEST_VARDIR/log/mysqld.1.err;
--source include/search_pattern_in_file.inc
XA COMMIT 'x';
DROP TABLE t1;

let $restart_parameters=--debug_dbug=d,undo_segment_leak;
--source include/restart_mysqld.inc
SET GLOBAL INNODB_FILE_PER_TABLE=0;
CREATE TABLE t1(f1 INT NOT NULL, f2 INT NOT NULL)STATS_PERSISTENT=0, ENGINE=InnoDB;
INSERT INTO t1 SELECT seq, seq FROM seq_1_to_4096;
INSERT INTO t1 SELECT seq, seq FROM seq_1_to_4096;
INSERT INTO t1 SELECT seq, seq FROM seq_1_to_4096;
INSERT INTO t1 SELECT seq, seq FROM seq_1_to_4096;
INSERT INTO t1 SELECT seq, seq FROM seq_1_to_4096;
INSERT INTO t1 SELECT seq, seq FROM seq_1_to_4096;
UPDATE t1 SET f1 = f1 + 1 WHERE f1 > 1000;
UPDATE t1 SET f2 = f2 + 1 WHERE f1 > 1000;
UPDATE t1 SET f1 = f2 + 1 WHERE f1 > 1000;
UPDATE t1 SET f2 = f1 + 1 WHERE f1 > 1000;
DELETE FROM t1;
DROP TABLE t1;
SELECT NAME, FILE_SIZE FROM information_schema.innodb_sys_tablespaces WHERE SPACE = 0;
let $shutdown_timeout=0;
let $restart_parameters=--debug_dbug=d,unused_undo_free_fail_1;
--source include/restart_mysqld.inc

let $shutdown_timeout=;
--echo # Fail to free the segment due to previous shutdown
--let SEARCH_PATTERN= InnoDB: Cannot free the unused segments in system tablespace because a previous shutdown was not with innodb_fast_shutdown=0.*

let SEARCH_FILE= $MYSQLTEST_VARDIR/log/mysqld.1.err;
--source include/search_pattern_in_file.inc

SELECT NAME, FILE_SIZE FROM information_schema.innodb_sys_tablespaces WHERE SPACE = 0;
SET GLOBAL innodb_fast_shutdown= 0;

--echo # Fail to free the segment while finding the used segments
let $restart_parameters=--debug_dbug=d,unused_undo_free_fail_2;
--source include/restart_mysqld.inc
SELECT IF(file_size>10485760,'ok',file_size) FROM information_schema.innodb_sys_tablespaces WHERE space=0;
let SEARCH_PATTERN= InnoDB: :autoshrink failed to read the used segment;
let SEARCH_FILE= $MYSQLTEST_VARDIR/log/mysqld.1.err;
--source include/search_pattern_in_file.inc

let SEARCH_PATTERN= InnoDB: :autoshrink failed due to .* in FSP_SEG_INODES_FULL list;
--source include/search_pattern_in_file.inc
SET GLOBAL innodb_fast_shutdown= 0;

--echo # Fail to free the segment while finding the used segments
let $restart_parameters=--debug_dbug=d,unused_undo_free_fail_3;
--source include/restart_mysqld.inc
SELECT IF(file_size>10485760,'ok',file_size) FROM information_schema.innodb_sys_tablespaces WHERE space=0;

let SEARCH_PATTERN= InnoDB: :autoshrink failed due to .* in FSP_SEG_INODES_FREE list;
let SEARCH_FILE= $MYSQLTEST_VARDIR/log/mysqld.1.err;
--source include/search_pattern_in_file.inc
SET GLOBAL innodb_fast_shutdown= 0;

--echo # Fail to free the segment while freeing the unused segments
let $restart_parameters=--debug_dbug=d,unused_undo_free_fail_4;
--source include/restart_mysqld.inc
SELECT IF(file_size>10485760,'ok',file_size) FROM information_schema.innodb_sys_tablespaces WHERE space=0;

let SEARCH_PATTERN= InnoDB: :autoshrink failed to free the segment .* in page .*;
let SEARCH_FILE= $MYSQLTEST_VARDIR/log/mysqld.1.err;
--source include/search_pattern_in_file.inc

SET GLOBAL innodb_fast_shutdown= 0;

--echo # Fail to free the segment while freeing the used segments
let $restart_parameters=--debug_dbug=d,unused_undo_free_fail_5;
--source include/restart_mysqld.inc
SELECT IF(file_size>10485760,'ok',file_size) FROM information_schema.innodb_sys_tablespaces WHERE space=0;

let SEARCH_PATTERN= InnoDB: :autoshrink failed to free the segment .* in page .*;
let SEARCH_FILE= $MYSQLTEST_VARDIR/log/mysqld.1.err;
--source include/search_pattern_in_file.inc

SET GLOBAL innodb_fast_shutdown= 0;
let $restart_parameters=;
--source include/restart_mysqld.inc
SELECT NAME, FILE_SIZE FROM information_schema.innodb_sys_tablespaces WHERE SPACE = 0;

--echo # Fail to reset the TRX_SYS_FSEG_HEADER during undo tablespace
--echo # reinitialization. garbage_collect() shouldn't free the
--echo # TRX_SYS_FSEG_HEADER index node
set global innodb_fast_shutdown=0;
let $restart_parameters=--innodb_undo_tablespaces=2 --debug_dbug=d,sys_fseg_header_fail;
--source include/restart_mysqld.inc
let SEARCH_PATTERN= InnoDB: :autoshrink freed the segment .* in page .*;
let SEARCH_FILE= $MYSQLTEST_VARDIR/log/mysqld.1.err;
--source include/search_pattern_in_file.inc
let $restart_parameters=;
set global innodb_fast_shutdown=0;
--source include/restart_mysqld.inc
SELECT NAME, FILE_SIZE FROM information_schema.innodb_sys_tablespaces WHERE SPACE = 0;