summaryrefslogtreecommitdiffstats
path: root/mysql-test/suite/innodb/r/undo_upgrade.result
blob: f2eca9e2a7ca7780f70d6ee4fffde8d92f1b7aaf (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
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
#
#  MDEV-19229 Allow innodb_undo_tablespaces to be changed
#	after database creation
#
call mtr.add_suppression("Found .* prepared XA transactions");
call mtr.add_suppression("InnoDB: Plugin initialization aborted");
call mtr.add_suppression("Plugin 'InnoDB' init function returned error");
call mtr.add_suppression("Plugin 'InnoDB' registration as a STORAGE ENGINE failed");
call mtr.add_suppression("InnoDB: Cannot change innodb_undo_tablespaces=\\d+ because previous shutdown was not with innodb_fast_shutdown=0");
CREATE TABLE t1(f1 INT NOT NULL)ENGINE=InnoDB;
# case 1: XA transaction alone left
InnoDB		0 transactions not purged
XA START 'zombie';
INSERT INTO t1 VALUES(2);
XA END 'zombie';
XA PREPARE 'zombie';
# restart
# Display 4 undo tablespaces
select @@global.innodb_undo_tablespaces;
@@global.innodb_undo_tablespaces
4
# Should list 4 undo log tablespaces
undo001
undo002
undo003
undo004
XA COMMIT 'zombie';
# case 2: Successful innodb_undo_tablespace upgrade
SET GLOBAL innodb_fast_shutdown=0;
# restart: --innodb_undo_tablespaces=2
# Display 2 undo tablespaces
SELECT @@global.innodb_undo_tablespaces;
@@global.innodb_undo_tablespaces
2
# Should list 2 undo log tablespaces
undo001
undo002
DROP TABLE t1;
InnoDB		0 transactions not purged
# case 3: Reduce the innodb_undo_tablespace to 0
# restart: --innodb_undo_tablespaces=0
# Display 0 undo tablespace
SELECT @@global.innodb_undo_tablespaces;
@@global.innodb_undo_tablespaces
0
# Shouldn't list any undo log tablespaces
# case 4: Change undo tablespace when force_recovery < 5
# restart: --innodb_undo_tablespaces=2 --innodb_force_recovery=4
# Display 2 undo tablespace
SELECT @@global.innodb_undo_tablespaces;
@@global.innodb_undo_tablespaces
2
# Should list 2 undo log tablespaces
undo001
undo002
# case 5: Fail to change undo tablespace when force_recovery > 4
# restart: --innodb_undo_tablespaces=4 --innodb_force_recovery=5
# Display 2 undo tablespace
SELECT @@global.innodb_undo_tablespaces;
@@global.innodb_undo_tablespaces
2
# Should list 2 undo log tablespaces, not 4
undo001
undo002