Merge lp:~laurynas-biveinis/percona-server/BT-16274-bug1082437-5.1 into lp:percona-server/5.1

Proposed by Laurynas Biveinis
Status: Merged
Approved by: Stewart Smith
Approved revision: no longer in the source branch.
Merged at revision: 520
Proposed branch: lp:~laurynas-biveinis/percona-server/BT-16274-bug1082437-5.1
Merge into: lp:percona-server/5.1
Prerequisite: lp:~laurynas-biveinis/percona-server/BT-16724-xtradb-bmp-requests-5.1
Diff against target: 348 lines (+133/-116)
9 files modified
Percona-Server/mysql-test/suite/innodb_plugin/r/percona_changed_page_bmp.result (+4/-15)
Percona-Server/mysql-test/suite/innodb_plugin/r/percona_changed_page_bmp_crash.result (+32/-0)
Percona-Server/mysql-test/suite/innodb_plugin/r/percona_changed_page_bmp_no_restart.result (+0/-8)
Percona-Server/mysql-test/suite/innodb_plugin/t/percona_changed_page_bmp-master.opt (+1/-1)
Percona-Server/mysql-test/suite/innodb_plugin/t/percona_changed_page_bmp.test (+13/-60)
Percona-Server/mysql-test/suite/innodb_plugin/t/percona_changed_page_bmp_crash-master.opt (+1/-0)
Percona-Server/mysql-test/suite/innodb_plugin/t/percona_changed_page_bmp_crash.test (+82/-0)
Percona-Server/mysql-test/suite/innodb_plugin/t/percona_changed_page_bmp_no_restart-master.opt (+0/-1)
Percona-Server/mysql-test/suite/innodb_plugin/t/percona_changed_page_bmp_no_restart.test (+0/-31)
To merge this branch: bzr merge lp:~laurynas-biveinis/percona-server/BT-16274-bug1082437-5.1
Reviewer Review Type Date Requested Status
Stewart Smith (community) Approve
Review via email: mp+136422@code.launchpad.net
To post a comment you must log in.
Revision history for this message
Stewart Smith (stewart) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'Percona-Server/mysql-test/suite/innodb_plugin/r/percona_changed_page_bmp.result'
--- Percona-Server/mysql-test/suite/innodb_plugin/r/percona_changed_page_bmp.result 2013-01-22 16:28:47 +0000
+++ Percona-Server/mysql-test/suite/innodb_plugin/r/percona_changed_page_bmp.result 2013-01-31 11:37:26 +0000
@@ -29,27 +29,16 @@
29INSERT INTO t2 VALUES (1),(2),(3),(4),(5);29INSERT INTO t2 VALUES (1),(2),(3),(4),(5);
30ib_modified_log_130ib_modified_log_1
31ib_modified_log_231ib_modified_log_2
32SET GLOBAL INNODB_FAST_SHUTDOWN=2;
334th restart324th restart
33INSERT INTO t1 VALUES (1),(2),(3),(4),(5);
34ib_modified_log_134ib_modified_log_1
35ib_modified_log_235ib_modified_log_2
36ib_modified_log_3
375th restart365th restart
38INSERT INTO t1 VALUES (1),(2),(3),(4),(5);37INSERT INTO t1 VALUES (1),(2),(3),(4),(5);
39ib_modified_log_138ib_modified_log_1
396th restart
40call mtr.add_suppression("InnoDB: Warning: truncated block detected.*");
41ib_modified_log_1
40ib_modified_log_242ib_modified_log_2
417th restart437th restart
42INSERT INTO t1 VALUES (1),(2),(3),(4),(5);
43ib_modified_log_1
448th restart
45call mtr.add_suppression("InnoDB: Warning: truncated block detected.*");
46ib_modified_log_1
47ib_modified_log_2
489th restart
49INSERT INTO t1 SELECT x FROM t1;
50ERROR HY000: Lost connection to MySQL server during query
51INSERT INTO t1 VALUES (1),(2),(3),(4),(5);
52ib_modified_log_1
53ib_modified_log_2
5410th restart
55DROP TABLE t1, t2;44DROP TABLE t1, t2;
5645
=== added file 'Percona-Server/mysql-test/suite/innodb_plugin/r/percona_changed_page_bmp_crash.result'
--- Percona-Server/mysql-test/suite/innodb_plugin/r/percona_changed_page_bmp_crash.result 1970-01-01 00:00:00 +0000
+++ Percona-Server/mysql-test/suite/innodb_plugin/r/percona_changed_page_bmp_crash.result 2013-01-31 11:37:26 +0000
@@ -0,0 +1,32 @@
1RESET CHANGED_PAGE_BITMAPS;
2DROP TABLE IF EXISTS t1, t2;
3CREATE TABLE t1 (x INT) ENGINE=InnoDB;
4INSERT INTO t1 VALUES (1),(2),(3),(4),(5);
5INSERT INTO t1 VALUES (1),(2),(3),(4),(5);
6INSERT INTO t1 VALUES (1),(2),(3),(4),(5);
7INSERT INTO t1 SELECT x FROM t1;
8INSERT INTO t1 SELECT x FROM t1;
9INSERT INTO t1 SELECT x FROM t1;
10INSERT INTO t1 SELECT x FROM t1;
11INSERT INTO t1 SELECT x FROM t1;
12INSERT INTO t1 SELECT x FROM t1;
13INSERT INTO t1 SELECT x FROM t1;
14INSERT INTO t1 SELECT x FROM t1;
15INSERT INTO t1 SELECT x FROM t1;
16INSERT INTO t1 SELECT x FROM t1;
17INSERT INTO t1 SELECT x FROM t1;
18INSERT INTO t1 SELECT x FROM t1;
19CREATE TABLE t2 (x INT) ENGINE=InnoDB;
20INSERT INTO t2 VALUES (1),(2),(3),(4),(5);
21SET GLOBAL INNODB_FAST_SHUTDOWN=2;
221st restart
23ib_modified_log_1
24ib_modified_log_2
252nd restart
26INSERT INTO t1 SELECT x FROM t1;
27ERROR HY000: Lost connection to MySQL server during query
28INSERT INTO t1 VALUES (1),(2),(3),(4),(5);
29ib_modified_log_1
30ib_modified_log_2
31ib_modified_log_3
32DROP TABLE t1, t2;
033
=== removed file 'Percona-Server/mysql-test/suite/innodb_plugin/r/percona_changed_page_bmp_no_restart.result'
--- Percona-Server/mysql-test/suite/innodb_plugin/r/percona_changed_page_bmp_no_restart.result 2013-01-22 16:28:47 +0000
+++ Percona-Server/mysql-test/suite/innodb_plugin/r/percona_changed_page_bmp_no_restart.result 1970-01-01 00:00:00 +0000
@@ -1,8 +0,0 @@
1RESET CHANGED_PAGE_BITMAPS;
2DROP TABLE IF EXISTS t1, t2;
3CREATE TABLE t1 (x INT) ENGINE=InnoDB;
4INSERT INTO t1 VALUES (1),(2),(3),(4),(5);
5CREATE TABLE t2 (x INT) ENGINE=InnoDB;
6INSERT INTO t2 VALUES (1),(2),(3),(4),(5);
7ib_modified_log_1
8DROP TABLE t1, t2;
90
=== modified file 'Percona-Server/mysql-test/suite/innodb_plugin/t/percona_changed_page_bmp-master.opt'
--- Percona-Server/mysql-test/suite/innodb_plugin/t/percona_changed_page_bmp-master.opt 2012-06-14 09:16:03 +0000
+++ Percona-Server/mysql-test/suite/innodb_plugin/t/percona_changed_page_bmp-master.opt 2013-01-31 11:37:26 +0000
@@ -1,1 +1,1 @@
1--innodb_track_changed_pages=TRUE --innodb_log_file_size=1M --innodb_file_per_table --skip-stack-trace --skip-core-file1--innodb_track_changed_pages=TRUE --innodb_log_file_size=1M --innodb_file_per_table
22
=== modified file 'Percona-Server/mysql-test/suite/innodb_plugin/t/percona_changed_page_bmp.test'
--- Percona-Server/mysql-test/suite/innodb_plugin/t/percona_changed_page_bmp.test 2013-01-22 16:28:47 +0000
+++ Percona-Server/mysql-test/suite/innodb_plugin/t/percona_changed_page_bmp.test 2013-01-31 11:37:26 +0000
@@ -6,12 +6,7 @@
6# a checkpoint deterministically without generating a bunch of log data and restarts (which6# a checkpoint deterministically without generating a bunch of log data and restarts (which
7# then cause bitmap file rotations on their own).7# then cause bitmap file rotations on their own).
88
9--source include/not_embedded.inc
10--source include/not_crashrep.inc
11--source include/have_debug.inc
12--source include/have_innodb_plugin.inc9--source include/have_innodb_plugin.inc
13# Valgrind reports useless errors on very fast server shutdowns
14--source include/not_valgrind.inc
1510
16# Delete any existing bitmaps11# Delete any existing bitmaps
17--source include/restart_mysqld.inc12--source include/restart_mysqld.inc
@@ -108,33 +103,17 @@
108list_files $MYSQLD_DATADIR ib_modified_log*;103list_files $MYSQLD_DATADIR ib_modified_log*;
109104
110#105#
111# Test the very fast server shutdown106# Test that an empty existing bitmap file is handled properly when it's impossible to re-read the full missing range.
112# 107#
113108
114SET GLOBAL INNODB_FAST_SHUTDOWN=2;109--exec echo "wait" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
115110--shutdown_server 10
111--source include/wait_until_disconnected.inc
112remove_files_wildcard $MYSQLD_DATADIR ib_modified_log*;
113write_file $BITMAP_FILE;
114EOF
115--enable_reconnect
116--echo 4th restart116--echo 4th restart
117--source include/restart_mysqld.inc
118
119# TODO: check the tracked LSN range continuity once this info is exposed through
120# INFORMATION_SCHEMA.
121
122file_exists $BITMAP_FILE;
123--replace_regex /_[[:digit:]]+\.xdb$//
124list_files $MYSQLD_DATADIR ib_modified_log*;
125
126#
127# Test that an empty existing bitmap file is handled properly when it's impossible to re-read the full missing range.
128#
129
130--exec echo "wait" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
131--shutdown_server 10
132--source include/wait_until_disconnected.inc
133remove_files_wildcard $MYSQLD_DATADIR ib_modified_log*;
134write_file $BITMAP_FILE;
135EOF
136--enable_reconnect
137--echo 5th restart
138--exec echo "restart" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect117--exec echo "restart" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
139--source include/wait_until_connected_again.inc118--source include/wait_until_connected_again.inc
140119
@@ -154,7 +133,7 @@
154--source include/wait_until_disconnected.inc133--source include/wait_until_disconnected.inc
155remove_files_wildcard $MYSQLD_DATADIR ib_modified_log*;134remove_files_wildcard $MYSQLD_DATADIR ib_modified_log*;
156--enable_reconnect135--enable_reconnect
157--echo 7th restart136--echo 5th restart
158--exec echo "restart" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect137--exec echo "restart" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
159--source include/wait_until_connected_again.inc138--source include/wait_until_connected_again.inc
160139
@@ -171,7 +150,7 @@
171junk junk junk junk150junk junk junk junk
172EOF151EOF
173--enable_reconnect152--enable_reconnect
174--echo 8th restart153--echo 6th restart
175--exec echo "restart" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect154--exec echo "restart" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
176--source include/wait_until_connected_again.inc155--source include/wait_until_connected_again.inc
177call mtr.add_suppression("InnoDB: Warning: truncated block detected.*");156call mtr.add_suppression("InnoDB: Warning: truncated block detected.*");
@@ -184,32 +163,6 @@
184list_files $MYSQLD_DATADIR ib_modified_log*;163list_files $MYSQLD_DATADIR ib_modified_log*;
185164
186#165#
187# Test crash right before writing of new bitmap data
188#
189
190--exec echo "wait" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
191--shutdown_server 10
192--source include/wait_until_disconnected.inc
193--enable_reconnect
194--exec echo "restart:-#d,crash_before_bitmap_write" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
195--source include/wait_until_connected_again.inc
196--echo 9th restart
197--exec echo "restart" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
198--error 2013
199INSERT INTO t1 SELECT x FROM t1;
200--enable_reconnect
201--source include/wait_until_connected_again.inc
202
203INSERT INTO t1 VALUES (1),(2),(3),(4),(5);
204
205file_exists $BITMAP_FILE;
206--replace_regex /_[[:digit:]]+\.xdb$//
207list_files $MYSQLD_DATADIR ib_modified_log*;
208
209# TODO: check the tracked LSN range continuity once this info is exposed through
210# INFORMATION_SCHEMA.
211
212#
213# Test that last tracked LSN is determined correctly when the last bitmap file is fully166# Test that last tracked LSN is determined correctly when the last bitmap file is fully
214# corrupted167# corrupted
215#168#
@@ -238,7 +191,7 @@
238source $MYSQLD_DATADIR/corrupt_bmp_2.inc;191source $MYSQLD_DATADIR/corrupt_bmp_2.inc;
239remove_file $MYSQLD_DATADIR/corrupt_bmp_2.inc;192remove_file $MYSQLD_DATADIR/corrupt_bmp_2.inc;
240--enable_reconnect193--enable_reconnect
241--echo 10th restart194--echo 7th restart
242--exec echo "restart" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect195--exec echo "restart" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
243--source include/wait_until_connected_again.inc196--source include/wait_until_connected_again.inc
244197
245198
=== added file 'Percona-Server/mysql-test/suite/innodb_plugin/t/percona_changed_page_bmp_crash-master.opt'
--- Percona-Server/mysql-test/suite/innodb_plugin/t/percona_changed_page_bmp_crash-master.opt 1970-01-01 00:00:00 +0000
+++ Percona-Server/mysql-test/suite/innodb_plugin/t/percona_changed_page_bmp_crash-master.opt 2013-01-31 11:37:26 +0000
@@ -0,0 +1,1 @@
1--innodb_track_changed_pages=TRUE --innodb_log_file_size=1M --innodb_file_per_table --skip-stack-trace --skip-core-file
02
=== added file 'Percona-Server/mysql-test/suite/innodb_plugin/t/percona_changed_page_bmp_crash.test'
--- Percona-Server/mysql-test/suite/innodb_plugin/t/percona_changed_page_bmp_crash.test 1970-01-01 00:00:00 +0000
+++ Percona-Server/mysql-test/suite/innodb_plugin/t/percona_changed_page_bmp_crash.test 2013-01-31 11:37:26 +0000
@@ -0,0 +1,82 @@
1#
2# Tests for the changed page tracking bitmap crash recovery and very fast shutdowns
3#
4--source include/have_innodb_plugin.inc
5--source include/not_embedded.inc
6--source include/not_crashrep.inc
7--source include/have_debug.inc
8--source include/not_valgrind.inc
9
10# Delete any existing bitmaps
11--source include/restart_mysqld.inc
12RESET CHANGED_PAGE_BITMAPS;
13
14--disable_warnings
15DROP TABLE IF EXISTS t1, t2;
16--enable_warnings
17
18let $MYSQLD_DATADIR= `select @@datadir`;
19let $BITMAP_FILE= $MYSQLD_DATADIR/ib_modified_log_1_0.xdb;
20
21# Generate log data that is larger than the log capacity and has two tablespace ids.
22CREATE TABLE t1 (x INT) ENGINE=InnoDB;
23INSERT INTO t1 VALUES (1),(2),(3),(4),(5);
24INSERT INTO t1 VALUES (1),(2),(3),(4),(5);
25INSERT INTO t1 VALUES (1),(2),(3),(4),(5);
26INSERT INTO t1 SELECT x FROM t1;
27INSERT INTO t1 SELECT x FROM t1;
28INSERT INTO t1 SELECT x FROM t1;
29INSERT INTO t1 SELECT x FROM t1;
30INSERT INTO t1 SELECT x FROM t1;
31INSERT INTO t1 SELECT x FROM t1;
32INSERT INTO t1 SELECT x FROM t1;
33INSERT INTO t1 SELECT x FROM t1;
34INSERT INTO t1 SELECT x FROM t1;
35INSERT INTO t1 SELECT x FROM t1;
36INSERT INTO t1 SELECT x FROM t1;
37INSERT INTO t1 SELECT x FROM t1;
38CREATE TABLE t2 (x INT) ENGINE=InnoDB;
39INSERT INTO t2 VALUES (1),(2),(3),(4),(5);
40
41#
42# Test the very fast server shutdown
43#
44SET GLOBAL INNODB_FAST_SHUTDOWN=2;
45
46--echo 1st restart
47--source include/restart_mysqld.inc
48
49# TODO: check the tracked LSN range continuity once this info is exposed through
50# INFORMATION_SCHEMA.
51
52file_exists $BITMAP_FILE;
53--replace_regex /_[[:digit:]]+\.xdb$//
54list_files $MYSQLD_DATADIR ib_modified_log*;
55
56#
57# Test crash right before writing of new bitmap data
58#
59
60--exec echo "wait" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
61--shutdown_server 10
62--source include/wait_until_disconnected.inc
63--enable_reconnect
64--exec echo "restart:-#d,crash_before_bitmap_write" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
65--source include/wait_until_connected_again.inc
66--echo 2nd restart
67--exec echo "restart" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
68--error 2013
69INSERT INTO t1 SELECT x FROM t1;
70--enable_reconnect
71--source include/wait_until_connected_again.inc
72
73INSERT INTO t1 VALUES (1),(2),(3),(4),(5);
74
75file_exists $BITMAP_FILE;
76--replace_regex /_[[:digit:]]+\.xdb$//
77list_files $MYSQLD_DATADIR ib_modified_log*;
78
79# TODO: check the tracked LSN range continuity once this info is exposed through
80# INFORMATION_SCHEMA.
81
82DROP TABLE t1, t2;
083
=== removed file 'Percona-Server/mysql-test/suite/innodb_plugin/t/percona_changed_page_bmp_no_restart-master.opt'
--- Percona-Server/mysql-test/suite/innodb_plugin/t/percona_changed_page_bmp_no_restart-master.opt 2012-06-14 09:16:03 +0000
+++ Percona-Server/mysql-test/suite/innodb_plugin/t/percona_changed_page_bmp_no_restart-master.opt 1970-01-01 00:00:00 +0000
@@ -1,1 +0,0 @@
1--innodb_track_changed_pages=TRUE --innodb-file-per-table
20
=== removed file 'Percona-Server/mysql-test/suite/innodb_plugin/t/percona_changed_page_bmp_no_restart.test'
--- Percona-Server/mysql-test/suite/innodb_plugin/t/percona_changed_page_bmp_no_restart.test 2013-01-22 16:28:47 +0000
+++ Percona-Server/mysql-test/suite/innodb_plugin/t/percona_changed_page_bmp_no_restart.test 1970-01-01 00:00:00 +0000
@@ -1,31 +0,0 @@
1# Tests for the changed page tracking bitmap. A valgrindable subset of
2# percona_changed_page_bmp test, which contains the full functional tests.
3--source include/have_innodb_plugin.inc
4
5# Delete any existing bitmaps
6--source include/restart_mysqld.inc
7RESET CHANGED_PAGE_BITMAPS;
8
9--disable_warnings
10DROP TABLE IF EXISTS t1, t2;
11--enable_warnings
12
13let $MYSQLD_DATADIR= `select @@datadir`;
14let $BITMAP_FILE= $MYSQLD_DATADIR/ib_modified_log_1_0.xdb;
15
16# Create some log data with several space ids to have more than bitmap poge.
17CREATE TABLE t1 (x INT) ENGINE=InnoDB;
18INSERT INTO t1 VALUES (1),(2),(3),(4),(5);
19CREATE TABLE t2 (x INT) ENGINE=InnoDB;
20INSERT INTO t2 VALUES (1),(2),(3),(4),(5);
21
22# Check that the bitmap file has been created
23file_exists $BITMAP_FILE;
24
25--replace_regex /_[[:digit:]]+\.xdb$//
26list_files $MYSQLD_DATADIR ib_modified_log*;
27
28# TODO: check the tracked LSN range continuity once this info is exposed through
29# INFORMATION_SCHEMA.
30
31DROP TABLE t1, t2;

Subscribers

People subscribed via source and target branches