summaryrefslogtreecommitdiff
path: root/mysql-test/suite/innodb/t/redo_log_during_checkpoint.test
blob: 645ae8c78553e845a40d85f1d869955edd58c84d (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
65
66
67
68
69
70
71
72
73
74
75
76
--source include/have_innodb.inc
--source include/have_debug.inc
--source include/big_test.inc
# Embedded server tests do not support restarting
--source include/not_embedded.inc
# We are crashing the server on purpose
--source include/not_valgrind.inc
--source include/not_crashrep.inc

# The test does work with any page size, but we want to reduce the
# test running time by limiting the combinations. The redo log format
# is independent of the page size.
--source include/have_innodb_16k.inc

let $restart_noprint=2;
SET GLOBAL innodb_page_cleaner_disabled_debug = 1;
SET GLOBAL innodb_dict_stats_disabled_debug = 1;
SET GLOBAL innodb_master_thread_disabled_debug = 1;
SET GLOBAL innodb_log_checkpoint_now = 1;

CREATE DATABASE very_long_database_name;
USE very_long_database_name;
let $i=1300;
--disable_query_log
while ($i)
{
  eval CREATE TABLE veryLongTableNameToCreateMLOG_FILE_NAMErecords$i (a SERIAL)
  ENGINE=InnoDB;
  dec $i;
}
--enable_query_log

--let $_server_id= `SELECT @@server_id`
--let $_expect_file_name= $MYSQLTEST_VARDIR/tmp/mysqld.$_server_id.expect
--exec echo "wait" > $_expect_file_name

SET debug_dbug = '+d,increase_mtr_checkpoint_size';
SET debug_dbug = '+d,crash_after_checkpoint';
--error 2013
set global innodb_log_checkpoint_now = 1;

--echo # Skip MLOG_FILE_NAME redo records during recovery
--source include/start_mysqld.inc

DROP DATABASE very_long_database_name;

SET GLOBAL innodb_page_cleaner_disabled_debug = 1;
SET GLOBAL innodb_dict_stats_disabled_debug = 1;
SET GLOBAL innodb_master_thread_disabled_debug = 1;
SET GLOBAL innodb_log_checkpoint_now = 1;

--echo # Commit the multi-rec mini transaction if mtr size
--echo # exceeds LOG_CHECKPOINT_FREE_PER_THREAD size during checkpoint.

CREATE DATABASE very_long_database_name;
USE very_long_database_name;
let $i=1300;
--disable_query_log
while ($i)
{
  eval CREATE TABLE veryLongTableNameToCreateMLOG_FILE_NAMErecords$i (a SERIAL)
  ENGINE=InnoDB;
  dec $i;
}
--enable_query_log

--exec echo "wait" > $_expect_file_name
SET debug_dbug = '+d,crash_after_checkpoint';
--error 2013
set global innodb_log_checkpoint_now = 1;

--echo # Skip MLOG_FILE_NAME redo records during recovery
--let $restart_parameters = --debug-dbug=d,reduce_recv_parsing_buf
--source include/start_mysqld.inc

DROP DATABASE very_long_database_name;