2
--echo # Bug#69122 - INNODB DOESN'T REDO-LOG INSERT BUFFER MERGE
3
--echo # OPERATION IF IT IS DONE IN-PLACE
5
--source include/have_innodb.inc
6
# innodb_change_buffering_debug option is debug only
7
--source include/have_debug.inc
8
# Embedded server does not support crashing
9
--source include/not_embedded.inc
10
# DBUG_SUICIDE() hangs under valgrind
11
--source include/not_valgrind.inc
13
# The flag innodb_change_buffering_debug is only available in debug builds.
14
# It instructs InnoDB to try to evict pages from the buffer pool when
15
# change buffering is possible, so that the change buffer will be used
17
SET GLOBAL innodb_change_buffering_debug = 1;
18
let SEARCH_FILE = $MYSQLTEST_VARDIR/tmp/my_restart.err;
21
a INT AUTO_INCREMENT PRIMARY KEY,
27
# Create enough rows for the table, so that the change buffer will be
28
# used for modifying the secondary index page. There must be multiple
29
# index pages, because changes to the root page are never buffered.
30
INSERT INTO t1 VALUES(0,'x',1);
31
INSERT INTO t1 SELECT 0,b,c FROM t1;
32
INSERT INTO t1 SELECT 0,b,c FROM t1;
33
INSERT INTO t1 SELECT 0,b,c FROM t1;
34
INSERT INTO t1 SELECT 0,b,c FROM t1;
35
INSERT INTO t1 SELECT 0,b,c FROM t1;
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;
44
SELECT b FROM t1 LIMIT 3;
46
connect (con1,localhost,root,,);
49
DELETE FROM t1 WHERE a=1;
50
# This should be buffered, if innodb_change_buffering_debug = 1 is in effect.
51
INSERT INTO t1 VALUES(1,'X',1);
53
SET DEBUG_DBUG='+d,crash_after_log_ibuf_upd_inplace';
54
--exec echo "wait" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
56
# This should force a change buffer merge
57
SELECT b FROM t1 LIMIT 3;
59
let SEARCH_PATTERN=Wrote log record for ibuf update in place operation;
60
--source include/search_pattern_in_file.inc
62
# Write file to make mysql-test-run.pl start up the server again
63
--exec echo "restart" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
65
--source include/wait_until_connected_again.inc