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

Proposed by Laurynas Biveinis
Status: Merged
Approved by: Stewart Smith
Approved revision: no longer in the source branch.
Merged at revision: 412
Proposed branch: lp:~laurynas-biveinis/percona-server/BT-16274-bug1082437-5.5
Merge into: lp:percona-server/5.5
Prerequisite: lp:~laurynas-biveinis/percona-server/BT-16724-xtradb-bmp-requests-5.5
Diff against target: 354 lines (+139/-116)
9 files modified
Percona-Server/mysql-test/suite/innodb/r/percona_changed_page_bmp.result (+4/-15)
Percona-Server/mysql-test/suite/innodb/r/percona_changed_page_bmp_crash.result (+35/-0)
Percona-Server/mysql-test/suite/innodb/r/percona_changed_page_bmp_no_restart.result (+0/-8)
Percona-Server/mysql-test/suite/innodb/t/percona_changed_page_bmp-master.opt (+1/-1)
Percona-Server/mysql-test/suite/innodb/t/percona_changed_page_bmp.test (+13/-60)
Percona-Server/mysql-test/suite/innodb/t/percona_changed_page_bmp_crash-master.opt (+1/-0)
Percona-Server/mysql-test/suite/innodb/t/percona_changed_page_bmp_crash.test (+85/-0)
Percona-Server/mysql-test/suite/innodb/t/percona_changed_page_bmp_no_restart-master.opt (+0/-1)
Percona-Server/mysql-test/suite/innodb/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.5
Reviewer Review Type Date Requested Status
Stewart Smith (community) Approve
Review via email: mp+136423@code.launchpad.net

Description of the change

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

Subscribers

People subscribed via source and target branches