~ubuntu-branches/ubuntu/utopic/mariadb-5.5/utopic-security

« back to all changes in this revision

Viewing changes to mysql-test/suite/innodb/t/innodb-change-buffer-recovery.test

  • Committer: Package Import Robot
  • Author(s): Otto Kekäläinen, Otto Kekäläinen, James Page
  • Date: 2014-03-02 01:38:26 UTC
  • mfrom: (2.1.2 sid)
  • Revision ID: package-import@ubuntu.com-20140302013826-z3afnfteqo86pccd
[ Otto Kekäläinen ]
* New upstream release.
* Updated Danish debconf translation (Closes: #739750).
* d/control: Added explicit Conflicts/Replaces for mysql-5.6 packages
  (Closes: #739841).
* d/control: Update for use of virtual-* packages for switching to/from
  MySQL alternatives.

[ James Page ]
* d/control: Drop Nicholas from Uploaders, MIA (Closes: #739360).
* d/control: Add libjemalloc-dev to BD's.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
--echo #
 
2
--echo # Bug#69122 - INNODB DOESN'T REDO-LOG INSERT BUFFER MERGE
 
3
--echo #             OPERATION IF IT IS DONE IN-PLACE
 
4
--echo #
 
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
 
12
 
 
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
 
16
# whenever possible.
 
17
SET GLOBAL innodb_change_buffering_debug = 1;
 
18
let SEARCH_FILE = $MYSQLTEST_VARDIR/tmp/my_restart.err;
 
19
 
 
20
CREATE TABLE t1(
 
21
        a INT AUTO_INCREMENT PRIMARY KEY,
 
22
        b CHAR(1),
 
23
        c INT,
 
24
        INDEX(b))
 
25
ENGINE=InnoDB;
 
26
 
 
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;
 
42
 
 
43
BEGIN;
 
44
SELECT b FROM t1 LIMIT 3;
 
45
 
 
46
connect (con1,localhost,root,,);
 
47
connection con1;
 
48
BEGIN;
 
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);
 
52
 
 
53
SET DEBUG_DBUG='+d,crash_after_log_ibuf_upd_inplace';
 
54
--exec echo "wait" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
 
55
--error 2013
 
56
# This should force a change buffer merge
 
57
SELECT b FROM t1 LIMIT 3;
 
58
 
 
59
let SEARCH_PATTERN=Wrote log record for ibuf update in place operation;
 
60
--source include/search_pattern_in_file.inc
 
61
 
 
62
# Write file to make mysql-test-run.pl start up the server again
 
63
--exec echo "restart" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
 
64
--enable_reconnect
 
65
--source include/wait_until_connected_again.inc
 
66
 
 
67
CHECK TABLE t1;
 
68
 
 
69
# Cleanup
 
70
DROP TABLE t1;