11
11
--source include/not_valgrind.inc
12
12
# This test is slow on buildbot.
13
13
--source include/big_test.inc
14
+ --source include/have_sequence.inc
15
+
16
+ call mtr.add_suppression("InnoDB: innodb_read_only prevents crash recovery");
17
+ call mtr.add_suppression("Plugin initialization aborted at srv0start\\.cc");
18
+ call mtr.add_suppression("Plugin 'InnoDB'");
19
+ FLUSH TABLES;
14
20
15
21
CREATE TABLE t1(
16
22
a INT AUTO_INCREMENT PRIMARY KEY,
@@ -27,25 +33,12 @@ ENGINE=InnoDB STATS_PERSISTENT=0;
27
33
# change buffering is possible, so that the change buffer will be used
28
34
# whenever possible.
29
35
SET GLOBAL innodb_change_buffering_debug = 1;
30
- let SEARCH_FILE = $MYSQLTEST_VARDIR/tmp/my_restart .err;
36
+ let SEARCH_FILE = $MYSQLTEST_VARDIR/log/mysqld.1 .err;
31
37
32
38
# Create enough rows for the table, so that the change buffer will be
33
39
# used for modifying the secondary index page. There must be multiple
34
40
# index pages, because changes to the root page are never buffered.
35
- INSERT INTO t1 VALUES(0,'x',1);
36
- INSERT INTO t1 SELECT 0,b,c FROM t1;
37
- INSERT INTO t1 SELECT 0,b,c FROM t1;
38
- INSERT INTO t1 SELECT 0,b,c FROM t1;
39
- INSERT INTO t1 SELECT 0,b,c FROM t1;
40
- INSERT INTO t1 SELECT 0,b,c FROM t1;
41
- INSERT INTO t1 SELECT 0,b,c FROM t1;
42
- INSERT INTO t1 SELECT 0,b,c FROM t1;
43
- INSERT INTO t1 SELECT 0,b,c FROM t1;
44
- INSERT INTO t1 SELECT 0,b,c FROM t1;
45
- INSERT INTO t1 SELECT 0,b,c FROM t1;
46
- INSERT INTO t1 SELECT 0,b,c FROM t1;
47
- INSERT INTO t1 SELECT 0,b,c FROM t1;
48
- INSERT INTO t1 SELECT 0,b,c FROM t1;
41
+ INSERT INTO t1 SELECT 0,'x',1 FROM seq_1_to_8192;
49
42
50
43
BEGIN;
51
44
SELECT b FROM t1 LIMIT 3;
@@ -63,10 +56,26 @@ SET DEBUG_DBUG='+d,crash_after_log_ibuf_upd_inplace';
63
56
SELECT b FROM t1 LIMIT 3;
64
57
disconnect con1;
65
58
connection default;
66
-
67
59
let SEARCH_PATTERN=Wrote log record for ibuf update in place operation;
68
60
--source include/search_pattern_in_file.inc
61
+
62
+ --let $restart_parameters= --innodb-read-only
69
63
--source include/start_mysqld.inc
64
+ CHECK TABLE t1;
65
+ --source include/shutdown_mysqld.inc
66
+ let SEARCH_PATTERN=innodb_read_only prevents crash recovery;
67
+ --source include/search_pattern_in_file.inc
70
68
69
+ --let $restart_parameters= --innodb-force-recovery=5
70
+ --source include/start_mysqld.inc
71
+ SELECT * FROM t1 LIMIT 1;
72
+ replace_regex /.*operations:.* (insert.*), delete \d.*discarded .*/\1/;
73
+ SHOW ENGINE INNODB STATUS;
74
+ # Slow shutdown will not merge the changes due to innodb_force_recovery=5.
75
+ SET GLOBAL innodb_fast_shutdown=0;
76
+ --let $restart_parameters=
77
+ --source include/restart_mysqld.inc
71
78
CHECK TABLE t1;
79
+ replace_regex /.*operations:.* (insert.*), delete \d.*discarded .*/\1/;
80
+ SHOW ENGINE INNODB STATUS;
72
81
DROP TABLE t1;
0 commit comments