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
1=== modified file 'Percona-Server/mysql-test/suite/innodb_plugin/r/percona_changed_page_bmp.result'
2--- Percona-Server/mysql-test/suite/innodb_plugin/r/percona_changed_page_bmp.result 2013-01-22 16:28:47 +0000
3+++ Percona-Server/mysql-test/suite/innodb_plugin/r/percona_changed_page_bmp.result 2013-01-31 11:37:26 +0000
4@@ -29,27 +29,16 @@
5 INSERT INTO t2 VALUES (1),(2),(3),(4),(5);
6 ib_modified_log_1
7 ib_modified_log_2
8-SET GLOBAL INNODB_FAST_SHUTDOWN=2;
9 4th restart
10+INSERT INTO t1 VALUES (1),(2),(3),(4),(5);
11 ib_modified_log_1
12 ib_modified_log_2
13-ib_modified_log_3
14 5th restart
15 INSERT INTO t1 VALUES (1),(2),(3),(4),(5);
16 ib_modified_log_1
17+6th restart
18+call mtr.add_suppression("InnoDB: Warning: truncated block detected.*");
19+ib_modified_log_1
20 ib_modified_log_2
21 7th restart
22-INSERT INTO t1 VALUES (1),(2),(3),(4),(5);
23-ib_modified_log_1
24-8th restart
25-call mtr.add_suppression("InnoDB: Warning: truncated block detected.*");
26-ib_modified_log_1
27-ib_modified_log_2
28-9th restart
29-INSERT INTO t1 SELECT x FROM t1;
30-ERROR HY000: Lost connection to MySQL server during query
31-INSERT INTO t1 VALUES (1),(2),(3),(4),(5);
32-ib_modified_log_1
33-ib_modified_log_2
34-10th restart
35 DROP TABLE t1, t2;
36
37=== added file 'Percona-Server/mysql-test/suite/innodb_plugin/r/percona_changed_page_bmp_crash.result'
38--- Percona-Server/mysql-test/suite/innodb_plugin/r/percona_changed_page_bmp_crash.result 1970-01-01 00:00:00 +0000
39+++ Percona-Server/mysql-test/suite/innodb_plugin/r/percona_changed_page_bmp_crash.result 2013-01-31 11:37:26 +0000
40@@ -0,0 +1,32 @@
41+RESET CHANGED_PAGE_BITMAPS;
42+DROP TABLE IF EXISTS t1, t2;
43+CREATE TABLE t1 (x INT) ENGINE=InnoDB;
44+INSERT INTO t1 VALUES (1),(2),(3),(4),(5);
45+INSERT INTO t1 VALUES (1),(2),(3),(4),(5);
46+INSERT INTO t1 VALUES (1),(2),(3),(4),(5);
47+INSERT INTO t1 SELECT x FROM t1;
48+INSERT INTO t1 SELECT x FROM t1;
49+INSERT INTO t1 SELECT x FROM t1;
50+INSERT INTO t1 SELECT x FROM t1;
51+INSERT INTO t1 SELECT x FROM t1;
52+INSERT INTO t1 SELECT x FROM t1;
53+INSERT INTO t1 SELECT x FROM t1;
54+INSERT INTO t1 SELECT x FROM t1;
55+INSERT INTO t1 SELECT x FROM t1;
56+INSERT INTO t1 SELECT x FROM t1;
57+INSERT INTO t1 SELECT x FROM t1;
58+INSERT INTO t1 SELECT x FROM t1;
59+CREATE TABLE t2 (x INT) ENGINE=InnoDB;
60+INSERT INTO t2 VALUES (1),(2),(3),(4),(5);
61+SET GLOBAL INNODB_FAST_SHUTDOWN=2;
62+1st restart
63+ib_modified_log_1
64+ib_modified_log_2
65+2nd restart
66+INSERT INTO t1 SELECT x FROM t1;
67+ERROR HY000: Lost connection to MySQL server during query
68+INSERT INTO t1 VALUES (1),(2),(3),(4),(5);
69+ib_modified_log_1
70+ib_modified_log_2
71+ib_modified_log_3
72+DROP TABLE t1, t2;
73
74=== removed file 'Percona-Server/mysql-test/suite/innodb_plugin/r/percona_changed_page_bmp_no_restart.result'
75--- Percona-Server/mysql-test/suite/innodb_plugin/r/percona_changed_page_bmp_no_restart.result 2013-01-22 16:28:47 +0000
76+++ Percona-Server/mysql-test/suite/innodb_plugin/r/percona_changed_page_bmp_no_restart.result 1970-01-01 00:00:00 +0000
77@@ -1,8 +0,0 @@
78-RESET CHANGED_PAGE_BITMAPS;
79-DROP TABLE IF EXISTS t1, t2;
80-CREATE TABLE t1 (x INT) ENGINE=InnoDB;
81-INSERT INTO t1 VALUES (1),(2),(3),(4),(5);
82-CREATE TABLE t2 (x INT) ENGINE=InnoDB;
83-INSERT INTO t2 VALUES (1),(2),(3),(4),(5);
84-ib_modified_log_1
85-DROP TABLE t1, t2;
86
87=== modified file 'Percona-Server/mysql-test/suite/innodb_plugin/t/percona_changed_page_bmp-master.opt'
88--- Percona-Server/mysql-test/suite/innodb_plugin/t/percona_changed_page_bmp-master.opt 2012-06-14 09:16:03 +0000
89+++ Percona-Server/mysql-test/suite/innodb_plugin/t/percona_changed_page_bmp-master.opt 2013-01-31 11:37:26 +0000
90@@ -1,1 +1,1 @@
91---innodb_track_changed_pages=TRUE --innodb_log_file_size=1M --innodb_file_per_table --skip-stack-trace --skip-core-file
92+--innodb_track_changed_pages=TRUE --innodb_log_file_size=1M --innodb_file_per_table
93
94=== modified file 'Percona-Server/mysql-test/suite/innodb_plugin/t/percona_changed_page_bmp.test'
95--- Percona-Server/mysql-test/suite/innodb_plugin/t/percona_changed_page_bmp.test 2013-01-22 16:28:47 +0000
96+++ Percona-Server/mysql-test/suite/innodb_plugin/t/percona_changed_page_bmp.test 2013-01-31 11:37:26 +0000
97@@ -6,12 +6,7 @@
98 # a checkpoint deterministically without generating a bunch of log data and restarts (which
99 # then cause bitmap file rotations on their own).
100
101---source include/not_embedded.inc
102---source include/not_crashrep.inc
103---source include/have_debug.inc
104 --source include/have_innodb_plugin.inc
105-# Valgrind reports useless errors on very fast server shutdowns
106---source include/not_valgrind.inc
107
108 # Delete any existing bitmaps
109 --source include/restart_mysqld.inc
110@@ -108,33 +103,17 @@
111 list_files $MYSQLD_DATADIR ib_modified_log*;
112
113 #
114-# Test the very fast server shutdown
115-#
116-
117-SET GLOBAL INNODB_FAST_SHUTDOWN=2;
118-
119+# Test that an empty existing bitmap file is handled properly when it's impossible to re-read the full missing range.
120+#
121+
122+--exec echo "wait" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
123+--shutdown_server 10
124+--source include/wait_until_disconnected.inc
125+remove_files_wildcard $MYSQLD_DATADIR ib_modified_log*;
126+write_file $BITMAP_FILE;
127+EOF
128+--enable_reconnect
129 --echo 4th restart
130---source include/restart_mysqld.inc
131-
132-# TODO: check the tracked LSN range continuity once this info is exposed through
133-# INFORMATION_SCHEMA.
134-
135-file_exists $BITMAP_FILE;
136---replace_regex /_[[:digit:]]+\.xdb$//
137-list_files $MYSQLD_DATADIR ib_modified_log*;
138-
139-#
140-# Test that an empty existing bitmap file is handled properly when it's impossible to re-read the full missing range.
141-#
142-
143---exec echo "wait" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
144---shutdown_server 10
145---source include/wait_until_disconnected.inc
146-remove_files_wildcard $MYSQLD_DATADIR ib_modified_log*;
147-write_file $BITMAP_FILE;
148-EOF
149---enable_reconnect
150---echo 5th restart
151 --exec echo "restart" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
152 --source include/wait_until_connected_again.inc
153
154@@ -154,7 +133,7 @@
155 --source include/wait_until_disconnected.inc
156 remove_files_wildcard $MYSQLD_DATADIR ib_modified_log*;
157 --enable_reconnect
158---echo 7th restart
159+--echo 5th restart
160 --exec echo "restart" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
161 --source include/wait_until_connected_again.inc
162
163@@ -171,7 +150,7 @@
164 junk junk junk junk
165 EOF
166 --enable_reconnect
167---echo 8th restart
168+--echo 6th restart
169 --exec echo "restart" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
170 --source include/wait_until_connected_again.inc
171 call mtr.add_suppression("InnoDB: Warning: truncated block detected.*");
172@@ -184,32 +163,6 @@
173 list_files $MYSQLD_DATADIR ib_modified_log*;
174
175 #
176-# Test crash right before writing of new bitmap data
177-#
178-
179---exec echo "wait" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
180---shutdown_server 10
181---source include/wait_until_disconnected.inc
182---enable_reconnect
183---exec echo "restart:-#d,crash_before_bitmap_write" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
184---source include/wait_until_connected_again.inc
185---echo 9th restart
186---exec echo "restart" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
187---error 2013
188-INSERT INTO t1 SELECT x FROM t1;
189---enable_reconnect
190---source include/wait_until_connected_again.inc
191-
192-INSERT INTO t1 VALUES (1),(2),(3),(4),(5);
193-
194-file_exists $BITMAP_FILE;
195---replace_regex /_[[:digit:]]+\.xdb$//
196-list_files $MYSQLD_DATADIR ib_modified_log*;
197-
198-# TODO: check the tracked LSN range continuity once this info is exposed through
199-# INFORMATION_SCHEMA.
200-
201-#
202 # Test that last tracked LSN is determined correctly when the last bitmap file is fully
203 # corrupted
204 #
205@@ -238,7 +191,7 @@
206 source $MYSQLD_DATADIR/corrupt_bmp_2.inc;
207 remove_file $MYSQLD_DATADIR/corrupt_bmp_2.inc;
208 --enable_reconnect
209---echo 10th restart
210+--echo 7th restart
211 --exec echo "restart" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
212 --source include/wait_until_connected_again.inc
213
214
215=== added file 'Percona-Server/mysql-test/suite/innodb_plugin/t/percona_changed_page_bmp_crash-master.opt'
216--- Percona-Server/mysql-test/suite/innodb_plugin/t/percona_changed_page_bmp_crash-master.opt 1970-01-01 00:00:00 +0000
217+++ Percona-Server/mysql-test/suite/innodb_plugin/t/percona_changed_page_bmp_crash-master.opt 2013-01-31 11:37:26 +0000
218@@ -0,0 +1,1 @@
219+--innodb_track_changed_pages=TRUE --innodb_log_file_size=1M --innodb_file_per_table --skip-stack-trace --skip-core-file
220
221=== added file 'Percona-Server/mysql-test/suite/innodb_plugin/t/percona_changed_page_bmp_crash.test'
222--- Percona-Server/mysql-test/suite/innodb_plugin/t/percona_changed_page_bmp_crash.test 1970-01-01 00:00:00 +0000
223+++ Percona-Server/mysql-test/suite/innodb_plugin/t/percona_changed_page_bmp_crash.test 2013-01-31 11:37:26 +0000
224@@ -0,0 +1,82 @@
225+#
226+# Tests for the changed page tracking bitmap crash recovery and very fast shutdowns
227+#
228+--source include/have_innodb_plugin.inc
229+--source include/not_embedded.inc
230+--source include/not_crashrep.inc
231+--source include/have_debug.inc
232+--source include/not_valgrind.inc
233+
234+# Delete any existing bitmaps
235+--source include/restart_mysqld.inc
236+RESET CHANGED_PAGE_BITMAPS;
237+
238+--disable_warnings
239+DROP TABLE IF EXISTS t1, t2;
240+--enable_warnings
241+
242+let $MYSQLD_DATADIR= `select @@datadir`;
243+let $BITMAP_FILE= $MYSQLD_DATADIR/ib_modified_log_1_0.xdb;
244+
245+# Generate log data that is larger than the log capacity and has two tablespace ids.
246+CREATE TABLE t1 (x INT) ENGINE=InnoDB;
247+INSERT INTO t1 VALUES (1),(2),(3),(4),(5);
248+INSERT INTO t1 VALUES (1),(2),(3),(4),(5);
249+INSERT INTO t1 VALUES (1),(2),(3),(4),(5);
250+INSERT INTO t1 SELECT x FROM t1;
251+INSERT INTO t1 SELECT x FROM t1;
252+INSERT INTO t1 SELECT x FROM t1;
253+INSERT INTO t1 SELECT x FROM t1;
254+INSERT INTO t1 SELECT x FROM t1;
255+INSERT INTO t1 SELECT x FROM t1;
256+INSERT INTO t1 SELECT x FROM t1;
257+INSERT INTO t1 SELECT x FROM t1;
258+INSERT INTO t1 SELECT x FROM t1;
259+INSERT INTO t1 SELECT x FROM t1;
260+INSERT INTO t1 SELECT x FROM t1;
261+INSERT INTO t1 SELECT x FROM t1;
262+CREATE TABLE t2 (x INT) ENGINE=InnoDB;
263+INSERT INTO t2 VALUES (1),(2),(3),(4),(5);
264+
265+#
266+# Test the very fast server shutdown
267+#
268+SET GLOBAL INNODB_FAST_SHUTDOWN=2;
269+
270+--echo 1st restart
271+--source include/restart_mysqld.inc
272+
273+# TODO: check the tracked LSN range continuity once this info is exposed through
274+# INFORMATION_SCHEMA.
275+
276+file_exists $BITMAP_FILE;
277+--replace_regex /_[[:digit:]]+\.xdb$//
278+list_files $MYSQLD_DATADIR ib_modified_log*;
279+
280+#
281+# Test crash right before writing of new bitmap data
282+#
283+
284+--exec echo "wait" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
285+--shutdown_server 10
286+--source include/wait_until_disconnected.inc
287+--enable_reconnect
288+--exec echo "restart:-#d,crash_before_bitmap_write" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
289+--source include/wait_until_connected_again.inc
290+--echo 2nd restart
291+--exec echo "restart" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
292+--error 2013
293+INSERT INTO t1 SELECT x FROM t1;
294+--enable_reconnect
295+--source include/wait_until_connected_again.inc
296+
297+INSERT INTO t1 VALUES (1),(2),(3),(4),(5);
298+
299+file_exists $BITMAP_FILE;
300+--replace_regex /_[[:digit:]]+\.xdb$//
301+list_files $MYSQLD_DATADIR ib_modified_log*;
302+
303+# TODO: check the tracked LSN range continuity once this info is exposed through
304+# INFORMATION_SCHEMA.
305+
306+DROP TABLE t1, t2;
307
308=== removed file 'Percona-Server/mysql-test/suite/innodb_plugin/t/percona_changed_page_bmp_no_restart-master.opt'
309--- Percona-Server/mysql-test/suite/innodb_plugin/t/percona_changed_page_bmp_no_restart-master.opt 2012-06-14 09:16:03 +0000
310+++ Percona-Server/mysql-test/suite/innodb_plugin/t/percona_changed_page_bmp_no_restart-master.opt 1970-01-01 00:00:00 +0000
311@@ -1,1 +0,0 @@
312---innodb_track_changed_pages=TRUE --innodb-file-per-table
313
314=== removed file 'Percona-Server/mysql-test/suite/innodb_plugin/t/percona_changed_page_bmp_no_restart.test'
315--- Percona-Server/mysql-test/suite/innodb_plugin/t/percona_changed_page_bmp_no_restart.test 2013-01-22 16:28:47 +0000
316+++ Percona-Server/mysql-test/suite/innodb_plugin/t/percona_changed_page_bmp_no_restart.test 1970-01-01 00:00:00 +0000
317@@ -1,31 +0,0 @@
318-# Tests for the changed page tracking bitmap. A valgrindable subset of
319-# percona_changed_page_bmp test, which contains the full functional tests.
320---source include/have_innodb_plugin.inc
321-
322-# Delete any existing bitmaps
323---source include/restart_mysqld.inc
324-RESET CHANGED_PAGE_BITMAPS;
325-
326---disable_warnings
327-DROP TABLE IF EXISTS t1, t2;
328---enable_warnings
329-
330-let $MYSQLD_DATADIR= `select @@datadir`;
331-let $BITMAP_FILE= $MYSQLD_DATADIR/ib_modified_log_1_0.xdb;
332-
333-# Create some log data with several space ids to have more than bitmap poge.
334-CREATE TABLE t1 (x INT) ENGINE=InnoDB;
335-INSERT INTO t1 VALUES (1),(2),(3),(4),(5);
336-CREATE TABLE t2 (x INT) ENGINE=InnoDB;
337-INSERT INTO t2 VALUES (1),(2),(3),(4),(5);
338-
339-# Check that the bitmap file has been created
340-file_exists $BITMAP_FILE;
341-
342---replace_regex /_[[:digit:]]+\.xdb$//
343-list_files $MYSQLD_DATADIR ib_modified_log*;
344-
345-# TODO: check the tracked LSN range continuity once this info is exposed through
346-# INFORMATION_SCHEMA.
347-
348-DROP TABLE t1, t2;

Subscribers

People subscribed via source and target branches