Merge lp:~laurynas-biveinis/percona-server/bmp-fixes-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: 528
Proposed branch: lp:~laurynas-biveinis/percona-server/bmp-fixes-5.5
Merge into: lp:percona-server/5.5
Diff against target: 1312 lines (+537/-143) (has conflicts)
19 files modified
Percona-Server/mysql-test/suite/innodb/r/percona_changed_page_bmp.result (+7/-0)
Percona-Server/mysql-test/suite/innodb/r/percona_changed_pages.result (+58/-33)
Percona-Server/mysql-test/suite/innodb/r/percona_changed_pages_empty.result (+1/-0)
Percona-Server/mysql-test/suite/innodb/t/percona_changed_page_bmp.test (+33/-0)
Percona-Server/mysql-test/suite/innodb/t/percona_changed_page_bmp_flush.test (+2/-2)
Percona-Server/mysql-test/suite/innodb/t/percona_changed_pages.test (+99/-28)
Percona-Server/mysql-test/suite/innodb/t/percona_changed_pages_empty.test (+4/-2)
Percona-Server/mysql-test/suite/sys_vars/r/all_vars.result (+0/-2)
Percona-Server/mysql-test/suite/sys_vars/r/innodb_max_changed_pages_basic.result (+78/-0)
Percona-Server/mysql-test/suite/sys_vars/t/innodb_max_changed_pages_basic.test (+60/-0)
Percona-Server/storage/innobase/handler/i_s.cc (+8/-6)
Percona-Server/storage/innobase/include/log0log.h (+3/-1)
Percona-Server/storage/innobase/include/log0online.h (+2/-0)
Percona-Server/storage/innobase/include/os0file.h (+4/-2)
Percona-Server/storage/innobase/log/log0log.c (+13/-3)
Percona-Server/storage/innobase/log/log0online.c (+161/-53)
Percona-Server/storage/innobase/log/log0recv.c (+4/-3)
Percona-Server/storage/innobase/os/os0file.c (+0/-2)
Percona-Server/storage/innobase/srv/srv0start.c (+0/-6)
Text conflict in Percona-Server/mysql-test/suite/innodb/r/percona_changed_page_bmp.result
Text conflict in Percona-Server/mysql-test/suite/innodb/t/percona_changed_page_bmp.test
To merge this branch: bzr merge lp:~laurynas-biveinis/percona-server/bmp-fixes-5.5
Reviewer Review Type Date Requested Status
Stewart Smith (community) Approve
Review via email: mp+166280@code.launchpad.net

Description of the change

Merge bitmap fixes from 5.1, add 5.5+-specific fixes.

http://jenkins.percona.com/job/percona-server-5.5-param/749/

To post a comment you must log in.
Revision history for this message
Laurynas Biveinis (laurynas-biveinis) wrote :

The merge conflict is GCA vs trunk, does not hinder the review, and will be resolved at the trunk merge time.

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/r/percona_changed_page_bmp.result'
--- Percona-Server/mysql-test/suite/innodb/r/percona_changed_page_bmp.result 2013-02-04 13:53:47 +0000
+++ Percona-Server/mysql-test/suite/innodb/r/percona_changed_page_bmp.result 2013-05-29 15:11:30 +0000
@@ -47,13 +47,20 @@
47ib_modified_log_147ib_modified_log_1
48ib_modified_log_248ib_modified_log_2
49ib_modified_log_349ib_modified_log_3
50DROP TABLE t1, t2;
508th restart518th restart
51RESET CHANGED_PAGE_BITMAPS;52RESET CHANGED_PAGE_BITMAPS;
52call mtr.add_suppression("InnoDB: Error: page [0-9]* log sequence number [0-9]*");53call mtr.add_suppression("InnoDB: Error: page [0-9]* log sequence number [0-9]*");
539th restart549th restart
55<<<<<<< TREE
54CREATE TABLE t3 (a MEDIUMBLOB) ENGINE=InnoDB;56CREATE TABLE t3 (a MEDIUMBLOB) ENGINE=InnoDB;
55call mtr.add_suppression("InnoDB: Error: the age of the oldest untracked record exceeds the log group capacity!");57call mtr.add_suppression("InnoDB: Error: the age of the oldest untracked record exceeds the log group capacity!");
56call mtr.add_suppression("InnoDB: Error: stopping the log tracking thread at LSN");58call mtr.add_suppression("InnoDB: Error: stopping the log tracking thread at LSN");
57INSERT INTO t3 VALUES (REPEAT('a', 12582912));59INSERT INTO t3 VALUES (REPEAT('a', 12582912));
5810th restart6010th restart
59DROP TABLE t1, t2, t3;61DROP TABLE t1, t2, t3;
62=======
63ib_modified_log_1
6410th restart
6511th restart
66>>>>>>> MERGE-SOURCE
6067
=== modified file 'Percona-Server/mysql-test/suite/innodb/r/percona_changed_pages.result'
--- Percona-Server/mysql-test/suite/innodb/r/percona_changed_pages.result 2013-01-29 15:14:23 +0000
+++ Percona-Server/mysql-test/suite/innodb/r/percona_changed_pages.result 2013-05-29 15:11:30 +0000
@@ -1,5 +1,5 @@
1RESET CHANGED_PAGE_BITMAPS;1RESET CHANGED_PAGE_BITMAPS;
2DROP TABLE IF EXISTS T1;2DROP TABLE IF EXISTS T1, ICP_COPY;
3CREATE TABLE T1 (F1 CHAR(255)) ENGINE=INNODB;3CREATE TABLE T1 (F1 CHAR(255)) ENGINE=INNODB;
41st interval end LSN greater than interval start LSN:41st interval end LSN greater than interval start LSN:
5should_be_15should_be_1
@@ -54,35 +54,35 @@
54ICP tests (all should be 1):54ICP tests (all should be 1):
55SELECT COUNT(*) = @cond_test_pages_count55SELECT COUNT(*) = @cond_test_pages_count
56FROM INFORMATION_SCHEMA.INNODB_CHANGED_PAGES56FROM INFORMATION_SCHEMA.INNODB_CHANGED_PAGES
57WHERE END_LSN = @cond_test_max_end_lsn;57WHERE END_LSN = @max_end_lsn;
58COUNT(*) = @cond_test_pages_count58COUNT(*) = @cond_test_pages_count
591591
60SELECT COUNT(*) = @cond_test_pages_count60SELECT COUNT(*) = @cond_test_pages_count
61FROM INFORMATION_SCHEMA.INNODB_CHANGED_PAGES61FROM INFORMATION_SCHEMA.INNODB_CHANGED_PAGES
62WHERE62WHERE
63END_LSN > (@cond_test_max_end_lsn - 1) AND63END_LSN > (@max_end_lsn - 1) AND
64END_LSN < (@cond_test_max_end_lsn + 1);64END_LSN < (@max_end_lsn + 1);
65COUNT(*) = @cond_test_pages_count65COUNT(*) = @cond_test_pages_count
661661
67SELECT COUNT(*) = @cond_test_pages_count67SELECT COUNT(*) = @cond_test_pages_count
68FROM INFORMATION_SCHEMA.INNODB_CHANGED_PAGES68FROM INFORMATION_SCHEMA.INNODB_CHANGED_PAGES
69WHERE69WHERE
70END_LSN >= @cond_test_max_end_lsn AND70END_LSN >= @max_end_lsn AND
71END_LSN <= @cond_test_max_end_lsn;71END_LSN <= @max_end_lsn;
72COUNT(*) = @cond_test_pages_count72COUNT(*) = @cond_test_pages_count
731731
74SELECT COUNT(*) = @cond_test_pages_count74SELECT COUNT(*) = @cond_test_pages_count
75FROM INFORMATION_SCHEMA.INNODB_CHANGED_PAGES75FROM INFORMATION_SCHEMA.INNODB_CHANGED_PAGES
76WHERE76WHERE
77(@cond_test_max_end_lsn - 1) < END_LSN AND77(@max_end_lsn - 1) < END_LSN AND
78@cond_test_max_end_lsn >= END_LSN;78@max_end_lsn >= END_LSN;
79COUNT(*) = @cond_test_pages_count79COUNT(*) = @cond_test_pages_count
801801
81SELECT COUNT(*) = @cond_test_pages_count81SELECT COUNT(*) = @cond_test_pages_count
82FROM INFORMATION_SCHEMA.INNODB_CHANGED_PAGES82FROM INFORMATION_SCHEMA.INNODB_CHANGED_PAGES
83WHERE83WHERE
84START_LSN <= @cond_test_max_end_lsn AND84START_LSN <= @max_end_lsn AND
85END_LSN >= @cond_test_max_end_lsn;85END_LSN >= @max_end_lsn;
86COUNT(*) = @cond_test_pages_count86COUNT(*) = @cond_test_pages_count
871871
88SELECT COUNT(*) = @cond_test_pages_count88SELECT COUNT(*) = @cond_test_pages_count
@@ -101,7 +101,7 @@
101FROM INFORMATION_SCHEMA.INNODB_CHANGED_PAGES101FROM INFORMATION_SCHEMA.INNODB_CHANGED_PAGES
102WHERE102WHERE
103START_LSN >= @cond_test_max_start_lsn AND103START_LSN >= @cond_test_max_start_lsn AND
104END_LSN <= @cond_test_max_end_lsn;104END_LSN <= @max_end_lsn;
105COUNT(*) = @cond_test_pages_count105COUNT(*) = @cond_test_pages_count
10611061
107SELECT COUNT(*) = @cond_test_pages_count107SELECT COUNT(*) = @cond_test_pages_count
@@ -115,7 +115,7 @@
115FROM INFORMATION_SCHEMA.INNODB_CHANGED_PAGES115FROM INFORMATION_SCHEMA.INNODB_CHANGED_PAGES
116WHERE116WHERE
117@cond_test_max_start_lsn <= START_LSN AND117@cond_test_max_start_lsn <= START_LSN AND
118@cond_test_max_end_lsn >= END_LSN;118@max_end_lsn >= END_LSN;
119COUNT(*) = @cond_test_pages_count119COUNT(*) = @cond_test_pages_count
12011201
121SELECT COUNT(*)121SELECT COUNT(*)
@@ -153,4 +153,29 @@
153COUNT(*)153COUNT(*)
15451545
155SET GLOBAL INNODB_MAX_CHANGED_PAGES = 1000000;155SET GLOBAL INNODB_MAX_CHANGED_PAGES = 1000000;
156DROP TABLE T1;156CREATE TABLE ICP_COPY (
157space_id INT(11) NOT NULL,
158page_id INT(11) NOT NULL,
159start_lsn BIGINT(21) NOT NULL,
160end_lsn BIGINT(21) NOT NULL,
161INDEX page_id(space_id, page_id)) ENGINE=InnoDB;
162INSERT INTO ICP_COPY SELECT * FROM INFORMATION_SCHEMA.INNODB_CHANGED_PAGES
163WHERE END_LSN <= @max_end_lsn;
164SELECT @@global.innodb_track_changed_pages;
165@@global.innodb_track_changed_pages
1660
167SET @max_end_lsn= (SELECT MAX(end_lsn) FROM ICP_COPY);
168TRUNCATE TABLE ICP_COPY;
169INSERT INTO ICP_COPY SELECT * FROM INFORMATION_SCHEMA.INNODB_CHANGED_PAGES
170WHERE END_LSN <= @max_end_lsn;
171Check that INNODB_CHANGED_PAGES copies checksum the same (should be 1):
172should_be_1
1731
174SELECT @@global.innodb_track_changed_pages;
175@@global.innodb_track_changed_pages
1761
177ib_modified_log_4
178SELECT COUNT(*) FROM INFORMATION_SCHEMA.INNODB_CHANGED_PAGES
179WHERE START_LSN > 10000;
180ERROR HY000: Can't read record in system table
181DROP TABLE T1, ICP_COPY;
157182
=== modified file 'Percona-Server/mysql-test/suite/innodb/r/percona_changed_pages_empty.result'
--- Percona-Server/mysql-test/suite/innodb/r/percona_changed_pages_empty.result 2012-09-17 13:08:32 +0000
+++ Percona-Server/mysql-test/suite/innodb/r/percona_changed_pages_empty.result 2013-05-29 15:11:30 +0000
@@ -1,2 +1,3 @@
1RESET CHANGED_PAGE_BITMAPS;
1SELECT * FROM INFORMATION_SCHEMA.INNODB_CHANGED_PAGES;2SELECT * FROM INFORMATION_SCHEMA.INNODB_CHANGED_PAGES;
2space_id page_id start_lsn end_lsn3space_id page_id start_lsn end_lsn
34
=== modified file 'Percona-Server/mysql-test/suite/innodb/t/percona_changed_page_bmp.test'
--- Percona-Server/mysql-test/suite/innodb/t/percona_changed_page_bmp.test 2013-02-04 13:53:47 +0000
+++ Percona-Server/mysql-test/suite/innodb/t/percona_changed_page_bmp.test 2013-05-29 15:11:30 +0000
@@ -205,6 +205,8 @@
205--replace_regex /_[[:digit:]]+\.xdb$//205--replace_regex /_[[:digit:]]+\.xdb$//
206list_files $MYSQLD_DATADIR ib_modified_log*;206list_files $MYSQLD_DATADIR ib_modified_log*;
207207
208DROP TABLE t1, t2;
209
208#210#
209# Test for log tracking compatibility with innodb_force_recovery (bug 1083596).211# Test for log tracking compatibility with innodb_force_recovery (bug 1083596).
210#212#
@@ -221,7 +223,19 @@
221RESET CHANGED_PAGE_BITMAPS;223RESET CHANGED_PAGE_BITMAPS;
222224
223call mtr.add_suppression("InnoDB: Error: page [0-9]* log sequence number [0-9]*");225call mtr.add_suppression("InnoDB: Error: page [0-9]* log sequence number [0-9]*");
226
227#
228# Test that bitmap files are created correctly in innodb_data_home_dir without a trailing
229# path separator (bug 1181887)
230#
231--exec echo "wait" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
232--shutdown_server 10
233--source include/wait_until_disconnected.inc
234--remove_files_wildcard $MYSQLD_DATADIR ib_logfile*
235--mkdir $MYSQLTEST_VARDIR/tmpdatadir
236--enable_reconnect
224--echo 9th restart237--echo 9th restart
238<<<<<<< TREE
225--source include/restart_mysqld.inc239--source include/restart_mysqld.inc
226240
227#241#
@@ -238,3 +252,22 @@
238--source include/restart_mysqld.inc252--source include/restart_mysqld.inc
239253
240DROP TABLE t1, t2, t3;254DROP TABLE t1, t2, t3;
255=======
256--exec echo "restart:--innodb-data-home-dir=$MYSQLTEST_VARDIR/tmpdatadir" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
257--source include/wait_until_connected_again.inc
258
259file_exists $MYSQLTEST_VARDIR/tmpdatadir/ib_modified_log_1_0.xdb;
260--replace_regex /_[[:digit:]]+\.xdb$//
261list_files $MYSQLTEST_VARDIR/tmpdatadir ib_modified_log*;
262
263--echo 10th restart
264--exec echo "wait" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
265--shutdown_server 10
266--source include/wait_until_disconnected.inc
267--remove_files_wildcard $MYSQLD_DATADIR ib_logfile*
268--remove_files_wildcard $MYSQLD_DATADIR ibdata*
269--enable_reconnect
270--echo 11th restart
271--exec echo "restart" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
272--source include/wait_until_connected_again.inc
273>>>>>>> MERGE-SOURCE
241274
=== modified file 'Percona-Server/mysql-test/suite/innodb/t/percona_changed_page_bmp_flush.test'
--- Percona-Server/mysql-test/suite/innodb/t/percona_changed_page_bmp_flush.test 2013-02-06 09:06:08 +0000
+++ Percona-Server/mysql-test/suite/innodb/t/percona_changed_page_bmp_flush.test 2013-05-29 15:11:30 +0000
@@ -61,7 +61,7 @@
61INSERT INTO t1 VALUES (3, REPEAT("c", 20000));61INSERT INTO t1 VALUES (3, REPEAT("c", 20000));
6262
63#63#
64# Test innodb_flush_method=O_DIRECT64# Test innodb_flush_method=ALL_O_DIRECT
65# Check that the previous test produced bitmap data while the server is down.65# Check that the previous test produced bitmap data while the server is down.
66#66#
67--exec echo "wait" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect67--exec echo "wait" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
@@ -71,7 +71,7 @@
71--replace_regex /_[[:digit:]]+\.xdb$//71--replace_regex /_[[:digit:]]+\.xdb$//
72list_files $MYSQLD_DATADIR ib_modified_log*;72list_files $MYSQLD_DATADIR ib_modified_log*;
73--enable_reconnect73--enable_reconnect
74--exec echo "restart:--innodb-track-changed-pages=1 --innodb-flush-method=O_DIRECT" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect74--exec echo "restart:--innodb-track-changed-pages=1 --innodb-flush-method=ALL_O_DIRECT" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
75--source include/wait_until_connected_again.inc75--source include/wait_until_connected_again.inc
7676
77INSERT INTO t1 VALUES (4, REPEAT("d", 20000));77INSERT INTO t1 VALUES (4, REPEAT("d", 20000));
7878
=== modified file 'Percona-Server/mysql-test/suite/innodb/t/percona_changed_pages.test'
--- Percona-Server/mysql-test/suite/innodb/t/percona_changed_pages.test 2013-01-29 15:14:23 +0000
+++ Percona-Server/mysql-test/suite/innodb/t/percona_changed_pages.test 2013-05-29 15:11:30 +0000
@@ -9,7 +9,7 @@
9RESET CHANGED_PAGE_BITMAPS;9RESET CHANGED_PAGE_BITMAPS;
1010
11--disable_warnings11--disable_warnings
12DROP TABLE IF EXISTS T1;12DROP TABLE IF EXISTS T1, ICP_COPY;
13--enable_warnings13--enable_warnings
1414
15let $old_max_changed_pages= `SELECT @@GLOBAL.INNODB_MAX_CHANGED_PAGES`;15let $old_max_changed_pages= `SELECT @@GLOBAL.INNODB_MAX_CHANGED_PAGES`;
@@ -105,9 +105,9 @@
105# Gather data for condition pushdown testing not using conditions #105# Gather data for condition pushdown testing not using conditions #
106###################################################################106###################################################################
107--disable_result_log107--disable_result_log
108SET @cond_test_max_end_lsn=108SET @max_end_lsn=
109 (SELECT MAX(end_lsn)109 (SELECT MAX(end_lsn)
110 FROM INFORMATION_SCHEMA.INNODB_CHANGED_PAGES);110 FROM INFORMATION_SCHEMA.INNODB_CHANGED_PAGES);
111111
112SET @cond_test_max_start_lsn=112SET @cond_test_max_start_lsn=
113 (SELECT MAX(start_lsn)113 (SELECT MAX(start_lsn)
@@ -153,31 +153,31 @@
153# Baseline as ICP currently does not support equality153# Baseline as ICP currently does not support equality
154SELECT COUNT(*) = @cond_test_pages_count154SELECT COUNT(*) = @cond_test_pages_count
155 FROM INFORMATION_SCHEMA.INNODB_CHANGED_PAGES155 FROM INFORMATION_SCHEMA.INNODB_CHANGED_PAGES
156 WHERE END_LSN = @cond_test_max_end_lsn;156 WHERE END_LSN = @max_end_lsn;
157 157
158SELECT COUNT(*) = @cond_test_pages_count158SELECT COUNT(*) = @cond_test_pages_count
159 FROM INFORMATION_SCHEMA.INNODB_CHANGED_PAGES159 FROM INFORMATION_SCHEMA.INNODB_CHANGED_PAGES
160 WHERE160 WHERE
161 END_LSN > (@cond_test_max_end_lsn - 1) AND161 END_LSN > (@max_end_lsn - 1) AND
162 END_LSN < (@cond_test_max_end_lsn + 1);162 END_LSN < (@max_end_lsn + 1);
163163
164SELECT COUNT(*) = @cond_test_pages_count164SELECT COUNT(*) = @cond_test_pages_count
165 FROM INFORMATION_SCHEMA.INNODB_CHANGED_PAGES165 FROM INFORMATION_SCHEMA.INNODB_CHANGED_PAGES
166 WHERE166 WHERE
167 END_LSN >= @cond_test_max_end_lsn AND167 END_LSN >= @max_end_lsn AND
168 END_LSN <= @cond_test_max_end_lsn;168 END_LSN <= @max_end_lsn;
169169
170SELECT COUNT(*) = @cond_test_pages_count170SELECT COUNT(*) = @cond_test_pages_count
171 FROM INFORMATION_SCHEMA.INNODB_CHANGED_PAGES171 FROM INFORMATION_SCHEMA.INNODB_CHANGED_PAGES
172 WHERE172 WHERE
173 (@cond_test_max_end_lsn - 1) < END_LSN AND173 (@max_end_lsn - 1) < END_LSN AND
174 @cond_test_max_end_lsn >= END_LSN;174 @max_end_lsn >= END_LSN;
175175
176SELECT COUNT(*) = @cond_test_pages_count176SELECT COUNT(*) = @cond_test_pages_count
177 FROM INFORMATION_SCHEMA.INNODB_CHANGED_PAGES177 FROM INFORMATION_SCHEMA.INNODB_CHANGED_PAGES
178 WHERE178 WHERE
179 START_LSN <= @cond_test_max_end_lsn AND179 START_LSN <= @max_end_lsn AND
180 END_LSN >= @cond_test_max_end_lsn;180 END_LSN >= @max_end_lsn;
181181
182SELECT COUNT(*) = @cond_test_pages_count182SELECT COUNT(*) = @cond_test_pages_count
183 FROM INFORMATION_SCHEMA.INNODB_CHANGED_PAGES183 FROM INFORMATION_SCHEMA.INNODB_CHANGED_PAGES
@@ -193,7 +193,7 @@
193 FROM INFORMATION_SCHEMA.INNODB_CHANGED_PAGES193 FROM INFORMATION_SCHEMA.INNODB_CHANGED_PAGES
194 WHERE194 WHERE
195 START_LSN >= @cond_test_max_start_lsn AND195 START_LSN >= @cond_test_max_start_lsn AND
196 END_LSN <= @cond_test_max_end_lsn;196 END_LSN <= @max_end_lsn;
197197
198SELECT COUNT(*) = @cond_test_pages_count198SELECT COUNT(*) = @cond_test_pages_count
199 FROM INFORMATION_SCHEMA.INNODB_CHANGED_PAGES199 FROM INFORMATION_SCHEMA.INNODB_CHANGED_PAGES
@@ -205,7 +205,7 @@
205 FROM INFORMATION_SCHEMA.INNODB_CHANGED_PAGES205 FROM INFORMATION_SCHEMA.INNODB_CHANGED_PAGES
206 WHERE206 WHERE
207 @cond_test_max_start_lsn <= START_LSN AND207 @cond_test_max_start_lsn <= START_LSN AND
208 @cond_test_max_end_lsn >= END_LSN;208 @max_end_lsn >= END_LSN;
209209
210# Empty range210# Empty range
211SELECT COUNT(*)211SELECT COUNT(*)
@@ -262,4 +262,75 @@
262262
263eval SET GLOBAL INNODB_MAX_CHANGED_PAGES = $old_max_changed_pages;263eval SET GLOBAL INNODB_MAX_CHANGED_PAGES = $old_max_changed_pages;
264264
265DROP TABLE T1;265#
266# Test that I_S.INNODB_CHANGED_PAGES can be queried with the log tracking disabled
267# (bug 1185304)
268#
269
270# We have to skip ICP_COPY bitmap writes. Thus all the I_S queries from
271# this point are limited to the max_end_lsn.
272
273# Save the copy of current table contents
274CREATE TABLE ICP_COPY (
275 space_id INT(11) NOT NULL,
276 page_id INT(11) NOT NULL,
277 start_lsn BIGINT(21) NOT NULL,
278 end_lsn BIGINT(21) NOT NULL,
279 INDEX page_id(space_id, page_id)) ENGINE=InnoDB;
280
281INSERT INTO ICP_COPY SELECT * FROM INFORMATION_SCHEMA.INNODB_CHANGED_PAGES
282 WHERE END_LSN <= @max_end_lsn;
283
284# Restart with log tracking disabled
285--exec echo "wait" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
286--shutdown_server 10
287--source include/wait_until_disconnected.inc
288--enable_reconnect
289--exec echo "restart:--innodb-track-changed-pages=FALSE" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
290--source include/wait_until_connected_again.inc
291
292SELECT @@global.innodb_track_changed_pages;
293
294let $icp_1_checksum= `CHECKSUM TABLE ICP_COPY`;
295
296SET @max_end_lsn= (SELECT MAX(end_lsn) FROM ICP_COPY);
297
298# Read the table again
299TRUNCATE TABLE ICP_COPY;
300
301INSERT INTO ICP_COPY SELECT * FROM INFORMATION_SCHEMA.INNODB_CHANGED_PAGES
302 WHERE END_LSN <= @max_end_lsn;
303
304# Compare the checksums of both reads
305let $icp_2_checksum= `CHECKSUM TABLE ICP_COPY`;
306--disable_query_log
307--echo Check that INNODB_CHANGED_PAGES copies checksum the same (should be 1):
308eval SELECT "$icp_1_checksum" LIKE "$icp_2_checksum" AS should_be_1;
309--enable_query_log
310
311--source include/restart_mysqld.inc
312
313SELECT @@global.innodb_track_changed_pages;
314
315#
316# Test for
317# - bug 1179974 (INFORMATION_SCHEMA.INNODB_CHANGED_PAGES query fails server
318# with an I/O error if a bitmap file in the middle of requested range is missing)
319# - bug 1185040 (INFORMATION_SCHEMA.INNODB_CHANGED_PAGES_QUERY should return a
320# warning if the result set is partial)
321#
322
323let $MYSQLD_DATADIR= `select @@datadir`;
324--replace_regex /_[[:digit:]]+\.xdb$//
325list_files $MYSQLD_DATADIR ib_modified_log_4_*;
326
327remove_files_wildcard $MYSQLD_DATADIR ib_modified_log_4_*.xdb;
328
329--replace_regex /_[[:digit:]]+\.xdb$//
330list_files $MYSQLD_DATADIR ib_modified_log_4_*;
331
332--error ER_CANT_FIND_SYSTEM_REC
333SELECT COUNT(*) FROM INFORMATION_SCHEMA.INNODB_CHANGED_PAGES
334 WHERE START_LSN > 10000;
335
336DROP TABLE T1, ICP_COPY;
266337
=== modified file 'Percona-Server/mysql-test/suite/innodb/t/percona_changed_pages_empty.test'
--- Percona-Server/mysql-test/suite/innodb/t/percona_changed_pages_empty.test 2012-09-17 13:08:32 +0000
+++ Percona-Server/mysql-test/suite/innodb/t/percona_changed_pages_empty.test 2013-05-29 15:11:30 +0000
@@ -1,8 +1,10 @@
1###############################################################################1###############################################################################
2# Test for empty I_S.INNODB_CHANGED_PAGES table. The table should be empty if#2# Test for empty I_S.INNODB_CHANGED_PAGES table. The table should be empty if #
3# innodb_track_changed_pages is false. #3# no bitmap files exist #
4###############################################################################4###############################################################################
55
6--source include/have_innodb.inc6--source include/have_innodb.inc
77
8RESET CHANGED_PAGE_BITMAPS;
9
8SELECT * FROM INFORMATION_SCHEMA.INNODB_CHANGED_PAGES; 10SELECT * FROM INFORMATION_SCHEMA.INNODB_CHANGED_PAGES;
911
=== modified file 'Percona-Server/mysql-test/suite/sys_vars/r/all_vars.result'
--- Percona-Server/mysql-test/suite/sys_vars/r/all_vars.result 2013-01-29 15:14:23 +0000
+++ Percona-Server/mysql-test/suite/sys_vars/r/all_vars.result 2013-05-29 15:11:30 +0000
@@ -14,7 +14,5 @@
14INNODB_FAKE_CHANGES14INNODB_FAKE_CHANGES
15INNODB_KILL_IDLE_TRANSACTION15INNODB_KILL_IDLE_TRANSACTION
16INNODB_KILL_IDLE_TRANSACTION16INNODB_KILL_IDLE_TRANSACTION
17INNODB_MAX_CHANGED_PAGES
18INNODB_MAX_CHANGED_PAGES
19drop table t1;17drop table t1;
20drop table t2;18drop table t2;
2119
=== added file 'Percona-Server/mysql-test/suite/sys_vars/r/innodb_max_changed_pages_basic.result'
--- Percona-Server/mysql-test/suite/sys_vars/r/innodb_max_changed_pages_basic.result 1970-01-01 00:00:00 +0000
+++ Percona-Server/mysql-test/suite/sys_vars/r/innodb_max_changed_pages_basic.result 2013-05-29 15:11:30 +0000
@@ -0,0 +1,78 @@
1SET @start_value = @@global.innodb_max_changed_pages;
2SELECT @start_value;
3@start_value
41000000
5SET @@global.innodb_max_changed_pages = 5000;
6SET @@global.innodb_max_changed_pages = DEFAULT;
7SELECT @@global.innodb_max_changed_pages;
8@@global.innodb_max_changed_pages
91000000
10SET @@global.innodb_max_changed_pages = 0;
11SELECT @@global.innodb_max_changed_pages;
12@@global.innodb_max_changed_pages
130
14SET @@global.innodb_max_changed_pages = 1;
15SELECT @@global.innodb_max_changed_pages;
16@@global.innodb_max_changed_pages
171
18SET @@global.innodb_max_changed_pages = 18446744073709551614;
19SELECT @@global.innodb_max_changed_pages;
20@@global.innodb_max_changed_pages
2118446744073709551614
22SET @@global.innodb_max_changed_pages = 18446744073709551615;
23SELECT @@global.innodb_max_changed_pages;
24@@global.innodb_max_changed_pages
2518446744073709551615
26SET @@global.innodb_max_changed_pages = 18446744073709551616;
27ERROR 42000: Incorrect argument type to variable 'innodb_max_changed_pages'
28SELECT @@global.innodb_max_changed_pages;
29@@global.innodb_max_changed_pages
3018446744073709551615
31SET @@global.innodb_max_changed_pages = 18446744073709551617;
32ERROR 42000: Incorrect argument type to variable 'innodb_max_changed_pages'
33SELECT @@global.innodb_max_changed_pages;
34@@global.innodb_max_changed_pages
3518446744073709551615
36SET @@global.innodb_max_changed_pages = 105.54;
37ERROR 42000: Incorrect argument type to variable 'innodb_max_changed_pages'
38SELECT @@global.innodb_max_changed_pages;
39@@global.innodb_max_changed_pages
4018446744073709551615
41SET @@global.innodb_max_changed_pages = -200;
42Warnings:
43Warning 1292 Truncated incorrect innodb_max_changed_pages value: '-200'
44SELECT @@global.innodb_max_changed_pages;
45@@global.innodb_max_changed_pages
460
47SET @@global.innodb_max_changed_pages = ON;
48ERROR 42000: Incorrect argument type to variable 'innodb_max_changed_pages'
49SELECT @@global.innodb_max_changed_pages;
50@@global.innodb_max_changed_pages
510
52SET @@global.innodb_max_changed_pages = 'foo';
53ERROR 42000: Incorrect argument type to variable 'innodb_max_changed_pages'
54SELECT @@global.innodb_max_changed_pages;
55@@global.innodb_max_changed_pages
560
57SET @@session.innodb_max_changed_pages = 4096;
58ERROR HY000: Variable 'innodb_max_changed_pages' is a GLOBAL variable and should be set with SET GLOBAL
59SELECT @@session.innodb_max_changed_pages;
60ERROR HY000: Variable 'innodb_max_changed_pages' is a GLOBAL variable
61SELECT @@global.innodb_max_changed_pages = VARIABLE_VALUE
62FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
63WHERE VARIABLE_NAME='innodb_max_changed_pages';
64@@global.innodb_max_changed_pages = VARIABLE_VALUE
651
66SELECT @@global.innodb_max_changed_pages = VARIABLE_VALUE
67FROM INFORMATION_SCHEMA.SESSION_VARIABLES
68WHERE VARIABLE_NAME='innodb_max_changed_pages';
69@@global.innodb_max_changed_pages = VARIABLE_VALUE
701
71SET @@global.innodb_max_changed_pages=6789;
72SELECT @@global.innodb_max_changed_pages=@@innodb_max_changed_pages;
73@@global.innodb_max_changed_pages=@@innodb_max_changed_pages
741
75SET @@global.innodb_max_changed_pages=@start_value;
76SELECT @@global.innodb_max_changed_pages;
77@@global.innodb_max_changed_pages
781000000
079
=== added file 'Percona-Server/mysql-test/suite/sys_vars/t/innodb_max_changed_pages_basic.test'
--- Percona-Server/mysql-test/suite/sys_vars/t/innodb_max_changed_pages_basic.test 1970-01-01 00:00:00 +0000
+++ Percona-Server/mysql-test/suite/sys_vars/t/innodb_max_changed_pages_basic.test 2013-05-29 15:11:30 +0000
@@ -0,0 +1,60 @@
1# Tests for innodb_max_changed_pages variable
2--source include/have_innodb.inc
3
4SET @start_value = @@global.innodb_max_changed_pages;
5SELECT @start_value;
6
7SET @@global.innodb_max_changed_pages = 5000;
8SET @@global.innodb_max_changed_pages = DEFAULT;
9SELECT @@global.innodb_max_changed_pages;
10
11# Valid boundary values
12SET @@global.innodb_max_changed_pages = 0;
13SELECT @@global.innodb_max_changed_pages;
14SET @@global.innodb_max_changed_pages = 1;
15SELECT @@global.innodb_max_changed_pages;
16SET @@global.innodb_max_changed_pages = 18446744073709551614;
17SELECT @@global.innodb_max_changed_pages;
18SET @@global.innodb_max_changed_pages = 18446744073709551615;
19SELECT @@global.innodb_max_changed_pages;
20
21# Invalid values
22--error ER_WRONG_TYPE_FOR_VAR
23SET @@global.innodb_max_changed_pages = 18446744073709551616;
24SELECT @@global.innodb_max_changed_pages;
25--error ER_WRONG_TYPE_FOR_VAR
26SET @@global.innodb_max_changed_pages = 18446744073709551617;
27SELECT @@global.innodb_max_changed_pages;
28--error ER_WRONG_TYPE_FOR_VAR
29SET @@global.innodb_max_changed_pages = 105.54;
30SELECT @@global.innodb_max_changed_pages;
31SET @@global.innodb_max_changed_pages = -200;
32SELECT @@global.innodb_max_changed_pages;
33--error ER_WRONG_TYPE_FOR_VAR
34SET @@global.innodb_max_changed_pages = ON;
35SELECT @@global.innodb_max_changed_pages;
36--error ER_WRONG_TYPE_FOR_VAR
37SET @@global.innodb_max_changed_pages = 'foo';
38SELECT @@global.innodb_max_changed_pages;
39
40# Accessing as session variable forbidden
41--error ER_GLOBAL_VARIABLE
42SET @@session.innodb_max_changed_pages = 4096;
43--error ER_INCORRECT_GLOBAL_LOCAL_VAR
44SELECT @@session.innodb_max_changed_pages;
45
46# Verify INFORMATION_SCHEMA access
47SELECT @@global.innodb_max_changed_pages = VARIABLE_VALUE
48FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
49WHERE VARIABLE_NAME='innodb_max_changed_pages';
50
51SELECT @@global.innodb_max_changed_pages = VARIABLE_VALUE
52FROM INFORMATION_SCHEMA.SESSION_VARIABLES
53WHERE VARIABLE_NAME='innodb_max_changed_pages';
54
55# Check default scope
56SET @@global.innodb_max_changed_pages=6789;
57SELECT @@global.innodb_max_changed_pages=@@innodb_max_changed_pages;
58
59SET @@global.innodb_max_changed_pages=@start_value;
60SELECT @@global.innodb_max_changed_pages;
061
=== modified file 'Percona-Server/storage/innobase/handler/i_s.cc'
--- Percona-Server/storage/innobase/handler/i_s.cc 2013-05-15 05:05:18 +0000
+++ Percona-Server/storage/innobase/handler/i_s.cc 2013-05-29 15:11:30 +0000
@@ -52,7 +52,7 @@
52#include "dict0mem.h"52#include "dict0mem.h"
53#include "dict0types.h"53#include "dict0types.h"
54#include "ha_prototypes.h" /* for innobase_convert_name() */54#include "ha_prototypes.h" /* for innobase_convert_name() */
55#include "srv0srv.h" /* for srv_track_changed_pages */55#include "srv0srv.h" /* for srv_max_changed_pages */
56#include "srv0start.h" /* for srv_was_started */56#include "srv0start.h" /* for srv_was_started */
57#include "trx0i_s.h"57#include "trx0i_s.h"
58#include "trx0trx.h" /* for TRX_QUE_STATE_STR_MAX_LEN */58#include "trx0trx.h" /* for TRX_QUE_STATE_STR_MAX_LEN */
@@ -7473,6 +7473,7 @@
7473 ib_uint64_t output_rows_num = 0UL;7473 ib_uint64_t output_rows_num = 0UL;
7474 ib_uint64_t max_lsn = IB_ULONGLONG_MAX;7474 ib_uint64_t max_lsn = IB_ULONGLONG_MAX;
7475 ib_uint64_t min_lsn = 0ULL;7475 ib_uint64_t min_lsn = 0ULL;
7476 int ret = 0;
74767477
7477 DBUG_ENTER("i_s_innodb_changed_pages_fill");7478 DBUG_ENTER("i_s_innodb_changed_pages_fill");
74787479
@@ -7484,10 +7485,6 @@
74847485
7485 RETURN_IF_INNODB_NOT_STARTED(tables->schema_table_name);7486 RETURN_IF_INNODB_NOT_STARTED(tables->schema_table_name);
74867487
7487 if (!srv_track_changed_pages) {
7488 DBUG_RETURN(0);
7489 }
7490
7491 if (cond) {7488 if (cond) {
7492 limit_lsn_range_from_condition(table, cond, &min_lsn,7489 limit_lsn_range_from_condition(table, cond, &min_lsn,
7493 &max_lsn);7490 &max_lsn);
@@ -7563,8 +7560,13 @@
7563 ++output_rows_num;7560 ++output_rows_num;
7564 }7561 }
75657562
7563 if (i.failed) {
7564 my_error(ER_CANT_FIND_SYSTEM_REC, MYF(0));
7565 ret = 1;
7566 }
7567
7566 log_online_bitmap_iterator_release(&i);7568 log_online_bitmap_iterator_release(&i);
7567 DBUG_RETURN(0);7569 DBUG_RETURN(ret);
7568}7570}
75697571
7570static7572static
75717573
=== modified file 'Percona-Server/storage/innobase/include/log0log.h'
--- Percona-Server/storage/innobase/include/log0log.h 2013-04-02 18:49:46 +0000
+++ Percona-Server/storage/innobase/include/log0log.h 2013-05-29 15:11:30 +0000
@@ -400,7 +400,9 @@
400 byte* buf, /*!< in: buffer where to read */400 byte* buf, /*!< in: buffer where to read */
401 log_group_t* group, /*!< in: log group */401 log_group_t* group, /*!< in: log group */
402 ib_uint64_t start_lsn, /*!< in: read area start */402 ib_uint64_t start_lsn, /*!< in: read area start */
403 ib_uint64_t end_lsn); /*!< in: read area end */403 ib_uint64_t end_lsn, /*!< in: read area end */
404 ibool release_mutex); /*!< in: whether the log_sys->mutex
405 should be released before the read */
404/******************************************************//**406/******************************************************//**
405Writes a buffer to a log file group. */407Writes a buffer to a log file group. */
406UNIV_INTERN408UNIV_INTERN
407409
=== modified file 'Percona-Server/storage/innobase/include/log0online.h'
--- Percona-Server/storage/innobase/include/log0online.h 2013-01-30 13:42:52 +0000
+++ Percona-Server/storage/innobase/include/log0online.h 2013-05-29 15:11:30 +0000
@@ -159,6 +159,8 @@
159/** Struct for an iterator through all bits of changed pages bitmap blocks */159/** Struct for an iterator through all bits of changed pages bitmap blocks */
160struct log_bitmap_iterator_struct160struct log_bitmap_iterator_struct
161{161{
162 ibool failed; /*!< Has the iteration
163 stopped prematurely */
162 log_online_bitmap_file_range_t in_files; /*!< The bitmap files164 log_online_bitmap_file_range_t in_files; /*!< The bitmap files
163 for this iterator */165 for this iterator */
164 size_t in_i; /*!< Currently read166 size_t in_i; /*!< Currently read
165167
=== modified file 'Percona-Server/storage/innobase/include/os0file.h'
--- Percona-Server/storage/innobase/include/os0file.h 2013-02-06 09:26:12 +0000
+++ Percona-Server/storage/innobase/include/os0file.h 2013-05-29 15:11:30 +0000
@@ -76,15 +76,19 @@
76#endif76#endif
7777
78#ifdef __WIN__78#ifdef __WIN__
79#define SRV_PATH_SEPARATOR '\\'
79/** File handle */80/** File handle */
80# define os_file_t HANDLE81# define os_file_t HANDLE
82# define os_file_invalid INVALID_HANDLE_VALUE
81/** Convert a C file descriptor to a native file handle83/** Convert a C file descriptor to a native file handle
82@param fd file descriptor84@param fd file descriptor
83@return native file handle */85@return native file handle */
84# define OS_FILE_FROM_FD(fd) (HANDLE) _get_osfhandle(fd)86# define OS_FILE_FROM_FD(fd) (HANDLE) _get_osfhandle(fd)
85#else87#else
88#define SRV_PATH_SEPARATOR '/'
86/** File handle */89/** File handle */
87typedef int os_file_t;90typedef int os_file_t;
91# define os_file_invalid (-1)
88/** Convert a C file descriptor to a native file handle92/** Convert a C file descriptor to a native file handle
89@param fd file descriptor93@param fd file descriptor
90@return native file handle */94@return native file handle */
@@ -819,7 +823,6 @@
819 ulint src_line);/*!< in: line where the func invoked */823 ulint src_line);/*!< in: line where the func invoked */
820#endif /* UNIV_PFS_IO */824#endif /* UNIV_PFS_IO */
821825
822#ifdef UNIV_HOTBACKUP
823/***********************************************************************//**826/***********************************************************************//**
824Closes a file handle.827Closes a file handle.
825@return TRUE if success */828@return TRUE if success */
@@ -828,7 +831,6 @@
828os_file_close_no_error_handling(831os_file_close_no_error_handling(
829/*============================*/832/*============================*/
830 os_file_t file); /*!< in, own: handle to a file */833 os_file_t file); /*!< in, own: handle to a file */
831#endif /* UNIV_HOTBACKUP */
832/***********************************************************************//**834/***********************************************************************//**
833Gets a file size.835Gets a file size.
834@return TRUE if success */836@return TRUE if success */
835837
=== modified file 'Percona-Server/storage/innobase/log/log0log.c'
--- Percona-Server/storage/innobase/log/log0log.c 2013-04-03 06:56:50 +0000
+++ Percona-Server/storage/innobase/log/log0log.c 2013-05-29 15:11:30 +0000
@@ -2307,7 +2307,8 @@
2307}2307}
23082308
2309/******************************************************//**2309/******************************************************//**
2310Reads a specified log segment to a buffer. */2310Reads a specified log segment to a buffer. Optionally releases the log mutex
2311before the I/O. */
2311UNIV_INTERN2312UNIV_INTERN
2312void2313void
2313log_group_read_log_seg(2314log_group_read_log_seg(
@@ -2316,7 +2317,9 @@
2316 byte* buf, /*!< in: buffer where to read */2317 byte* buf, /*!< in: buffer where to read */
2317 log_group_t* group, /*!< in: log group */2318 log_group_t* group, /*!< in: log group */
2318 ib_uint64_t start_lsn, /*!< in: read area start */2319 ib_uint64_t start_lsn, /*!< in: read area start */
2319 ib_uint64_t end_lsn) /*!< in: read area end */2320 ib_uint64_t end_lsn, /*!< in: read area end */
2321 ibool release_mutex) /*!< in: whether the log_sys->mutex
2322 should be released before the read */
2320{2323{
2321 ulint len;2324 ulint len;
2322 ulint source_offset;2325 ulint source_offset;
@@ -2346,6 +2349,10 @@
23462349
2347 log_sys->n_log_ios++;2350 log_sys->n_log_ios++;
23482351
2352 if (release_mutex) {
2353 mutex_exit(&(log_sys->mutex));
2354 }
2355
2349 fil_io(OS_FILE_READ | OS_FILE_LOG, sync, group->space_id, 0,2356 fil_io(OS_FILE_READ | OS_FILE_LOG, sync, group->space_id, 0,
2350 source_offset / UNIV_PAGE_SIZE, source_offset % UNIV_PAGE_SIZE,2357 source_offset / UNIV_PAGE_SIZE, source_offset % UNIV_PAGE_SIZE,
2351 len, buf, NULL);2358 len, buf, NULL);
@@ -2355,6 +2362,9 @@
23552362
2356 if (start_lsn != end_lsn) {2363 if (start_lsn != end_lsn) {
23572364
2365 if (release_mutex) {
2366 mutex_enter(&(log_sys->mutex));
2367 }
2358 goto loop;2368 goto loop;
2359 }2369 }
2360}2370}
@@ -2846,7 +2856,7 @@
28462856
2847 log_group_read_log_seg(LOG_ARCHIVE, log_sys->archive_buf,2857 log_group_read_log_seg(LOG_ARCHIVE, log_sys->archive_buf,
2848 UT_LIST_GET_FIRST(log_sys->log_groups),2858 UT_LIST_GET_FIRST(log_sys->log_groups),
2849 start_lsn, limit_lsn);2859 start_lsn, limit_lsn, FALSE);
28502860
2851 mutex_exit(&(log_sys->mutex));2861 mutex_exit(&(log_sys->mutex));
28522862
28532863
=== modified file 'Percona-Server/storage/innobase/log/log0online.c'
--- Percona-Server/storage/innobase/log/log0online.c 2013-04-04 03:54:12 +0000
+++ Percona-Server/storage/innobase/log/log0online.c 2013-05-29 15:11:30 +0000
@@ -43,8 +43,8 @@
4343
44/** Log parsing and bitmap output data structure */44/** Log parsing and bitmap output data structure */
45struct log_bitmap_struct {45struct log_bitmap_struct {
46 byte read_buf[FOLLOW_SCAN_SIZE];46 byte* read_buf_ptr; /*!< Unaligned log read buffer */
47 /*!< log read buffer */47 byte* read_buf; /*!< log read buffer */
48 byte parse_buf[RECV_PARSING_BUF_SIZE];48 byte parse_buf[RECV_PARSING_BUF_SIZE];
49 /*!< log parse buffer */49 /*!< log parse buffer */
50 byte* parse_buf_end; /*!< parse buffer position where the50 byte* parse_buf_end; /*!< parse buffer position where the
@@ -53,6 +53,8 @@
53 parsed, it points to the start,53 parsed, it points to the start,
54 otherwise points immediatelly past the54 otherwise points immediatelly past the
55 end of the incomplete log record. */55 end of the incomplete log record. */
56 char bmp_file_home[FN_REFLEN];
57 /*!< directory for bitmap files */
56 log_online_bitmap_file_t out; /*!< The current bitmap file */58 log_online_bitmap_file_t out; /*!< The current bitmap file */
57 ulint out_seq_num; /*!< the bitmap file sequence number */59 ulint out_seq_num; /*!< the bitmap file sequence number */
58 ib_uint64_t start_lsn; /*!< the LSN of the next unparsed60 ib_uint64_t start_lsn; /*!< the LSN of the next unparsed
@@ -490,9 +492,8 @@
490 ib_uint64_t start_lsn) /*!< in: the start LSN name part */492 ib_uint64_t start_lsn) /*!< in: the start LSN name part */
491{493{
492 ut_snprintf(log_bmp_sys->out.name, FN_REFLEN, bmp_file_name_template,494 ut_snprintf(log_bmp_sys->out.name, FN_REFLEN, bmp_file_name_template,
493 srv_data_home, bmp_file_name_stem,495 log_bmp_sys->bmp_file_home, bmp_file_name_stem,
494 log_bmp_sys->out_seq_num, start_lsn);496 log_bmp_sys->out_seq_num, start_lsn);
495
496}497}
497498
498/*********************************************************************//**499/*********************************************************************//**
@@ -509,7 +510,8 @@
509510
510 /* Currently, it's OK to overwrite 0-sized files only */511 /* Currently, it's OK to overwrite 0-sized files only */
511 success = os_file_get_status(path, &file_info);512 success = os_file_get_status(path, &file_info);
512 return success && file_info.size == 0LL;513 return success && file_info.type == OS_FILE_TYPE_FILE
514 && file_info.size == 0LL;
513}515}
514516
515/*********************************************************************//**517/*********************************************************************//**
@@ -525,7 +527,7 @@
525527
526 /* Check for an old file that should be deleted first */528 /* Check for an old file that should be deleted first */
527 if (log_online_should_overwrite(log_bmp_sys->out.name)) {529 if (log_online_should_overwrite(log_bmp_sys->out.name)) {
528 success = os_file_delete(log_bmp_sys->out.name);530 success = os_file_delete_if_exists(log_bmp_sys->out.name);
529 }531 }
530532
531 if (UNIV_LIKELY(success)) {533 if (UNIV_LIKELY(success)) {
@@ -544,7 +546,6 @@
544 fprintf(stderr,546 fprintf(stderr,
545 "InnoDB: Error: Cannot create \'%s\'\n",547 "InnoDB: Error: Cannot create \'%s\'\n",
546 log_bmp_sys->out.name);548 log_bmp_sys->out.name);
547 log_bmp_sys->out.file = -1;
548 return FALSE;549 return FALSE;
549 }550 }
550551
@@ -563,9 +564,9 @@
563 ib_uint64_t next_file_start_lsn) /*!<in: the start LSN name564 ib_uint64_t next_file_start_lsn) /*!<in: the start LSN name
564 part */565 part */
565{566{
566 if (log_bmp_sys->out.file != -1) {567 if (log_bmp_sys->out.file != os_file_invalid) {
567 os_file_close(log_bmp_sys->out.file);568 os_file_close(log_bmp_sys->out.file);
568 log_bmp_sys->out.file = -1;569 log_bmp_sys->out.file = os_file_invalid;
569 }570 }
570 log_bmp_sys->out_seq_num++;571 log_bmp_sys->out_seq_num++;
571 log_online_make_bitmap_name(next_file_start_lsn);572 log_online_make_bitmap_name(next_file_start_lsn);
@@ -613,6 +614,7 @@
613 os_file_dir_t bitmap_dir;614 os_file_dir_t bitmap_dir;
614 os_file_stat_t bitmap_dir_file_info;615 os_file_stat_t bitmap_dir_file_info;
615 ib_uint64_t last_file_start_lsn = MIN_TRACKED_LSN;616 ib_uint64_t last_file_start_lsn = MIN_TRACKED_LSN;
617 size_t srv_data_home_len;
616618
617 /* Bitmap data start and end in a bitmap block must be 8-byte619 /* Bitmap data start and end in a bitmap block must be 8-byte
618 aligned. */620 aligned. */
@@ -620,20 +622,39 @@
620 compile_time_assert(MODIFIED_PAGE_BLOCK_BITMAP_LEN % 8 == 0);622 compile_time_assert(MODIFIED_PAGE_BLOCK_BITMAP_LEN % 8 == 0);
621623
622 log_bmp_sys = ut_malloc(sizeof(*log_bmp_sys));624 log_bmp_sys = ut_malloc(sizeof(*log_bmp_sys));
625 log_bmp_sys->read_buf_ptr = ut_malloc(FOLLOW_SCAN_SIZE
626 + OS_FILE_LOG_BLOCK_SIZE);
627 log_bmp_sys->read_buf = ut_align(log_bmp_sys->read_buf_ptr,
628 OS_FILE_LOG_BLOCK_SIZE);
623629
624 mutex_create(log_bmp_sys_mutex_key, &log_bmp_sys->mutex,630 mutex_create(log_bmp_sys_mutex_key, &log_bmp_sys->mutex,
625 SYNC_LOG_ONLINE);631 SYNC_LOG_ONLINE);
626632
633 /* Initialize bitmap file directory from srv_data_home and add a path
634 separator if needed. */
635 srv_data_home_len = strlen(srv_data_home);
636 ut_a (srv_data_home_len < FN_REFLEN);
637 strcpy(log_bmp_sys->bmp_file_home, srv_data_home);
638 if (srv_data_home_len
639 && log_bmp_sys->bmp_file_home[srv_data_home_len - 1]
640 != SRV_PATH_SEPARATOR) {
641
642 ut_a (srv_data_home_len < FN_REFLEN - 1);
643 log_bmp_sys->bmp_file_home[srv_data_home_len]
644 = SRV_PATH_SEPARATOR;
645 log_bmp_sys->bmp_file_home[srv_data_home_len + 1] = '\0';
646 }
647
627 /* Enumerate existing bitmap files to either open the last one to get648 /* Enumerate existing bitmap files to either open the last one to get
628 the last tracked LSN either to find that there are none and start649 the last tracked LSN either to find that there are none and start
629 tracking from scratch. */650 tracking from scratch. */
630 log_bmp_sys->out.name[0] = '\0';651 log_bmp_sys->out.name[0] = '\0';
631 log_bmp_sys->out_seq_num = 0;652 log_bmp_sys->out_seq_num = 0;
632653
633 bitmap_dir = os_file_opendir(srv_data_home, TRUE);654 bitmap_dir = os_file_opendir(log_bmp_sys->bmp_file_home, TRUE);
634 ut_a(bitmap_dir);655 ut_a(bitmap_dir);
635 while (!os_file_readdir_next_file(srv_data_home, bitmap_dir,656 while (!os_file_readdir_next_file(log_bmp_sys->bmp_file_home,
636 &bitmap_dir_file_info)) {657 bitmap_dir, &bitmap_dir_file_info)) {
637658
638 ulong file_seq_num;659 ulong file_seq_num;
639 ib_uint64_t file_start_lsn;660 ib_uint64_t file_start_lsn;
@@ -648,8 +669,8 @@
648 && bitmap_dir_file_info.size > 0) {669 && bitmap_dir_file_info.size > 0) {
649 log_bmp_sys->out_seq_num = file_seq_num;670 log_bmp_sys->out_seq_num = file_seq_num;
650 last_file_start_lsn = file_start_lsn;671 last_file_start_lsn = file_start_lsn;
651 /* No dir component (srv_data_home) here, because672 /* No dir component (log_bmp_sys->bmp_file_home) here,
652 that's the cwd */673 because that's the cwd */
653 strncpy(log_bmp_sys->out.name,674 strncpy(log_bmp_sys->out.name,
654 bitmap_dir_file_info.name, FN_REFLEN - 1);675 bitmap_dir_file_info.name, FN_REFLEN - 1);
655 log_bmp_sys->out.name[FN_REFLEN - 1] = '\0';676 log_bmp_sys->out.name[FN_REFLEN - 1] = '\0';
@@ -659,7 +680,7 @@
659 if (os_file_closedir(bitmap_dir)) {680 if (os_file_closedir(bitmap_dir)) {
660 os_file_get_last_error(TRUE);681 os_file_get_last_error(TRUE);
661 fprintf(stderr, "InnoDB: Error: cannot close \'%s\'\n",682 fprintf(stderr, "InnoDB: Error: cannot close \'%s\'\n",
662 srv_data_home);683 log_bmp_sys->bmp_file_home);
663 exit(1);684 exit(1);
664 }685 }
665686
@@ -762,9 +783,9 @@
762{783{
763 ib_rbt_node_t *free_list_node = log_bmp_sys->page_free_list;784 ib_rbt_node_t *free_list_node = log_bmp_sys->page_free_list;
764785
765 if (log_bmp_sys->out.file != -1) {786 if (log_bmp_sys->out.file != os_file_invalid) {
766 os_file_close(log_bmp_sys->out.file);787 os_file_close(log_bmp_sys->out.file);
767 log_bmp_sys->out.file = -1;788 log_bmp_sys->out.file = os_file_invalid;
768 }789 }
769790
770 rbt_free(log_bmp_sys->modified_pages);791 rbt_free(log_bmp_sys->modified_pages);
@@ -777,6 +798,7 @@
777798
778 mutex_free(&log_bmp_sys->mutex);799 mutex_free(&log_bmp_sys->mutex);
779800
801 ut_free(log_bmp_sys->read_buf_ptr);
780 ut_free(log_bmp_sys);802 ut_free(log_bmp_sys);
781}803}
782804
@@ -978,8 +1000,8 @@
9781000
979 mutex_enter(&log_sys->mutex);1001 mutex_enter(&log_sys->mutex);
980 log_group_read_log_seg(LOG_RECOVER, log_bmp_sys->read_buf,1002 log_group_read_log_seg(LOG_RECOVER, log_bmp_sys->read_buf,
981 group, block_start_lsn, block_end_lsn);1003 group, block_start_lsn, block_end_lsn, TRUE);
982 mutex_exit(&log_sys->mutex);1004 /* log_group_read_log_seg will release the log_sys->mutex for us */
9831005
984 while (log_block < log_block_end1006 while (log_block < log_block_end
985 && log_bmp_sys->next_parse_lsn < log_bmp_sys->end_lsn) {1007 && log_bmp_sys->next_parse_lsn < log_bmp_sys->end_lsn) {
@@ -1256,15 +1278,18 @@
1256 os_file_dir_t bitmap_dir;1278 os_file_dir_t bitmap_dir;
1257 os_file_stat_t bitmap_dir_file_info;1279 os_file_stat_t bitmap_dir_file_info;
1258 ulong first_file_seq_num = ULONG_MAX;1280 ulong first_file_seq_num = ULONG_MAX;
1281 ulong last_file_seq_num = 0;
1259 ib_uint64_t first_file_start_lsn = IB_ULONGLONG_MAX;1282 ib_uint64_t first_file_start_lsn = IB_ULONGLONG_MAX;
12601283
1284 ut_ad(range_end >= range_start);
1285
1261 bitmap_files->count = 0;1286 bitmap_files->count = 0;
1262 bitmap_files->files = NULL;1287 bitmap_files->files = NULL;
12631288
1264 /* 1st pass: size the info array */1289 /* 1st pass: size the info array */
12651290
1266 bitmap_dir = os_file_opendir(srv_data_home, FALSE);1291 bitmap_dir = os_file_opendir(srv_data_home, FALSE);
1267 if (!bitmap_dir) {1292 if (UNIV_UNLIKELY(!bitmap_dir)) {
1268 fprintf(stderr,1293 fprintf(stderr,
1269 "InnoDB: Error: "1294 "InnoDB: Error: "
1270 "failed to open bitmap directory \'%s\'\n",1295 "failed to open bitmap directory \'%s\'\n",
@@ -1286,12 +1311,17 @@
1286 continue;1311 continue;
1287 }1312 }
12881313
1314 if (file_seq_num > last_file_seq_num) {
1315
1316 last_file_seq_num = file_seq_num;
1317 }
1318
1289 if (file_start_lsn >= range_start1319 if (file_start_lsn >= range_start
1290 || file_start_lsn == first_file_start_lsn1320 || file_start_lsn == first_file_start_lsn
1291 || first_file_start_lsn > range_start) {1321 || first_file_start_lsn > range_start) {
12921322
1293 /* A file that falls into the range */1323 /* A file that falls into the range */
1294 bitmap_files->count++;1324
1295 if (file_start_lsn < first_file_start_lsn) {1325 if (file_start_lsn < first_file_start_lsn) {
12961326
1297 first_file_start_lsn = file_start_lsn;1327 first_file_start_lsn = file_start_lsn;
@@ -1309,23 +1339,27 @@
1309 }1339 }
1310 }1340 }
13111341
1312 ut_a(first_file_seq_num != ULONG_MAX || bitmap_files->count == 0);1342 if (UNIV_UNLIKELY(os_file_closedir(bitmap_dir))) {
13131343
1314 if (os_file_closedir(bitmap_dir)) {
1315 os_file_get_last_error(TRUE);1344 os_file_get_last_error(TRUE);
1316 fprintf(stderr, "InnoDB: Error: cannot close \'%s\'\n",1345 fprintf(stderr, "InnoDB: Error: cannot close \'%s\'\n",
1317 srv_data_home);1346 srv_data_home);
1318 return FALSE;1347 return FALSE;
1319 }1348 }
13201349
1321 if (!bitmap_files->count) {1350 if (first_file_seq_num == ULONG_MAX && last_file_seq_num == 0) {
1351
1352 bitmap_files->count = 0;
1322 return TRUE;1353 return TRUE;
1323 }1354 }
13241355
1356 bitmap_files->count = last_file_seq_num - first_file_seq_num + 1;
1357
1325 /* 2nd pass: get the file names in the file_seq_num order */1358 /* 2nd pass: get the file names in the file_seq_num order */
13261359
1327 bitmap_dir = os_file_opendir(srv_data_home, FALSE);1360 bitmap_dir = os_file_opendir(srv_data_home, FALSE);
1328 if (!bitmap_dir) {1361 if (UNIV_UNLIKELY(!bitmap_dir)) {
1362
1329 fprintf(stderr, "InnoDB: Error: "1363 fprintf(stderr, "InnoDB: Error: "
1330 "failed to open bitmap directory \'%s\'\n",1364 "failed to open bitmap directory \'%s\'\n",
1331 srv_data_home);1365 srv_data_home);
@@ -1349,11 +1383,25 @@
1349 &file_start_lsn)1383 &file_start_lsn)
1350 || file_start_lsn >= range_end1384 || file_start_lsn >= range_end
1351 || file_start_lsn < first_file_start_lsn) {1385 || file_start_lsn < first_file_start_lsn) {
1386
1352 continue;1387 continue;
1353 }1388 }
13541389
1355 array_pos = file_seq_num - first_file_seq_num;1390 array_pos = file_seq_num - first_file_seq_num;
1391 if (UNIV_UNLIKELY(array_pos >= bitmap_files->count)) {
1392
1393 fprintf(stderr,
1394 "InnoDB: Error: inconsistent bitmap file "
1395 "directory for a "
1396 "INFORMATION_SCHEMA.INNODB_CHANGED_PAGES query"
1397 "\n");
1398 free(bitmap_files->files);
1399 return FALSE;
1400 }
1401
1402
1356 if (file_seq_num > bitmap_files->files[array_pos].seq_num) {1403 if (file_seq_num > bitmap_files->files[array_pos].seq_num) {
1404
1357 bitmap_files->files[array_pos].seq_num = file_seq_num;1405 bitmap_files->files[array_pos].seq_num = file_seq_num;
1358 strncpy(bitmap_files->files[array_pos].name,1406 strncpy(bitmap_files->files[array_pos].name,
1359 bitmap_dir_file_info.name, FN_REFLEN);1407 bitmap_dir_file_info.name, FN_REFLEN);
@@ -1364,7 +1412,8 @@
1364 }1412 }
1365 }1413 }
13661414
1367 if (os_file_closedir(bitmap_dir)) {1415 if (UNIV_UNLIKELY(os_file_closedir(bitmap_dir))) {
1416
1368 os_file_get_last_error(TRUE);1417 os_file_get_last_error(TRUE);
1369 fprintf(stderr, "InnoDB: Error: cannot close \'%s\'\n",1418 fprintf(stderr, "InnoDB: Error: cannot close \'%s\'\n",
1370 srv_data_home);1419 srv_data_home);
@@ -1411,6 +1460,8 @@
1411 ulint size_low;1460 ulint size_low;
1412 ulint size_high;1461 ulint size_high;
14131462
1463 ut_ad(name[0] != '\0');
1464
1414 ut_snprintf(bitmap_file->name, FN_REFLEN, "%s%s", srv_data_home, name);1465 ut_snprintf(bitmap_file->name, FN_REFLEN, "%s%s", srv_data_home, name);
1415 bitmap_file->file1466 bitmap_file->file
1416 = os_file_create_simple_no_error_handling(innodb_file_bmp_key,1467 = os_file_create_simple_no_error_handling(innodb_file_bmp_key,
@@ -1418,7 +1469,8 @@
1418 OS_FILE_OPEN,1469 OS_FILE_OPEN,
1419 OS_FILE_READ_ONLY,1470 OS_FILE_READ_ONLY,
1420 &success);1471 &success);
1421 if (!success) {1472 if (UNIV_UNLIKELY(!success)) {
1473
1422 /* Here and below assume that bitmap file names do not1474 /* Here and below assume that bitmap file names do not
1423 contain apostrophes, thus no need for ut_print_filename(). */1475 contain apostrophes, thus no need for ut_print_filename(). */
1424 fprintf(stderr,1476 fprintf(stderr,
@@ -1461,7 +1513,8 @@
1461 || (bitmap_file->offset1513 || (bitmap_file->offset
1462 > bitmap_file->size - MODIFIED_PAGE_BLOCK_SIZE)) {1514 > bitmap_file->size - MODIFIED_PAGE_BLOCK_SIZE)) {
14631515
1464 if (bitmap_file->offset != bitmap_file->size) {1516 if (UNIV_UNLIKELY(bitmap_file->offset != bitmap_file->size)) {
1517
1465 /* If we are not at EOF and we have less than one page1518 /* If we are not at EOF and we have less than one page
1466 to read, it's junk. This error is not fatal in1519 to read, it's junk. This error is not fatal in
1467 itself. */1520 itself. */
@@ -1472,7 +1525,8 @@
1472 bitmap_file->name);1525 bitmap_file->name);
1473 }1526 }
14741527
1475 if (!last_page_in_run) {1528 if (UNIV_UNLIKELY(!last_page_in_run)) {
1529
1476 /* We are at EOF but the last read page did not finish1530 /* We are at EOF but the last read page did not finish
1477 a run */1531 a run */
1478 /* It's a "Warning" here because it's not a fatal error1532 /* It's a "Warning" here because it's not a fatal error
@@ -1512,18 +1566,29 @@
1512 if (!log_online_setup_bitmap_file_range(&i->in_files, min_lsn,1566 if (!log_online_setup_bitmap_file_range(&i->in_files, min_lsn,
1513 max_lsn)) {1567 max_lsn)) {
15141568
1569 i->failed = TRUE;
1515 return FALSE;1570 return FALSE;
1516 }1571 }
15171572
1518 ut_a(i->in_files.count > 0);1573 i->in_i = 0;
1574
1575 if (i->in_files.count == 0) {
1576
1577 /* Empty range */
1578 i->in.file = os_file_invalid;
1579 i->page = NULL;
1580 i->failed = FALSE;
1581 return TRUE;
1582 }
15191583
1520 /* Open the 1st bitmap file */1584 /* Open the 1st bitmap file */
1521 i->in_i = 0;1585 if (UNIV_UNLIKELY(!log_online_open_bitmap_file_read_only(
1522 if (!log_online_open_bitmap_file_read_only(i->in_files.files[i->in_i].1586 i->in_files.files[i->in_i].name,
1523 name,1587 &i->in))) {
1524 &i->in)) {1588
1525 i->in_i = i->in_files.count;1589 i->in_i = i->in_files.count;
1526 free(i->in_files.files);1590 free(i->in_files.files);
1591 i->failed = TRUE;
1527 return FALSE;1592 return FALSE;
1528 }1593 }
15291594
@@ -1534,6 +1599,7 @@
1534 i->first_page_id = 0;1599 i->first_page_id = 0;
1535 i->last_page_in_run = TRUE;1600 i->last_page_in_run = TRUE;
1536 i->changed = FALSE;1601 i->changed = FALSE;
1602 i->failed = FALSE;
15371603
1538 return TRUE;1604 return TRUE;
1539}1605}
@@ -1548,11 +1614,20 @@
1548{1614{
1549 ut_a(i);1615 ut_a(i);
15501616
1551 if (i->in_i < i->in_files.count) {1617 if (i->in.file != os_file_invalid) {
1618
1552 os_file_close(i->in.file);1619 os_file_close(i->in.file);
1553 }1620 i->in.file = os_file_invalid;
1554 ut_free(i->in_files.files);1621 }
1555 ut_free(i->page);1622 if (i->in_files.files) {
1623
1624 ut_free(i->in_files.files);
1625 }
1626 if (i->page) {
1627
1628 ut_free(i->page);
1629 }
1630 i->failed = TRUE;
1556}1631}
15571632
1558/*********************************************************************//**1633/*********************************************************************//**
@@ -1567,10 +1642,16 @@
1567 log_bitmap_iterator_t *i) /*!<in/out: iterator */1642 log_bitmap_iterator_t *i) /*!<in/out: iterator */
1568{1643{
1569 ibool checksum_ok = FALSE;1644 ibool checksum_ok = FALSE;
1645 ibool success;
15701646
1571 ut_a(i);1647 ut_a(i);
15721648
1573 if (i->bit_offset < MODIFIED_PAGE_BLOCK_BITMAP_LEN)1649 if (UNIV_UNLIKELY(i->in_files.count == 0)) {
1650
1651 return FALSE;
1652 }
1653
1654 if (UNIV_LIKELY(i->bit_offset < MODIFIED_PAGE_BLOCK_BITMAP_LEN))
1574 {1655 {
1575 ++i->bit_offset;1656 ++i->bit_offset;
1576 i->changed =1657 i->changed =
@@ -1587,29 +1668,56 @@
15871668
1588 /* Advance file */1669 /* Advance file */
1589 i->in_i++;1670 i->in_i++;
1590 os_file_close(i->in.file);1671 success = os_file_close_no_error_handling(i->in.file);
1591 log_online_diagnose_bitmap_eof(&i->in,1672 i->in.file = os_file_invalid;
1592 i->last_page_in_run);1673 if (UNIV_UNLIKELY(!success)) {
1593 if (i->in_i == i->in_files.count1674
1594 || i->in_files.files[i->in_i].seq_num == 0) {1675 os_file_get_last_error(TRUE);
15951676 i->failed = TRUE;
1596 return FALSE;1677 return FALSE;
1597 }1678 }
15981679
1599 if (!log_online_open_bitmap_file_read_only(1680 success = log_online_diagnose_bitmap_eof(
1681 &i->in, i->last_page_in_run);
1682 if (UNIV_UNLIKELY(!success)) {
1683
1684 i->failed = TRUE;
1685 return FALSE;
1686
1687 }
1688
1689 if (i->in_i == i->in_files.count) {
1690
1691 return FALSE;
1692 }
1693
1694 if (UNIV_UNLIKELY(i->in_files.files[i->in_i].seq_num
1695 == 0)) {
1696
1697 i->failed = TRUE;
1698 return FALSE;
1699 }
1700
1701 success = log_online_open_bitmap_file_read_only(
1600 i->in_files.files[i->in_i].name,1702 i->in_files.files[i->in_i].name,
1601 &i->in)) {1703 &i->in);
1704 if (UNIV_UNLIKELY(!success)) {
1705
1706 i->failed = TRUE;
1602 return FALSE;1707 return FALSE;
1603 }1708 }
1604 }1709 }
16051710
1606 if (!log_online_read_bitmap_page(&i->in, i->page,1711 success = log_online_read_bitmap_page(&i->in, i->page,
1607 &checksum_ok)) {1712 &checksum_ok);
1713 if (UNIV_UNLIKELY(!success)) {
1714
1608 os_file_get_last_error(TRUE);1715 os_file_get_last_error(TRUE);
1609 fprintf(stderr,1716 fprintf(stderr,
1610 "InnoDB: Warning: failed reading "1717 "InnoDB: Warning: failed reading "
1611 "changed page bitmap file \'%s\'\n",1718 "changed page bitmap file \'%s\'\n",
1612 i->in_files.files[i->in_i].name);1719 i->in_files.files[i->in_i].name);
1720 i->failed = TRUE;
1613 return FALSE;1721 return FALSE;
1614 }1722 }
1615 }1723 }
@@ -1666,7 +1774,7 @@
1666 /* If we have to delete the current output file, close it1774 /* If we have to delete the current output file, close it
1667 first. */1775 first. */
1668 os_file_close(log_bmp_sys->out.file);1776 os_file_close(log_bmp_sys->out.file);
1669 log_bmp_sys->out.file = -1;1777 log_bmp_sys->out.file = os_file_invalid;
1670 }1778 }
16711779
1672 for (i = 0; i < bitmap_files.count; i++) {1780 for (i = 0; i < bitmap_files.count; i++) {
16731781
=== modified file 'Percona-Server/storage/innobase/log/log0recv.c'
--- Percona-Server/storage/innobase/log/log0recv.c 2013-05-23 08:39:28 +0000
+++ Percona-Server/storage/innobase/log/log0recv.c 2013-05-29 15:11:30 +0000
@@ -546,7 +546,8 @@
546 }546 }
547547
548 log_group_read_log_seg(LOG_RECOVER, log_sys->buf,548 log_group_read_log_seg(LOG_RECOVER, log_sys->buf,
549 up_to_date_group, start_lsn, end_lsn);549 up_to_date_group, start_lsn, end_lsn,
550 FALSE);
550551
551 len = (ulint) (end_lsn - start_lsn);552 len = (ulint) (end_lsn - start_lsn);
552553
@@ -590,7 +591,7 @@
590 ut_a(start_lsn != end_lsn);591 ut_a(start_lsn != end_lsn);
591592
592 log_group_read_log_seg(LOG_RECOVER, recv_sys->last_block,593 log_group_read_log_seg(LOG_RECOVER, recv_sys->last_block,
593 up_to_date_group, start_lsn, end_lsn);594 up_to_date_group, start_lsn, end_lsn, FALSE);
594595
595 group = UT_LIST_GET_FIRST(log_sys->log_groups);596 group = UT_LIST_GET_FIRST(log_sys->log_groups);
596597
@@ -2887,7 +2888,7 @@
2887 end_lsn = start_lsn + RECV_SCAN_SIZE;2888 end_lsn = start_lsn + RECV_SCAN_SIZE;
28882889
2889 log_group_read_log_seg(LOG_RECOVER, log_sys->buf,2890 log_group_read_log_seg(LOG_RECOVER, log_sys->buf,
2890 group, start_lsn, end_lsn);2891 group, start_lsn, end_lsn, FALSE);
28912892
2892 finished = recv_scan_log_recs(2893 finished = recv_scan_log_recs(
2893 (buf_pool_get_n_pages()2894 (buf_pool_get_n_pages()
28942895
=== modified file 'Percona-Server/storage/innobase/os/os0file.c'
--- Percona-Server/storage/innobase/os/os0file.c 2013-05-23 08:39:28 +0000
+++ Percona-Server/storage/innobase/os/os0file.c 2013-05-29 15:11:30 +0000
@@ -1890,7 +1890,6 @@
1890#endif1890#endif
1891}1891}
18921892
1893#ifdef UNIV_HOTBACKUP
1894/***********************************************************************//**1893/***********************************************************************//**
1895Closes a file handle.1894Closes a file handle.
1896@return TRUE if success */1895@return TRUE if success */
@@ -1925,7 +1924,6 @@
1925 return(TRUE);1924 return(TRUE);
1926#endif1925#endif
1927}1926}
1928#endif /* UNIV_HOTBACKUP */
19291927
1930/***********************************************************************//**1928/***********************************************************************//**
1931Gets a file size.1929Gets a file size.
19321930
=== modified file 'Percona-Server/storage/innobase/srv/srv0start.c'
--- Percona-Server/storage/innobase/srv/srv0start.c 2013-02-04 11:28:50 +0000
+++ Percona-Server/storage/innobase/srv/srv0start.c 2013-05-29 15:11:30 +0000
@@ -496,12 +496,6 @@
496}496}
497#endif /* !UNIV_HOTBACKUP */497#endif /* !UNIV_HOTBACKUP */
498498
499#ifdef __WIN__
500#define SRV_PATH_SEPARATOR '\\'
501#else
502#define SRV_PATH_SEPARATOR '/'
503#endif
504
505/*********************************************************************//**499/*********************************************************************//**
506Normalizes a directory path for Windows: converts slashes to backslashes. */500Normalizes a directory path for Windows: converts slashes to backslashes. */
507UNIV_INTERN501UNIV_INTERN

Subscribers

People subscribed via source and target branches