Merge lp:~laurynas-biveinis/percona-server/bmp-fixes-5.5 into lp:percona-server/5.5
- bmp-fixes-5.5
- Merge into 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 |
Related bugs: |
|
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Stewart Smith (community) | Approve | ||
Review via email: mp+166280@code.launchpad.net |
Commit message
Description of the change
Merge bitmap fixes from 5.1, add 5.5+-specific fixes.
http://
To post a comment you must log in.
Revision history for this message
Laurynas Biveinis (laurynas-biveinis) wrote : | # |
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-02-04 13:53:47 +0000 | |||
3 | +++ Percona-Server/mysql-test/suite/innodb/r/percona_changed_page_bmp.result 2013-05-29 15:11:30 +0000 | |||
4 | @@ -47,13 +47,20 @@ | |||
5 | 47 | ib_modified_log_1 | 47 | ib_modified_log_1 |
6 | 48 | ib_modified_log_2 | 48 | ib_modified_log_2 |
7 | 49 | ib_modified_log_3 | 49 | ib_modified_log_3 |
8 | 50 | DROP TABLE t1, t2; | ||
9 | 50 | 8th restart | 51 | 8th restart |
10 | 51 | RESET CHANGED_PAGE_BITMAPS; | 52 | RESET CHANGED_PAGE_BITMAPS; |
11 | 52 | call mtr.add_suppression("InnoDB: Error: page [0-9]* log sequence number [0-9]*"); | 53 | call mtr.add_suppression("InnoDB: Error: page [0-9]* log sequence number [0-9]*"); |
12 | 53 | 9th restart | 54 | 9th restart |
13 | 55 | <<<<<<< TREE | ||
14 | 54 | CREATE TABLE t3 (a MEDIUMBLOB) ENGINE=InnoDB; | 56 | CREATE TABLE t3 (a MEDIUMBLOB) ENGINE=InnoDB; |
15 | 55 | call mtr.add_suppression("InnoDB: Error: the age of the oldest untracked record exceeds the log group capacity!"); | 57 | call mtr.add_suppression("InnoDB: Error: the age of the oldest untracked record exceeds the log group capacity!"); |
16 | 56 | call mtr.add_suppression("InnoDB: Error: stopping the log tracking thread at LSN"); | 58 | call mtr.add_suppression("InnoDB: Error: stopping the log tracking thread at LSN"); |
17 | 57 | INSERT INTO t3 VALUES (REPEAT('a', 12582912)); | 59 | INSERT INTO t3 VALUES (REPEAT('a', 12582912)); |
18 | 58 | 10th restart | 60 | 10th restart |
19 | 59 | DROP TABLE t1, t2, t3; | 61 | DROP TABLE t1, t2, t3; |
20 | 62 | ======= | ||
21 | 63 | ib_modified_log_1 | ||
22 | 64 | 10th restart | ||
23 | 65 | 11th restart | ||
24 | 66 | >>>>>>> MERGE-SOURCE | ||
25 | 60 | 67 | ||
26 | === modified file 'Percona-Server/mysql-test/suite/innodb/r/percona_changed_pages.result' | |||
27 | --- Percona-Server/mysql-test/suite/innodb/r/percona_changed_pages.result 2013-01-29 15:14:23 +0000 | |||
28 | +++ Percona-Server/mysql-test/suite/innodb/r/percona_changed_pages.result 2013-05-29 15:11:30 +0000 | |||
29 | @@ -1,5 +1,5 @@ | |||
30 | 1 | RESET CHANGED_PAGE_BITMAPS; | 1 | RESET CHANGED_PAGE_BITMAPS; |
32 | 2 | DROP TABLE IF EXISTS T1; | 2 | DROP TABLE IF EXISTS T1, ICP_COPY; |
33 | 3 | CREATE TABLE T1 (F1 CHAR(255)) ENGINE=INNODB; | 3 | CREATE TABLE T1 (F1 CHAR(255)) ENGINE=INNODB; |
34 | 4 | 1st interval end LSN greater than interval start LSN: | 4 | 1st interval end LSN greater than interval start LSN: |
35 | 5 | should_be_1 | 5 | should_be_1 |
36 | @@ -54,35 +54,35 @@ | |||
37 | 54 | ICP tests (all should be 1): | 54 | ICP tests (all should be 1): |
38 | 55 | SELECT COUNT(*) = @cond_test_pages_count | 55 | SELECT COUNT(*) = @cond_test_pages_count |
39 | 56 | FROM INFORMATION_SCHEMA.INNODB_CHANGED_PAGES | 56 | FROM INFORMATION_SCHEMA.INNODB_CHANGED_PAGES |
69 | 57 | WHERE END_LSN = @cond_test_max_end_lsn; | 57 | WHERE END_LSN = @max_end_lsn; |
70 | 58 | COUNT(*) = @cond_test_pages_count | 58 | COUNT(*) = @cond_test_pages_count |
71 | 59 | 1 | 59 | 1 |
72 | 60 | SELECT COUNT(*) = @cond_test_pages_count | 60 | SELECT COUNT(*) = @cond_test_pages_count |
73 | 61 | FROM INFORMATION_SCHEMA.INNODB_CHANGED_PAGES | 61 | FROM INFORMATION_SCHEMA.INNODB_CHANGED_PAGES |
74 | 62 | WHERE | 62 | WHERE |
75 | 63 | END_LSN > (@cond_test_max_end_lsn - 1) AND | 63 | END_LSN > (@max_end_lsn - 1) AND |
76 | 64 | END_LSN < (@cond_test_max_end_lsn + 1); | 64 | END_LSN < (@max_end_lsn + 1); |
77 | 65 | COUNT(*) = @cond_test_pages_count | 65 | COUNT(*) = @cond_test_pages_count |
78 | 66 | 1 | 66 | 1 |
79 | 67 | SELECT COUNT(*) = @cond_test_pages_count | 67 | SELECT COUNT(*) = @cond_test_pages_count |
80 | 68 | FROM INFORMATION_SCHEMA.INNODB_CHANGED_PAGES | 68 | FROM INFORMATION_SCHEMA.INNODB_CHANGED_PAGES |
81 | 69 | WHERE | 69 | WHERE |
82 | 70 | END_LSN >= @cond_test_max_end_lsn AND | 70 | END_LSN >= @max_end_lsn AND |
83 | 71 | END_LSN <= @cond_test_max_end_lsn; | 71 | END_LSN <= @max_end_lsn; |
84 | 72 | COUNT(*) = @cond_test_pages_count | 72 | COUNT(*) = @cond_test_pages_count |
85 | 73 | 1 | 73 | 1 |
86 | 74 | SELECT COUNT(*) = @cond_test_pages_count | 74 | SELECT COUNT(*) = @cond_test_pages_count |
87 | 75 | FROM INFORMATION_SCHEMA.INNODB_CHANGED_PAGES | 75 | FROM INFORMATION_SCHEMA.INNODB_CHANGED_PAGES |
88 | 76 | WHERE | 76 | WHERE |
89 | 77 | (@cond_test_max_end_lsn - 1) < END_LSN AND | 77 | (@max_end_lsn - 1) < END_LSN AND |
90 | 78 | @cond_test_max_end_lsn >= END_LSN; | 78 | @max_end_lsn >= END_LSN; |
91 | 79 | COUNT(*) = @cond_test_pages_count | 79 | COUNT(*) = @cond_test_pages_count |
92 | 80 | 1 | 80 | 1 |
93 | 81 | SELECT COUNT(*) = @cond_test_pages_count | 81 | SELECT COUNT(*) = @cond_test_pages_count |
94 | 82 | FROM INFORMATION_SCHEMA.INNODB_CHANGED_PAGES | 82 | FROM INFORMATION_SCHEMA.INNODB_CHANGED_PAGES |
95 | 83 | WHERE | 83 | WHERE |
96 | 84 | START_LSN <= @cond_test_max_end_lsn AND | 84 | START_LSN <= @max_end_lsn AND |
97 | 85 | END_LSN >= @cond_test_max_end_lsn; | 85 | END_LSN >= @max_end_lsn; |
98 | 86 | COUNT(*) = @cond_test_pages_count | 86 | COUNT(*) = @cond_test_pages_count |
99 | 87 | 1 | 87 | 1 |
100 | 88 | SELECT COUNT(*) = @cond_test_pages_count | 88 | SELECT COUNT(*) = @cond_test_pages_count |
101 | @@ -101,7 +101,7 @@ | |||
102 | 101 | FROM INFORMATION_SCHEMA.INNODB_CHANGED_PAGES | 101 | FROM INFORMATION_SCHEMA.INNODB_CHANGED_PAGES |
103 | 102 | WHERE | 102 | WHERE |
104 | 103 | START_LSN >= @cond_test_max_start_lsn AND | 103 | START_LSN >= @cond_test_max_start_lsn AND |
106 | 104 | END_LSN <= @cond_test_max_end_lsn; | 104 | END_LSN <= @max_end_lsn; |
107 | 105 | COUNT(*) = @cond_test_pages_count | 105 | COUNT(*) = @cond_test_pages_count |
108 | 106 | 1 | 106 | 1 |
109 | 107 | SELECT COUNT(*) = @cond_test_pages_count | 107 | SELECT COUNT(*) = @cond_test_pages_count |
110 | @@ -115,7 +115,7 @@ | |||
111 | 115 | FROM INFORMATION_SCHEMA.INNODB_CHANGED_PAGES | 115 | FROM INFORMATION_SCHEMA.INNODB_CHANGED_PAGES |
112 | 116 | WHERE | 116 | WHERE |
113 | 117 | @cond_test_max_start_lsn <= START_LSN AND | 117 | @cond_test_max_start_lsn <= START_LSN AND |
115 | 118 | @cond_test_max_end_lsn >= END_LSN; | 118 | @max_end_lsn >= END_LSN; |
116 | 119 | COUNT(*) = @cond_test_pages_count | 119 | COUNT(*) = @cond_test_pages_count |
117 | 120 | 1 | 120 | 1 |
118 | 121 | SELECT COUNT(*) | 121 | SELECT COUNT(*) |
119 | @@ -153,4 +153,29 @@ | |||
120 | 153 | COUNT(*) | 153 | COUNT(*) |
121 | 154 | 5 | 154 | 5 |
122 | 155 | SET GLOBAL INNODB_MAX_CHANGED_PAGES = 1000000; | 155 | SET GLOBAL INNODB_MAX_CHANGED_PAGES = 1000000; |
124 | 156 | DROP TABLE T1; | 156 | CREATE TABLE ICP_COPY ( |
125 | 157 | space_id INT(11) NOT NULL, | ||
126 | 158 | page_id INT(11) NOT NULL, | ||
127 | 159 | start_lsn BIGINT(21) NOT NULL, | ||
128 | 160 | end_lsn BIGINT(21) NOT NULL, | ||
129 | 161 | INDEX page_id(space_id, page_id)) ENGINE=InnoDB; | ||
130 | 162 | INSERT INTO ICP_COPY SELECT * FROM INFORMATION_SCHEMA.INNODB_CHANGED_PAGES | ||
131 | 163 | WHERE END_LSN <= @max_end_lsn; | ||
132 | 164 | SELECT @@global.innodb_track_changed_pages; | ||
133 | 165 | @@global.innodb_track_changed_pages | ||
134 | 166 | 0 | ||
135 | 167 | SET @max_end_lsn= (SELECT MAX(end_lsn) FROM ICP_COPY); | ||
136 | 168 | TRUNCATE TABLE ICP_COPY; | ||
137 | 169 | INSERT INTO ICP_COPY SELECT * FROM INFORMATION_SCHEMA.INNODB_CHANGED_PAGES | ||
138 | 170 | WHERE END_LSN <= @max_end_lsn; | ||
139 | 171 | Check that INNODB_CHANGED_PAGES copies checksum the same (should be 1): | ||
140 | 172 | should_be_1 | ||
141 | 173 | 1 | ||
142 | 174 | SELECT @@global.innodb_track_changed_pages; | ||
143 | 175 | @@global.innodb_track_changed_pages | ||
144 | 176 | 1 | ||
145 | 177 | ib_modified_log_4 | ||
146 | 178 | SELECT COUNT(*) FROM INFORMATION_SCHEMA.INNODB_CHANGED_PAGES | ||
147 | 179 | WHERE START_LSN > 10000; | ||
148 | 180 | ERROR HY000: Can't read record in system table | ||
149 | 181 | DROP TABLE T1, ICP_COPY; | ||
150 | 157 | 182 | ||
151 | === modified file 'Percona-Server/mysql-test/suite/innodb/r/percona_changed_pages_empty.result' | |||
152 | --- Percona-Server/mysql-test/suite/innodb/r/percona_changed_pages_empty.result 2012-09-17 13:08:32 +0000 | |||
153 | +++ Percona-Server/mysql-test/suite/innodb/r/percona_changed_pages_empty.result 2013-05-29 15:11:30 +0000 | |||
154 | @@ -1,2 +1,3 @@ | |||
155 | 1 | RESET CHANGED_PAGE_BITMAPS; | ||
156 | 1 | SELECT * FROM INFORMATION_SCHEMA.INNODB_CHANGED_PAGES; | 2 | SELECT * FROM INFORMATION_SCHEMA.INNODB_CHANGED_PAGES; |
157 | 2 | space_id page_id start_lsn end_lsn | 3 | space_id page_id start_lsn end_lsn |
158 | 3 | 4 | ||
159 | === modified file 'Percona-Server/mysql-test/suite/innodb/t/percona_changed_page_bmp.test' | |||
160 | --- Percona-Server/mysql-test/suite/innodb/t/percona_changed_page_bmp.test 2013-02-04 13:53:47 +0000 | |||
161 | +++ Percona-Server/mysql-test/suite/innodb/t/percona_changed_page_bmp.test 2013-05-29 15:11:30 +0000 | |||
162 | @@ -205,6 +205,8 @@ | |||
163 | 205 | --replace_regex /_[[:digit:]]+\.xdb$// | 205 | --replace_regex /_[[:digit:]]+\.xdb$// |
164 | 206 | list_files $MYSQLD_DATADIR ib_modified_log*; | 206 | list_files $MYSQLD_DATADIR ib_modified_log*; |
165 | 207 | 207 | ||
166 | 208 | DROP TABLE t1, t2; | ||
167 | 209 | |||
168 | 208 | # | 210 | # |
169 | 209 | # Test for log tracking compatibility with innodb_force_recovery (bug 1083596). | 211 | # Test for log tracking compatibility with innodb_force_recovery (bug 1083596). |
170 | 210 | # | 212 | # |
171 | @@ -221,7 +223,19 @@ | |||
172 | 221 | RESET CHANGED_PAGE_BITMAPS; | 223 | RESET CHANGED_PAGE_BITMAPS; |
173 | 222 | 224 | ||
174 | 223 | call mtr.add_suppression("InnoDB: Error: page [0-9]* log sequence number [0-9]*"); | 225 | call mtr.add_suppression("InnoDB: Error: page [0-9]* log sequence number [0-9]*"); |
175 | 226 | |||
176 | 227 | # | ||
177 | 228 | # Test that bitmap files are created correctly in innodb_data_home_dir without a trailing | ||
178 | 229 | # path separator (bug 1181887) | ||
179 | 230 | # | ||
180 | 231 | --exec echo "wait" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect | ||
181 | 232 | --shutdown_server 10 | ||
182 | 233 | --source include/wait_until_disconnected.inc | ||
183 | 234 | --remove_files_wildcard $MYSQLD_DATADIR ib_logfile* | ||
184 | 235 | --mkdir $MYSQLTEST_VARDIR/tmpdatadir | ||
185 | 236 | --enable_reconnect | ||
186 | 224 | --echo 9th restart | 237 | --echo 9th restart |
187 | 238 | <<<<<<< TREE | ||
188 | 225 | --source include/restart_mysqld.inc | 239 | --source include/restart_mysqld.inc |
189 | 226 | 240 | ||
190 | 227 | # | 241 | # |
191 | @@ -238,3 +252,22 @@ | |||
192 | 238 | --source include/restart_mysqld.inc | 252 | --source include/restart_mysqld.inc |
193 | 239 | 253 | ||
194 | 240 | DROP TABLE t1, t2, t3; | 254 | DROP TABLE t1, t2, t3; |
195 | 255 | ======= | ||
196 | 256 | --exec echo "restart:--innodb-data-home-dir=$MYSQLTEST_VARDIR/tmpdatadir" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect | ||
197 | 257 | --source include/wait_until_connected_again.inc | ||
198 | 258 | |||
199 | 259 | file_exists $MYSQLTEST_VARDIR/tmpdatadir/ib_modified_log_1_0.xdb; | ||
200 | 260 | --replace_regex /_[[:digit:]]+\.xdb$// | ||
201 | 261 | list_files $MYSQLTEST_VARDIR/tmpdatadir ib_modified_log*; | ||
202 | 262 | |||
203 | 263 | --echo 10th restart | ||
204 | 264 | --exec echo "wait" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect | ||
205 | 265 | --shutdown_server 10 | ||
206 | 266 | --source include/wait_until_disconnected.inc | ||
207 | 267 | --remove_files_wildcard $MYSQLD_DATADIR ib_logfile* | ||
208 | 268 | --remove_files_wildcard $MYSQLD_DATADIR ibdata* | ||
209 | 269 | --enable_reconnect | ||
210 | 270 | --echo 11th restart | ||
211 | 271 | --exec echo "restart" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect | ||
212 | 272 | --source include/wait_until_connected_again.inc | ||
213 | 273 | >>>>>>> MERGE-SOURCE | ||
214 | 241 | 274 | ||
215 | === modified file 'Percona-Server/mysql-test/suite/innodb/t/percona_changed_page_bmp_flush.test' | |||
216 | --- Percona-Server/mysql-test/suite/innodb/t/percona_changed_page_bmp_flush.test 2013-02-06 09:06:08 +0000 | |||
217 | +++ Percona-Server/mysql-test/suite/innodb/t/percona_changed_page_bmp_flush.test 2013-05-29 15:11:30 +0000 | |||
218 | @@ -61,7 +61,7 @@ | |||
219 | 61 | INSERT INTO t1 VALUES (3, REPEAT("c", 20000)); | 61 | INSERT INTO t1 VALUES (3, REPEAT("c", 20000)); |
220 | 62 | 62 | ||
221 | 63 | # | 63 | # |
223 | 64 | # Test innodb_flush_method=O_DIRECT | 64 | # Test innodb_flush_method=ALL_O_DIRECT |
224 | 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. |
225 | 66 | # | 66 | # |
226 | 67 | --exec echo "wait" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect | 67 | --exec echo "wait" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect |
227 | @@ -71,7 +71,7 @@ | |||
228 | 71 | --replace_regex /_[[:digit:]]+\.xdb$// | 71 | --replace_regex /_[[:digit:]]+\.xdb$// |
229 | 72 | list_files $MYSQLD_DATADIR ib_modified_log*; | 72 | list_files $MYSQLD_DATADIR ib_modified_log*; |
230 | 73 | --enable_reconnect | 73 | --enable_reconnect |
232 | 74 | --exec echo "restart:--innodb-track-changed-pages=1 --innodb-flush-method=O_DIRECT" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect | 74 | --exec echo "restart:--innodb-track-changed-pages=1 --innodb-flush-method=ALL_O_DIRECT" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect |
233 | 75 | --source include/wait_until_connected_again.inc | 75 | --source include/wait_until_connected_again.inc |
234 | 76 | 76 | ||
235 | 77 | INSERT INTO t1 VALUES (4, REPEAT("d", 20000)); | 77 | INSERT INTO t1 VALUES (4, REPEAT("d", 20000)); |
236 | 78 | 78 | ||
237 | === modified file 'Percona-Server/mysql-test/suite/innodb/t/percona_changed_pages.test' | |||
238 | --- Percona-Server/mysql-test/suite/innodb/t/percona_changed_pages.test 2013-01-29 15:14:23 +0000 | |||
239 | +++ Percona-Server/mysql-test/suite/innodb/t/percona_changed_pages.test 2013-05-29 15:11:30 +0000 | |||
240 | @@ -9,7 +9,7 @@ | |||
241 | 9 | RESET CHANGED_PAGE_BITMAPS; | 9 | RESET CHANGED_PAGE_BITMAPS; |
242 | 10 | 10 | ||
243 | 11 | --disable_warnings | 11 | --disable_warnings |
245 | 12 | DROP TABLE IF EXISTS T1; | 12 | DROP TABLE IF EXISTS T1, ICP_COPY; |
246 | 13 | --enable_warnings | 13 | --enable_warnings |
247 | 14 | 14 | ||
248 | 15 | let $old_max_changed_pages= `SELECT @@GLOBAL.INNODB_MAX_CHANGED_PAGES`; | 15 | let $old_max_changed_pages= `SELECT @@GLOBAL.INNODB_MAX_CHANGED_PAGES`; |
249 | @@ -105,9 +105,9 @@ | |||
250 | 105 | # Gather data for condition pushdown testing not using conditions # | 105 | # Gather data for condition pushdown testing not using conditions # |
251 | 106 | ################################################################### | 106 | ################################################################### |
252 | 107 | --disable_result_log | 107 | --disable_result_log |
256 | 108 | SET @cond_test_max_end_lsn= | 108 | SET @max_end_lsn= |
257 | 109 | (SELECT MAX(end_lsn) | 109 | (SELECT MAX(end_lsn) |
258 | 110 | FROM INFORMATION_SCHEMA.INNODB_CHANGED_PAGES); | 110 | FROM INFORMATION_SCHEMA.INNODB_CHANGED_PAGES); |
259 | 111 | 111 | ||
260 | 112 | SET @cond_test_max_start_lsn= | 112 | SET @cond_test_max_start_lsn= |
261 | 113 | (SELECT MAX(start_lsn) | 113 | (SELECT MAX(start_lsn) |
262 | @@ -153,31 +153,31 @@ | |||
263 | 153 | # Baseline as ICP currently does not support equality | 153 | # Baseline as ICP currently does not support equality |
264 | 154 | SELECT COUNT(*) = @cond_test_pages_count | 154 | SELECT COUNT(*) = @cond_test_pages_count |
265 | 155 | FROM INFORMATION_SCHEMA.INNODB_CHANGED_PAGES | 155 | FROM INFORMATION_SCHEMA.INNODB_CHANGED_PAGES |
267 | 156 | WHERE END_LSN = @cond_test_max_end_lsn; | 156 | WHERE END_LSN = @max_end_lsn; |
268 | 157 | 157 | ||
269 | 158 | SELECT COUNT(*) = @cond_test_pages_count | 158 | SELECT COUNT(*) = @cond_test_pages_count |
270 | 159 | FROM INFORMATION_SCHEMA.INNODB_CHANGED_PAGES | 159 | FROM INFORMATION_SCHEMA.INNODB_CHANGED_PAGES |
271 | 160 | WHERE | 160 | WHERE |
292 | 161 | END_LSN > (@cond_test_max_end_lsn - 1) AND | 161 | END_LSN > (@max_end_lsn - 1) AND |
293 | 162 | END_LSN < (@cond_test_max_end_lsn + 1); | 162 | END_LSN < (@max_end_lsn + 1); |
294 | 163 | 163 | ||
295 | 164 | SELECT COUNT(*) = @cond_test_pages_count | 164 | SELECT COUNT(*) = @cond_test_pages_count |
296 | 165 | FROM INFORMATION_SCHEMA.INNODB_CHANGED_PAGES | 165 | FROM INFORMATION_SCHEMA.INNODB_CHANGED_PAGES |
297 | 166 | WHERE | 166 | WHERE |
298 | 167 | END_LSN >= @cond_test_max_end_lsn AND | 167 | END_LSN >= @max_end_lsn AND |
299 | 168 | END_LSN <= @cond_test_max_end_lsn; | 168 | END_LSN <= @max_end_lsn; |
300 | 169 | 169 | ||
301 | 170 | SELECT COUNT(*) = @cond_test_pages_count | 170 | SELECT COUNT(*) = @cond_test_pages_count |
302 | 171 | FROM INFORMATION_SCHEMA.INNODB_CHANGED_PAGES | 171 | FROM INFORMATION_SCHEMA.INNODB_CHANGED_PAGES |
303 | 172 | WHERE | 172 | WHERE |
304 | 173 | (@cond_test_max_end_lsn - 1) < END_LSN AND | 173 | (@max_end_lsn - 1) < END_LSN AND |
305 | 174 | @cond_test_max_end_lsn >= END_LSN; | 174 | @max_end_lsn >= END_LSN; |
306 | 175 | 175 | ||
307 | 176 | SELECT COUNT(*) = @cond_test_pages_count | 176 | SELECT COUNT(*) = @cond_test_pages_count |
308 | 177 | FROM INFORMATION_SCHEMA.INNODB_CHANGED_PAGES | 177 | FROM INFORMATION_SCHEMA.INNODB_CHANGED_PAGES |
309 | 178 | WHERE | 178 | WHERE |
310 | 179 | START_LSN <= @cond_test_max_end_lsn AND | 179 | START_LSN <= @max_end_lsn AND |
311 | 180 | END_LSN >= @cond_test_max_end_lsn; | 180 | END_LSN >= @max_end_lsn; |
312 | 181 | 181 | ||
313 | 182 | SELECT COUNT(*) = @cond_test_pages_count | 182 | SELECT COUNT(*) = @cond_test_pages_count |
314 | 183 | FROM INFORMATION_SCHEMA.INNODB_CHANGED_PAGES | 183 | FROM INFORMATION_SCHEMA.INNODB_CHANGED_PAGES |
315 | @@ -193,7 +193,7 @@ | |||
316 | 193 | FROM INFORMATION_SCHEMA.INNODB_CHANGED_PAGES | 193 | FROM INFORMATION_SCHEMA.INNODB_CHANGED_PAGES |
317 | 194 | WHERE | 194 | WHERE |
318 | 195 | START_LSN >= @cond_test_max_start_lsn AND | 195 | START_LSN >= @cond_test_max_start_lsn AND |
320 | 196 | END_LSN <= @cond_test_max_end_lsn; | 196 | END_LSN <= @max_end_lsn; |
321 | 197 | 197 | ||
322 | 198 | SELECT COUNT(*) = @cond_test_pages_count | 198 | SELECT COUNT(*) = @cond_test_pages_count |
323 | 199 | FROM INFORMATION_SCHEMA.INNODB_CHANGED_PAGES | 199 | FROM INFORMATION_SCHEMA.INNODB_CHANGED_PAGES |
324 | @@ -205,7 +205,7 @@ | |||
325 | 205 | FROM INFORMATION_SCHEMA.INNODB_CHANGED_PAGES | 205 | FROM INFORMATION_SCHEMA.INNODB_CHANGED_PAGES |
326 | 206 | WHERE | 206 | WHERE |
327 | 207 | @cond_test_max_start_lsn <= START_LSN AND | 207 | @cond_test_max_start_lsn <= START_LSN AND |
329 | 208 | @cond_test_max_end_lsn >= END_LSN; | 208 | @max_end_lsn >= END_LSN; |
330 | 209 | 209 | ||
331 | 210 | # Empty range | 210 | # Empty range |
332 | 211 | SELECT COUNT(*) | 211 | SELECT COUNT(*) |
333 | @@ -262,4 +262,75 @@ | |||
334 | 262 | 262 | ||
335 | 263 | eval SET GLOBAL INNODB_MAX_CHANGED_PAGES = $old_max_changed_pages; | 263 | eval SET GLOBAL INNODB_MAX_CHANGED_PAGES = $old_max_changed_pages; |
336 | 264 | 264 | ||
338 | 265 | DROP TABLE T1; | 265 | # |
339 | 266 | # Test that I_S.INNODB_CHANGED_PAGES can be queried with the log tracking disabled | ||
340 | 267 | # (bug 1185304) | ||
341 | 268 | # | ||
342 | 269 | |||
343 | 270 | # We have to skip ICP_COPY bitmap writes. Thus all the I_S queries from | ||
344 | 271 | # this point are limited to the max_end_lsn. | ||
345 | 272 | |||
346 | 273 | # Save the copy of current table contents | ||
347 | 274 | CREATE TABLE ICP_COPY ( | ||
348 | 275 | space_id INT(11) NOT NULL, | ||
349 | 276 | page_id INT(11) NOT NULL, | ||
350 | 277 | start_lsn BIGINT(21) NOT NULL, | ||
351 | 278 | end_lsn BIGINT(21) NOT NULL, | ||
352 | 279 | INDEX page_id(space_id, page_id)) ENGINE=InnoDB; | ||
353 | 280 | |||
354 | 281 | INSERT INTO ICP_COPY SELECT * FROM INFORMATION_SCHEMA.INNODB_CHANGED_PAGES | ||
355 | 282 | WHERE END_LSN <= @max_end_lsn; | ||
356 | 283 | |||
357 | 284 | # Restart with log tracking disabled | ||
358 | 285 | --exec echo "wait" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect | ||
359 | 286 | --shutdown_server 10 | ||
360 | 287 | --source include/wait_until_disconnected.inc | ||
361 | 288 | --enable_reconnect | ||
362 | 289 | --exec echo "restart:--innodb-track-changed-pages=FALSE" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect | ||
363 | 290 | --source include/wait_until_connected_again.inc | ||
364 | 291 | |||
365 | 292 | SELECT @@global.innodb_track_changed_pages; | ||
366 | 293 | |||
367 | 294 | let $icp_1_checksum= `CHECKSUM TABLE ICP_COPY`; | ||
368 | 295 | |||
369 | 296 | SET @max_end_lsn= (SELECT MAX(end_lsn) FROM ICP_COPY); | ||
370 | 297 | |||
371 | 298 | # Read the table again | ||
372 | 299 | TRUNCATE TABLE ICP_COPY; | ||
373 | 300 | |||
374 | 301 | INSERT INTO ICP_COPY SELECT * FROM INFORMATION_SCHEMA.INNODB_CHANGED_PAGES | ||
375 | 302 | WHERE END_LSN <= @max_end_lsn; | ||
376 | 303 | |||
377 | 304 | # Compare the checksums of both reads | ||
378 | 305 | let $icp_2_checksum= `CHECKSUM TABLE ICP_COPY`; | ||
379 | 306 | --disable_query_log | ||
380 | 307 | --echo Check that INNODB_CHANGED_PAGES copies checksum the same (should be 1): | ||
381 | 308 | eval SELECT "$icp_1_checksum" LIKE "$icp_2_checksum" AS should_be_1; | ||
382 | 309 | --enable_query_log | ||
383 | 310 | |||
384 | 311 | --source include/restart_mysqld.inc | ||
385 | 312 | |||
386 | 313 | SELECT @@global.innodb_track_changed_pages; | ||
387 | 314 | |||
388 | 315 | # | ||
389 | 316 | # Test for | ||
390 | 317 | # - bug 1179974 (INFORMATION_SCHEMA.INNODB_CHANGED_PAGES query fails server | ||
391 | 318 | # with an I/O error if a bitmap file in the middle of requested range is missing) | ||
392 | 319 | # - bug 1185040 (INFORMATION_SCHEMA.INNODB_CHANGED_PAGES_QUERY should return a | ||
393 | 320 | # warning if the result set is partial) | ||
394 | 321 | # | ||
395 | 322 | |||
396 | 323 | let $MYSQLD_DATADIR= `select @@datadir`; | ||
397 | 324 | --replace_regex /_[[:digit:]]+\.xdb$// | ||
398 | 325 | list_files $MYSQLD_DATADIR ib_modified_log_4_*; | ||
399 | 326 | |||
400 | 327 | remove_files_wildcard $MYSQLD_DATADIR ib_modified_log_4_*.xdb; | ||
401 | 328 | |||
402 | 329 | --replace_regex /_[[:digit:]]+\.xdb$// | ||
403 | 330 | list_files $MYSQLD_DATADIR ib_modified_log_4_*; | ||
404 | 331 | |||
405 | 332 | --error ER_CANT_FIND_SYSTEM_REC | ||
406 | 333 | SELECT COUNT(*) FROM INFORMATION_SCHEMA.INNODB_CHANGED_PAGES | ||
407 | 334 | WHERE START_LSN > 10000; | ||
408 | 335 | |||
409 | 336 | DROP TABLE T1, ICP_COPY; | ||
410 | 266 | 337 | ||
411 | === modified file 'Percona-Server/mysql-test/suite/innodb/t/percona_changed_pages_empty.test' | |||
412 | --- Percona-Server/mysql-test/suite/innodb/t/percona_changed_pages_empty.test 2012-09-17 13:08:32 +0000 | |||
413 | +++ Percona-Server/mysql-test/suite/innodb/t/percona_changed_pages_empty.test 2013-05-29 15:11:30 +0000 | |||
414 | @@ -1,8 +1,10 @@ | |||
415 | 1 | ############################################################################### | 1 | ############################################################################### |
418 | 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 # |
419 | 3 | # innodb_track_changed_pages is false. # | 3 | # no bitmap files exist # |
420 | 4 | ############################################################################### | 4 | ############################################################################### |
421 | 5 | 5 | ||
422 | 6 | --source include/have_innodb.inc | 6 | --source include/have_innodb.inc |
423 | 7 | 7 | ||
424 | 8 | RESET CHANGED_PAGE_BITMAPS; | ||
425 | 9 | |||
426 | 8 | SELECT * FROM INFORMATION_SCHEMA.INNODB_CHANGED_PAGES; | 10 | SELECT * FROM INFORMATION_SCHEMA.INNODB_CHANGED_PAGES; |
427 | 9 | 11 | ||
428 | === modified file 'Percona-Server/mysql-test/suite/sys_vars/r/all_vars.result' | |||
429 | --- Percona-Server/mysql-test/suite/sys_vars/r/all_vars.result 2013-01-29 15:14:23 +0000 | |||
430 | +++ Percona-Server/mysql-test/suite/sys_vars/r/all_vars.result 2013-05-29 15:11:30 +0000 | |||
431 | @@ -14,7 +14,5 @@ | |||
432 | 14 | INNODB_FAKE_CHANGES | 14 | INNODB_FAKE_CHANGES |
433 | 15 | INNODB_KILL_IDLE_TRANSACTION | 15 | INNODB_KILL_IDLE_TRANSACTION |
434 | 16 | INNODB_KILL_IDLE_TRANSACTION | 16 | INNODB_KILL_IDLE_TRANSACTION |
435 | 17 | INNODB_MAX_CHANGED_PAGES | ||
436 | 18 | INNODB_MAX_CHANGED_PAGES | ||
437 | 19 | drop table t1; | 17 | drop table t1; |
438 | 20 | drop table t2; | 18 | drop table t2; |
439 | 21 | 19 | ||
440 | === added file 'Percona-Server/mysql-test/suite/sys_vars/r/innodb_max_changed_pages_basic.result' | |||
441 | --- Percona-Server/mysql-test/suite/sys_vars/r/innodb_max_changed_pages_basic.result 1970-01-01 00:00:00 +0000 | |||
442 | +++ Percona-Server/mysql-test/suite/sys_vars/r/innodb_max_changed_pages_basic.result 2013-05-29 15:11:30 +0000 | |||
443 | @@ -0,0 +1,78 @@ | |||
444 | 1 | SET @start_value = @@global.innodb_max_changed_pages; | ||
445 | 2 | SELECT @start_value; | ||
446 | 3 | @start_value | ||
447 | 4 | 1000000 | ||
448 | 5 | SET @@global.innodb_max_changed_pages = 5000; | ||
449 | 6 | SET @@global.innodb_max_changed_pages = DEFAULT; | ||
450 | 7 | SELECT @@global.innodb_max_changed_pages; | ||
451 | 8 | @@global.innodb_max_changed_pages | ||
452 | 9 | 1000000 | ||
453 | 10 | SET @@global.innodb_max_changed_pages = 0; | ||
454 | 11 | SELECT @@global.innodb_max_changed_pages; | ||
455 | 12 | @@global.innodb_max_changed_pages | ||
456 | 13 | 0 | ||
457 | 14 | SET @@global.innodb_max_changed_pages = 1; | ||
458 | 15 | SELECT @@global.innodb_max_changed_pages; | ||
459 | 16 | @@global.innodb_max_changed_pages | ||
460 | 17 | 1 | ||
461 | 18 | SET @@global.innodb_max_changed_pages = 18446744073709551614; | ||
462 | 19 | SELECT @@global.innodb_max_changed_pages; | ||
463 | 20 | @@global.innodb_max_changed_pages | ||
464 | 21 | 18446744073709551614 | ||
465 | 22 | SET @@global.innodb_max_changed_pages = 18446744073709551615; | ||
466 | 23 | SELECT @@global.innodb_max_changed_pages; | ||
467 | 24 | @@global.innodb_max_changed_pages | ||
468 | 25 | 18446744073709551615 | ||
469 | 26 | SET @@global.innodb_max_changed_pages = 18446744073709551616; | ||
470 | 27 | ERROR 42000: Incorrect argument type to variable 'innodb_max_changed_pages' | ||
471 | 28 | SELECT @@global.innodb_max_changed_pages; | ||
472 | 29 | @@global.innodb_max_changed_pages | ||
473 | 30 | 18446744073709551615 | ||
474 | 31 | SET @@global.innodb_max_changed_pages = 18446744073709551617; | ||
475 | 32 | ERROR 42000: Incorrect argument type to variable 'innodb_max_changed_pages' | ||
476 | 33 | SELECT @@global.innodb_max_changed_pages; | ||
477 | 34 | @@global.innodb_max_changed_pages | ||
478 | 35 | 18446744073709551615 | ||
479 | 36 | SET @@global.innodb_max_changed_pages = 105.54; | ||
480 | 37 | ERROR 42000: Incorrect argument type to variable 'innodb_max_changed_pages' | ||
481 | 38 | SELECT @@global.innodb_max_changed_pages; | ||
482 | 39 | @@global.innodb_max_changed_pages | ||
483 | 40 | 18446744073709551615 | ||
484 | 41 | SET @@global.innodb_max_changed_pages = -200; | ||
485 | 42 | Warnings: | ||
486 | 43 | Warning 1292 Truncated incorrect innodb_max_changed_pages value: '-200' | ||
487 | 44 | SELECT @@global.innodb_max_changed_pages; | ||
488 | 45 | @@global.innodb_max_changed_pages | ||
489 | 46 | 0 | ||
490 | 47 | SET @@global.innodb_max_changed_pages = ON; | ||
491 | 48 | ERROR 42000: Incorrect argument type to variable 'innodb_max_changed_pages' | ||
492 | 49 | SELECT @@global.innodb_max_changed_pages; | ||
493 | 50 | @@global.innodb_max_changed_pages | ||
494 | 51 | 0 | ||
495 | 52 | SET @@global.innodb_max_changed_pages = 'foo'; | ||
496 | 53 | ERROR 42000: Incorrect argument type to variable 'innodb_max_changed_pages' | ||
497 | 54 | SELECT @@global.innodb_max_changed_pages; | ||
498 | 55 | @@global.innodb_max_changed_pages | ||
499 | 56 | 0 | ||
500 | 57 | SET @@session.innodb_max_changed_pages = 4096; | ||
501 | 58 | ERROR HY000: Variable 'innodb_max_changed_pages' is a GLOBAL variable and should be set with SET GLOBAL | ||
502 | 59 | SELECT @@session.innodb_max_changed_pages; | ||
503 | 60 | ERROR HY000: Variable 'innodb_max_changed_pages' is a GLOBAL variable | ||
504 | 61 | SELECT @@global.innodb_max_changed_pages = VARIABLE_VALUE | ||
505 | 62 | FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES | ||
506 | 63 | WHERE VARIABLE_NAME='innodb_max_changed_pages'; | ||
507 | 64 | @@global.innodb_max_changed_pages = VARIABLE_VALUE | ||
508 | 65 | 1 | ||
509 | 66 | SELECT @@global.innodb_max_changed_pages = VARIABLE_VALUE | ||
510 | 67 | FROM INFORMATION_SCHEMA.SESSION_VARIABLES | ||
511 | 68 | WHERE VARIABLE_NAME='innodb_max_changed_pages'; | ||
512 | 69 | @@global.innodb_max_changed_pages = VARIABLE_VALUE | ||
513 | 70 | 1 | ||
514 | 71 | SET @@global.innodb_max_changed_pages=6789; | ||
515 | 72 | SELECT @@global.innodb_max_changed_pages=@@innodb_max_changed_pages; | ||
516 | 73 | @@global.innodb_max_changed_pages=@@innodb_max_changed_pages | ||
517 | 74 | 1 | ||
518 | 75 | SET @@global.innodb_max_changed_pages=@start_value; | ||
519 | 76 | SELECT @@global.innodb_max_changed_pages; | ||
520 | 77 | @@global.innodb_max_changed_pages | ||
521 | 78 | 1000000 | ||
522 | 0 | 79 | ||
523 | === added file 'Percona-Server/mysql-test/suite/sys_vars/t/innodb_max_changed_pages_basic.test' | |||
524 | --- Percona-Server/mysql-test/suite/sys_vars/t/innodb_max_changed_pages_basic.test 1970-01-01 00:00:00 +0000 | |||
525 | +++ Percona-Server/mysql-test/suite/sys_vars/t/innodb_max_changed_pages_basic.test 2013-05-29 15:11:30 +0000 | |||
526 | @@ -0,0 +1,60 @@ | |||
527 | 1 | # Tests for innodb_max_changed_pages variable | ||
528 | 2 | --source include/have_innodb.inc | ||
529 | 3 | |||
530 | 4 | SET @start_value = @@global.innodb_max_changed_pages; | ||
531 | 5 | SELECT @start_value; | ||
532 | 6 | |||
533 | 7 | SET @@global.innodb_max_changed_pages = 5000; | ||
534 | 8 | SET @@global.innodb_max_changed_pages = DEFAULT; | ||
535 | 9 | SELECT @@global.innodb_max_changed_pages; | ||
536 | 10 | |||
537 | 11 | # Valid boundary values | ||
538 | 12 | SET @@global.innodb_max_changed_pages = 0; | ||
539 | 13 | SELECT @@global.innodb_max_changed_pages; | ||
540 | 14 | SET @@global.innodb_max_changed_pages = 1; | ||
541 | 15 | SELECT @@global.innodb_max_changed_pages; | ||
542 | 16 | SET @@global.innodb_max_changed_pages = 18446744073709551614; | ||
543 | 17 | SELECT @@global.innodb_max_changed_pages; | ||
544 | 18 | SET @@global.innodb_max_changed_pages = 18446744073709551615; | ||
545 | 19 | SELECT @@global.innodb_max_changed_pages; | ||
546 | 20 | |||
547 | 21 | # Invalid values | ||
548 | 22 | --error ER_WRONG_TYPE_FOR_VAR | ||
549 | 23 | SET @@global.innodb_max_changed_pages = 18446744073709551616; | ||
550 | 24 | SELECT @@global.innodb_max_changed_pages; | ||
551 | 25 | --error ER_WRONG_TYPE_FOR_VAR | ||
552 | 26 | SET @@global.innodb_max_changed_pages = 18446744073709551617; | ||
553 | 27 | SELECT @@global.innodb_max_changed_pages; | ||
554 | 28 | --error ER_WRONG_TYPE_FOR_VAR | ||
555 | 29 | SET @@global.innodb_max_changed_pages = 105.54; | ||
556 | 30 | SELECT @@global.innodb_max_changed_pages; | ||
557 | 31 | SET @@global.innodb_max_changed_pages = -200; | ||
558 | 32 | SELECT @@global.innodb_max_changed_pages; | ||
559 | 33 | --error ER_WRONG_TYPE_FOR_VAR | ||
560 | 34 | SET @@global.innodb_max_changed_pages = ON; | ||
561 | 35 | SELECT @@global.innodb_max_changed_pages; | ||
562 | 36 | --error ER_WRONG_TYPE_FOR_VAR | ||
563 | 37 | SET @@global.innodb_max_changed_pages = 'foo'; | ||
564 | 38 | SELECT @@global.innodb_max_changed_pages; | ||
565 | 39 | |||
566 | 40 | # Accessing as session variable forbidden | ||
567 | 41 | --error ER_GLOBAL_VARIABLE | ||
568 | 42 | SET @@session.innodb_max_changed_pages = 4096; | ||
569 | 43 | --error ER_INCORRECT_GLOBAL_LOCAL_VAR | ||
570 | 44 | SELECT @@session.innodb_max_changed_pages; | ||
571 | 45 | |||
572 | 46 | # Verify INFORMATION_SCHEMA access | ||
573 | 47 | SELECT @@global.innodb_max_changed_pages = VARIABLE_VALUE | ||
574 | 48 | FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES | ||
575 | 49 | WHERE VARIABLE_NAME='innodb_max_changed_pages'; | ||
576 | 50 | |||
577 | 51 | SELECT @@global.innodb_max_changed_pages = VARIABLE_VALUE | ||
578 | 52 | FROM INFORMATION_SCHEMA.SESSION_VARIABLES | ||
579 | 53 | WHERE VARIABLE_NAME='innodb_max_changed_pages'; | ||
580 | 54 | |||
581 | 55 | # Check default scope | ||
582 | 56 | SET @@global.innodb_max_changed_pages=6789; | ||
583 | 57 | SELECT @@global.innodb_max_changed_pages=@@innodb_max_changed_pages; | ||
584 | 58 | |||
585 | 59 | SET @@global.innodb_max_changed_pages=@start_value; | ||
586 | 60 | SELECT @@global.innodb_max_changed_pages; | ||
587 | 0 | 61 | ||
588 | === modified file 'Percona-Server/storage/innobase/handler/i_s.cc' | |||
589 | --- Percona-Server/storage/innobase/handler/i_s.cc 2013-05-15 05:05:18 +0000 | |||
590 | +++ Percona-Server/storage/innobase/handler/i_s.cc 2013-05-29 15:11:30 +0000 | |||
591 | @@ -52,7 +52,7 @@ | |||
592 | 52 | #include "dict0mem.h" | 52 | #include "dict0mem.h" |
593 | 53 | #include "dict0types.h" | 53 | #include "dict0types.h" |
594 | 54 | #include "ha_prototypes.h" /* for innobase_convert_name() */ | 54 | #include "ha_prototypes.h" /* for innobase_convert_name() */ |
596 | 55 | #include "srv0srv.h" /* for srv_track_changed_pages */ | 55 | #include "srv0srv.h" /* for srv_max_changed_pages */ |
597 | 56 | #include "srv0start.h" /* for srv_was_started */ | 56 | #include "srv0start.h" /* for srv_was_started */ |
598 | 57 | #include "trx0i_s.h" | 57 | #include "trx0i_s.h" |
599 | 58 | #include "trx0trx.h" /* for TRX_QUE_STATE_STR_MAX_LEN */ | 58 | #include "trx0trx.h" /* for TRX_QUE_STATE_STR_MAX_LEN */ |
600 | @@ -7473,6 +7473,7 @@ | |||
601 | 7473 | ib_uint64_t output_rows_num = 0UL; | 7473 | ib_uint64_t output_rows_num = 0UL; |
602 | 7474 | ib_uint64_t max_lsn = IB_ULONGLONG_MAX; | 7474 | ib_uint64_t max_lsn = IB_ULONGLONG_MAX; |
603 | 7475 | ib_uint64_t min_lsn = 0ULL; | 7475 | ib_uint64_t min_lsn = 0ULL; |
604 | 7476 | int ret = 0; | ||
605 | 7476 | 7477 | ||
606 | 7477 | DBUG_ENTER("i_s_innodb_changed_pages_fill"); | 7478 | DBUG_ENTER("i_s_innodb_changed_pages_fill"); |
607 | 7478 | 7479 | ||
608 | @@ -7484,10 +7485,6 @@ | |||
609 | 7484 | 7485 | ||
610 | 7485 | RETURN_IF_INNODB_NOT_STARTED(tables->schema_table_name); | 7486 | RETURN_IF_INNODB_NOT_STARTED(tables->schema_table_name); |
611 | 7486 | 7487 | ||
612 | 7487 | if (!srv_track_changed_pages) { | ||
613 | 7488 | DBUG_RETURN(0); | ||
614 | 7489 | } | ||
615 | 7490 | |||
616 | 7491 | if (cond) { | 7488 | if (cond) { |
617 | 7492 | limit_lsn_range_from_condition(table, cond, &min_lsn, | 7489 | limit_lsn_range_from_condition(table, cond, &min_lsn, |
618 | 7493 | &max_lsn); | 7490 | &max_lsn); |
619 | @@ -7563,8 +7560,13 @@ | |||
620 | 7563 | ++output_rows_num; | 7560 | ++output_rows_num; |
621 | 7564 | } | 7561 | } |
622 | 7565 | 7562 | ||
623 | 7563 | if (i.failed) { | ||
624 | 7564 | my_error(ER_CANT_FIND_SYSTEM_REC, MYF(0)); | ||
625 | 7565 | ret = 1; | ||
626 | 7566 | } | ||
627 | 7567 | |||
628 | 7566 | log_online_bitmap_iterator_release(&i); | 7568 | log_online_bitmap_iterator_release(&i); |
630 | 7567 | DBUG_RETURN(0); | 7569 | DBUG_RETURN(ret); |
631 | 7568 | } | 7570 | } |
632 | 7569 | 7571 | ||
633 | 7570 | static | 7572 | static |
634 | 7571 | 7573 | ||
635 | === modified file 'Percona-Server/storage/innobase/include/log0log.h' | |||
636 | --- Percona-Server/storage/innobase/include/log0log.h 2013-04-02 18:49:46 +0000 | |||
637 | +++ Percona-Server/storage/innobase/include/log0log.h 2013-05-29 15:11:30 +0000 | |||
638 | @@ -400,7 +400,9 @@ | |||
639 | 400 | byte* buf, /*!< in: buffer where to read */ | 400 | byte* buf, /*!< in: buffer where to read */ |
640 | 401 | log_group_t* group, /*!< in: log group */ | 401 | log_group_t* group, /*!< in: log group */ |
641 | 402 | ib_uint64_t start_lsn, /*!< in: read area start */ | 402 | ib_uint64_t start_lsn, /*!< in: read area start */ |
643 | 403 | ib_uint64_t end_lsn); /*!< in: read area end */ | 403 | ib_uint64_t end_lsn, /*!< in: read area end */ |
644 | 404 | ibool release_mutex); /*!< in: whether the log_sys->mutex | ||
645 | 405 | should be released before the read */ | ||
646 | 404 | /******************************************************//** | 406 | /******************************************************//** |
647 | 405 | Writes a buffer to a log file group. */ | 407 | Writes a buffer to a log file group. */ |
648 | 406 | UNIV_INTERN | 408 | UNIV_INTERN |
649 | 407 | 409 | ||
650 | === modified file 'Percona-Server/storage/innobase/include/log0online.h' | |||
651 | --- Percona-Server/storage/innobase/include/log0online.h 2013-01-30 13:42:52 +0000 | |||
652 | +++ Percona-Server/storage/innobase/include/log0online.h 2013-05-29 15:11:30 +0000 | |||
653 | @@ -159,6 +159,8 @@ | |||
654 | 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 */ |
655 | 160 | struct log_bitmap_iterator_struct | 160 | struct log_bitmap_iterator_struct |
656 | 161 | { | 161 | { |
657 | 162 | ibool failed; /*!< Has the iteration | ||
658 | 163 | stopped prematurely */ | ||
659 | 162 | log_online_bitmap_file_range_t in_files; /*!< The bitmap files | 164 | log_online_bitmap_file_range_t in_files; /*!< The bitmap files |
660 | 163 | for this iterator */ | 165 | for this iterator */ |
661 | 164 | size_t in_i; /*!< Currently read | 166 | size_t in_i; /*!< Currently read |
662 | 165 | 167 | ||
663 | === modified file 'Percona-Server/storage/innobase/include/os0file.h' | |||
664 | --- Percona-Server/storage/innobase/include/os0file.h 2013-02-06 09:26:12 +0000 | |||
665 | +++ Percona-Server/storage/innobase/include/os0file.h 2013-05-29 15:11:30 +0000 | |||
666 | @@ -76,15 +76,19 @@ | |||
667 | 76 | #endif | 76 | #endif |
668 | 77 | 77 | ||
669 | 78 | #ifdef __WIN__ | 78 | #ifdef __WIN__ |
670 | 79 | #define SRV_PATH_SEPARATOR '\\' | ||
671 | 79 | /** File handle */ | 80 | /** File handle */ |
672 | 80 | # define os_file_t HANDLE | 81 | # define os_file_t HANDLE |
673 | 82 | # define os_file_invalid INVALID_HANDLE_VALUE | ||
674 | 81 | /** Convert a C file descriptor to a native file handle | 83 | /** Convert a C file descriptor to a native file handle |
675 | 82 | @param fd file descriptor | 84 | @param fd file descriptor |
676 | 83 | @return native file handle */ | 85 | @return native file handle */ |
677 | 84 | # define OS_FILE_FROM_FD(fd) (HANDLE) _get_osfhandle(fd) | 86 | # define OS_FILE_FROM_FD(fd) (HANDLE) _get_osfhandle(fd) |
678 | 85 | #else | 87 | #else |
679 | 88 | #define SRV_PATH_SEPARATOR '/' | ||
680 | 86 | /** File handle */ | 89 | /** File handle */ |
681 | 87 | typedef int os_file_t; | 90 | typedef int os_file_t; |
682 | 91 | # define os_file_invalid (-1) | ||
683 | 88 | /** Convert a C file descriptor to a native file handle | 92 | /** Convert a C file descriptor to a native file handle |
684 | 89 | @param fd file descriptor | 93 | @param fd file descriptor |
685 | 90 | @return native file handle */ | 94 | @return native file handle */ |
686 | @@ -819,7 +823,6 @@ | |||
687 | 819 | ulint src_line);/*!< in: line where the func invoked */ | 823 | ulint src_line);/*!< in: line where the func invoked */ |
688 | 820 | #endif /* UNIV_PFS_IO */ | 824 | #endif /* UNIV_PFS_IO */ |
689 | 821 | 825 | ||
690 | 822 | #ifdef UNIV_HOTBACKUP | ||
691 | 823 | /***********************************************************************//** | 826 | /***********************************************************************//** |
692 | 824 | Closes a file handle. | 827 | Closes a file handle. |
693 | 825 | @return TRUE if success */ | 828 | @return TRUE if success */ |
694 | @@ -828,7 +831,6 @@ | |||
695 | 828 | os_file_close_no_error_handling( | 831 | os_file_close_no_error_handling( |
696 | 829 | /*============================*/ | 832 | /*============================*/ |
697 | 830 | os_file_t file); /*!< in, own: handle to a file */ | 833 | os_file_t file); /*!< in, own: handle to a file */ |
698 | 831 | #endif /* UNIV_HOTBACKUP */ | ||
699 | 832 | /***********************************************************************//** | 834 | /***********************************************************************//** |
700 | 833 | Gets a file size. | 835 | Gets a file size. |
701 | 834 | @return TRUE if success */ | 836 | @return TRUE if success */ |
702 | 835 | 837 | ||
703 | === modified file 'Percona-Server/storage/innobase/log/log0log.c' | |||
704 | --- Percona-Server/storage/innobase/log/log0log.c 2013-04-03 06:56:50 +0000 | |||
705 | +++ Percona-Server/storage/innobase/log/log0log.c 2013-05-29 15:11:30 +0000 | |||
706 | @@ -2307,7 +2307,8 @@ | |||
707 | 2307 | } | 2307 | } |
708 | 2308 | 2308 | ||
709 | 2309 | /******************************************************//** | 2309 | /******************************************************//** |
711 | 2310 | Reads a specified log segment to a buffer. */ | 2310 | Reads a specified log segment to a buffer. Optionally releases the log mutex |
712 | 2311 | before the I/O. */ | ||
713 | 2311 | UNIV_INTERN | 2312 | UNIV_INTERN |
714 | 2312 | void | 2313 | void |
715 | 2313 | log_group_read_log_seg( | 2314 | log_group_read_log_seg( |
716 | @@ -2316,7 +2317,9 @@ | |||
717 | 2316 | byte* buf, /*!< in: buffer where to read */ | 2317 | byte* buf, /*!< in: buffer where to read */ |
718 | 2317 | log_group_t* group, /*!< in: log group */ | 2318 | log_group_t* group, /*!< in: log group */ |
719 | 2318 | ib_uint64_t start_lsn, /*!< in: read area start */ | 2319 | ib_uint64_t start_lsn, /*!< in: read area start */ |
721 | 2319 | ib_uint64_t end_lsn) /*!< in: read area end */ | 2320 | ib_uint64_t end_lsn, /*!< in: read area end */ |
722 | 2321 | ibool release_mutex) /*!< in: whether the log_sys->mutex | ||
723 | 2322 | should be released before the read */ | ||
724 | 2320 | { | 2323 | { |
725 | 2321 | ulint len; | 2324 | ulint len; |
726 | 2322 | ulint source_offset; | 2325 | ulint source_offset; |
727 | @@ -2346,6 +2349,10 @@ | |||
728 | 2346 | 2349 | ||
729 | 2347 | log_sys->n_log_ios++; | 2350 | log_sys->n_log_ios++; |
730 | 2348 | 2351 | ||
731 | 2352 | if (release_mutex) { | ||
732 | 2353 | mutex_exit(&(log_sys->mutex)); | ||
733 | 2354 | } | ||
734 | 2355 | |||
735 | 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, |
736 | 2350 | source_offset / UNIV_PAGE_SIZE, source_offset % UNIV_PAGE_SIZE, | 2357 | source_offset / UNIV_PAGE_SIZE, source_offset % UNIV_PAGE_SIZE, |
737 | 2351 | len, buf, NULL); | 2358 | len, buf, NULL); |
738 | @@ -2355,6 +2362,9 @@ | |||
739 | 2355 | 2362 | ||
740 | 2356 | if (start_lsn != end_lsn) { | 2363 | if (start_lsn != end_lsn) { |
741 | 2357 | 2364 | ||
742 | 2365 | if (release_mutex) { | ||
743 | 2366 | mutex_enter(&(log_sys->mutex)); | ||
744 | 2367 | } | ||
745 | 2358 | goto loop; | 2368 | goto loop; |
746 | 2359 | } | 2369 | } |
747 | 2360 | } | 2370 | } |
748 | @@ -2846,7 +2856,7 @@ | |||
749 | 2846 | 2856 | ||
750 | 2847 | log_group_read_log_seg(LOG_ARCHIVE, log_sys->archive_buf, | 2857 | log_group_read_log_seg(LOG_ARCHIVE, log_sys->archive_buf, |
751 | 2848 | UT_LIST_GET_FIRST(log_sys->log_groups), | 2858 | UT_LIST_GET_FIRST(log_sys->log_groups), |
753 | 2849 | start_lsn, limit_lsn); | 2859 | start_lsn, limit_lsn, FALSE); |
754 | 2850 | 2860 | ||
755 | 2851 | mutex_exit(&(log_sys->mutex)); | 2861 | mutex_exit(&(log_sys->mutex)); |
756 | 2852 | 2862 | ||
757 | 2853 | 2863 | ||
758 | === modified file 'Percona-Server/storage/innobase/log/log0online.c' | |||
759 | --- Percona-Server/storage/innobase/log/log0online.c 2013-04-04 03:54:12 +0000 | |||
760 | +++ Percona-Server/storage/innobase/log/log0online.c 2013-05-29 15:11:30 +0000 | |||
761 | @@ -43,8 +43,8 @@ | |||
762 | 43 | 43 | ||
763 | 44 | /** Log parsing and bitmap output data structure */ | 44 | /** Log parsing and bitmap output data structure */ |
764 | 45 | struct log_bitmap_struct { | 45 | struct log_bitmap_struct { |
767 | 46 | byte read_buf[FOLLOW_SCAN_SIZE]; | 46 | byte* read_buf_ptr; /*!< Unaligned log read buffer */ |
768 | 47 | /*!< log read buffer */ | 47 | byte* read_buf; /*!< log read buffer */ |
769 | 48 | byte parse_buf[RECV_PARSING_BUF_SIZE]; | 48 | byte parse_buf[RECV_PARSING_BUF_SIZE]; |
770 | 49 | /*!< log parse buffer */ | 49 | /*!< log parse buffer */ |
771 | 50 | byte* parse_buf_end; /*!< parse buffer position where the | 50 | byte* parse_buf_end; /*!< parse buffer position where the |
772 | @@ -53,6 +53,8 @@ | |||
773 | 53 | parsed, it points to the start, | 53 | parsed, it points to the start, |
774 | 54 | otherwise points immediatelly past the | 54 | otherwise points immediatelly past the |
775 | 55 | end of the incomplete log record. */ | 55 | end of the incomplete log record. */ |
776 | 56 | char bmp_file_home[FN_REFLEN]; | ||
777 | 57 | /*!< directory for bitmap files */ | ||
778 | 56 | log_online_bitmap_file_t out; /*!< The current bitmap file */ | 58 | log_online_bitmap_file_t out; /*!< The current bitmap file */ |
779 | 57 | ulint out_seq_num; /*!< the bitmap file sequence number */ | 59 | ulint out_seq_num; /*!< the bitmap file sequence number */ |
780 | 58 | ib_uint64_t start_lsn; /*!< the LSN of the next unparsed | 60 | ib_uint64_t start_lsn; /*!< the LSN of the next unparsed |
781 | @@ -490,9 +492,8 @@ | |||
782 | 490 | ib_uint64_t start_lsn) /*!< in: the start LSN name part */ | 492 | ib_uint64_t start_lsn) /*!< in: the start LSN name part */ |
783 | 491 | { | 493 | { |
784 | 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, |
786 | 493 | srv_data_home, bmp_file_name_stem, | 495 | log_bmp_sys->bmp_file_home, bmp_file_name_stem, |
787 | 494 | log_bmp_sys->out_seq_num, start_lsn); | 496 | log_bmp_sys->out_seq_num, start_lsn); |
788 | 495 | |||
789 | 496 | } | 497 | } |
790 | 497 | 498 | ||
791 | 498 | /*********************************************************************//** | 499 | /*********************************************************************//** |
792 | @@ -509,7 +510,8 @@ | |||
793 | 509 | 510 | ||
794 | 510 | /* Currently, it's OK to overwrite 0-sized files only */ | 511 | /* Currently, it's OK to overwrite 0-sized files only */ |
795 | 511 | success = os_file_get_status(path, &file_info); | 512 | success = os_file_get_status(path, &file_info); |
797 | 512 | return success && file_info.size == 0LL; | 513 | return success && file_info.type == OS_FILE_TYPE_FILE |
798 | 514 | && file_info.size == 0LL; | ||
799 | 513 | } | 515 | } |
800 | 514 | 516 | ||
801 | 515 | /*********************************************************************//** | 517 | /*********************************************************************//** |
802 | @@ -525,7 +527,7 @@ | |||
803 | 525 | 527 | ||
804 | 526 | /* Check for an old file that should be deleted first */ | 528 | /* Check for an old file that should be deleted first */ |
805 | 527 | if (log_online_should_overwrite(log_bmp_sys->out.name)) { | 529 | if (log_online_should_overwrite(log_bmp_sys->out.name)) { |
807 | 528 | success = os_file_delete(log_bmp_sys->out.name); | 530 | success = os_file_delete_if_exists(log_bmp_sys->out.name); |
808 | 529 | } | 531 | } |
809 | 530 | 532 | ||
810 | 531 | if (UNIV_LIKELY(success)) { | 533 | if (UNIV_LIKELY(success)) { |
811 | @@ -544,7 +546,6 @@ | |||
812 | 544 | fprintf(stderr, | 546 | fprintf(stderr, |
813 | 545 | "InnoDB: Error: Cannot create \'%s\'\n", | 547 | "InnoDB: Error: Cannot create \'%s\'\n", |
814 | 546 | log_bmp_sys->out.name); | 548 | log_bmp_sys->out.name); |
815 | 547 | log_bmp_sys->out.file = -1; | ||
816 | 548 | return FALSE; | 549 | return FALSE; |
817 | 549 | } | 550 | } |
818 | 550 | 551 | ||
819 | @@ -563,9 +564,9 @@ | |||
820 | 563 | ib_uint64_t next_file_start_lsn) /*!<in: the start LSN name | 564 | ib_uint64_t next_file_start_lsn) /*!<in: the start LSN name |
821 | 564 | part */ | 565 | part */ |
822 | 565 | { | 566 | { |
824 | 566 | if (log_bmp_sys->out.file != -1) { | 567 | if (log_bmp_sys->out.file != os_file_invalid) { |
825 | 567 | os_file_close(log_bmp_sys->out.file); | 568 | os_file_close(log_bmp_sys->out.file); |
827 | 568 | log_bmp_sys->out.file = -1; | 569 | log_bmp_sys->out.file = os_file_invalid; |
828 | 569 | } | 570 | } |
829 | 570 | log_bmp_sys->out_seq_num++; | 571 | log_bmp_sys->out_seq_num++; |
830 | 571 | log_online_make_bitmap_name(next_file_start_lsn); | 572 | log_online_make_bitmap_name(next_file_start_lsn); |
831 | @@ -613,6 +614,7 @@ | |||
832 | 613 | os_file_dir_t bitmap_dir; | 614 | os_file_dir_t bitmap_dir; |
833 | 614 | os_file_stat_t bitmap_dir_file_info; | 615 | os_file_stat_t bitmap_dir_file_info; |
834 | 615 | ib_uint64_t last_file_start_lsn = MIN_TRACKED_LSN; | 616 | ib_uint64_t last_file_start_lsn = MIN_TRACKED_LSN; |
835 | 617 | size_t srv_data_home_len; | ||
836 | 616 | 618 | ||
837 | 617 | /* Bitmap data start and end in a bitmap block must be 8-byte | 619 | /* Bitmap data start and end in a bitmap block must be 8-byte |
838 | 618 | aligned. */ | 620 | aligned. */ |
839 | @@ -620,20 +622,39 @@ | |||
840 | 620 | compile_time_assert(MODIFIED_PAGE_BLOCK_BITMAP_LEN % 8 == 0); | 622 | compile_time_assert(MODIFIED_PAGE_BLOCK_BITMAP_LEN % 8 == 0); |
841 | 621 | 623 | ||
842 | 622 | log_bmp_sys = ut_malloc(sizeof(*log_bmp_sys)); | 624 | log_bmp_sys = ut_malloc(sizeof(*log_bmp_sys)); |
843 | 625 | log_bmp_sys->read_buf_ptr = ut_malloc(FOLLOW_SCAN_SIZE | ||
844 | 626 | + OS_FILE_LOG_BLOCK_SIZE); | ||
845 | 627 | log_bmp_sys->read_buf = ut_align(log_bmp_sys->read_buf_ptr, | ||
846 | 628 | OS_FILE_LOG_BLOCK_SIZE); | ||
847 | 623 | 629 | ||
848 | 624 | mutex_create(log_bmp_sys_mutex_key, &log_bmp_sys->mutex, | 630 | mutex_create(log_bmp_sys_mutex_key, &log_bmp_sys->mutex, |
849 | 625 | SYNC_LOG_ONLINE); | 631 | SYNC_LOG_ONLINE); |
850 | 626 | 632 | ||
851 | 633 | /* Initialize bitmap file directory from srv_data_home and add a path | ||
852 | 634 | separator if needed. */ | ||
853 | 635 | srv_data_home_len = strlen(srv_data_home); | ||
854 | 636 | ut_a (srv_data_home_len < FN_REFLEN); | ||
855 | 637 | strcpy(log_bmp_sys->bmp_file_home, srv_data_home); | ||
856 | 638 | if (srv_data_home_len | ||
857 | 639 | && log_bmp_sys->bmp_file_home[srv_data_home_len - 1] | ||
858 | 640 | != SRV_PATH_SEPARATOR) { | ||
859 | 641 | |||
860 | 642 | ut_a (srv_data_home_len < FN_REFLEN - 1); | ||
861 | 643 | log_bmp_sys->bmp_file_home[srv_data_home_len] | ||
862 | 644 | = SRV_PATH_SEPARATOR; | ||
863 | 645 | log_bmp_sys->bmp_file_home[srv_data_home_len + 1] = '\0'; | ||
864 | 646 | } | ||
865 | 647 | |||
866 | 627 | /* Enumerate existing bitmap files to either open the last one to get | 648 | /* Enumerate existing bitmap files to either open the last one to get |
867 | 628 | the last tracked LSN either to find that there are none and start | 649 | the last tracked LSN either to find that there are none and start |
868 | 629 | tracking from scratch. */ | 650 | tracking from scratch. */ |
869 | 630 | log_bmp_sys->out.name[0] = '\0'; | 651 | log_bmp_sys->out.name[0] = '\0'; |
870 | 631 | log_bmp_sys->out_seq_num = 0; | 652 | log_bmp_sys->out_seq_num = 0; |
871 | 632 | 653 | ||
873 | 633 | bitmap_dir = os_file_opendir(srv_data_home, TRUE); | 654 | bitmap_dir = os_file_opendir(log_bmp_sys->bmp_file_home, TRUE); |
874 | 634 | ut_a(bitmap_dir); | 655 | ut_a(bitmap_dir); |
877 | 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, |
878 | 636 | &bitmap_dir_file_info)) { | 657 | bitmap_dir, &bitmap_dir_file_info)) { |
879 | 637 | 658 | ||
880 | 638 | ulong file_seq_num; | 659 | ulong file_seq_num; |
881 | 639 | ib_uint64_t file_start_lsn; | 660 | ib_uint64_t file_start_lsn; |
882 | @@ -648,8 +669,8 @@ | |||
883 | 648 | && bitmap_dir_file_info.size > 0) { | 669 | && bitmap_dir_file_info.size > 0) { |
884 | 649 | log_bmp_sys->out_seq_num = file_seq_num; | 670 | log_bmp_sys->out_seq_num = file_seq_num; |
885 | 650 | last_file_start_lsn = file_start_lsn; | 671 | last_file_start_lsn = file_start_lsn; |
888 | 651 | /* No dir component (srv_data_home) here, because | 672 | /* No dir component (log_bmp_sys->bmp_file_home) here, |
889 | 652 | that's the cwd */ | 673 | because that's the cwd */ |
890 | 653 | strncpy(log_bmp_sys->out.name, | 674 | strncpy(log_bmp_sys->out.name, |
891 | 654 | bitmap_dir_file_info.name, FN_REFLEN - 1); | 675 | bitmap_dir_file_info.name, FN_REFLEN - 1); |
892 | 655 | log_bmp_sys->out.name[FN_REFLEN - 1] = '\0'; | 676 | log_bmp_sys->out.name[FN_REFLEN - 1] = '\0'; |
893 | @@ -659,7 +680,7 @@ | |||
894 | 659 | if (os_file_closedir(bitmap_dir)) { | 680 | if (os_file_closedir(bitmap_dir)) { |
895 | 660 | os_file_get_last_error(TRUE); | 681 | os_file_get_last_error(TRUE); |
896 | 661 | fprintf(stderr, "InnoDB: Error: cannot close \'%s\'\n", | 682 | fprintf(stderr, "InnoDB: Error: cannot close \'%s\'\n", |
898 | 662 | srv_data_home); | 683 | log_bmp_sys->bmp_file_home); |
899 | 663 | exit(1); | 684 | exit(1); |
900 | 664 | } | 685 | } |
901 | 665 | 686 | ||
902 | @@ -762,9 +783,9 @@ | |||
903 | 762 | { | 783 | { |
904 | 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; |
905 | 764 | 785 | ||
907 | 765 | if (log_bmp_sys->out.file != -1) { | 786 | if (log_bmp_sys->out.file != os_file_invalid) { |
908 | 766 | os_file_close(log_bmp_sys->out.file); | 787 | os_file_close(log_bmp_sys->out.file); |
910 | 767 | log_bmp_sys->out.file = -1; | 788 | log_bmp_sys->out.file = os_file_invalid; |
911 | 768 | } | 789 | } |
912 | 769 | 790 | ||
913 | 770 | rbt_free(log_bmp_sys->modified_pages); | 791 | rbt_free(log_bmp_sys->modified_pages); |
914 | @@ -777,6 +798,7 @@ | |||
915 | 777 | 798 | ||
916 | 778 | mutex_free(&log_bmp_sys->mutex); | 799 | mutex_free(&log_bmp_sys->mutex); |
917 | 779 | 800 | ||
918 | 801 | ut_free(log_bmp_sys->read_buf_ptr); | ||
919 | 780 | ut_free(log_bmp_sys); | 802 | ut_free(log_bmp_sys); |
920 | 781 | } | 803 | } |
921 | 782 | 804 | ||
922 | @@ -978,8 +1000,8 @@ | |||
923 | 978 | 1000 | ||
924 | 979 | mutex_enter(&log_sys->mutex); | 1001 | mutex_enter(&log_sys->mutex); |
925 | 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, |
928 | 981 | group, block_start_lsn, block_end_lsn); | 1003 | group, block_start_lsn, block_end_lsn, TRUE); |
929 | 982 | mutex_exit(&log_sys->mutex); | 1004 | /* log_group_read_log_seg will release the log_sys->mutex for us */ |
930 | 983 | 1005 | ||
931 | 984 | while (log_block < log_block_end | 1006 | while (log_block < log_block_end |
932 | 985 | && log_bmp_sys->next_parse_lsn < log_bmp_sys->end_lsn) { | 1007 | && log_bmp_sys->next_parse_lsn < log_bmp_sys->end_lsn) { |
933 | @@ -1256,15 +1278,18 @@ | |||
934 | 1256 | os_file_dir_t bitmap_dir; | 1278 | os_file_dir_t bitmap_dir; |
935 | 1257 | os_file_stat_t bitmap_dir_file_info; | 1279 | os_file_stat_t bitmap_dir_file_info; |
936 | 1258 | ulong first_file_seq_num = ULONG_MAX; | 1280 | ulong first_file_seq_num = ULONG_MAX; |
937 | 1281 | ulong last_file_seq_num = 0; | ||
938 | 1259 | ib_uint64_t first_file_start_lsn = IB_ULONGLONG_MAX; | 1282 | ib_uint64_t first_file_start_lsn = IB_ULONGLONG_MAX; |
939 | 1260 | 1283 | ||
940 | 1284 | ut_ad(range_end >= range_start); | ||
941 | 1285 | |||
942 | 1261 | bitmap_files->count = 0; | 1286 | bitmap_files->count = 0; |
943 | 1262 | bitmap_files->files = NULL; | 1287 | bitmap_files->files = NULL; |
944 | 1263 | 1288 | ||
945 | 1264 | /* 1st pass: size the info array */ | 1289 | /* 1st pass: size the info array */ |
946 | 1265 | 1290 | ||
947 | 1266 | bitmap_dir = os_file_opendir(srv_data_home, FALSE); | 1291 | bitmap_dir = os_file_opendir(srv_data_home, FALSE); |
949 | 1267 | if (!bitmap_dir) { | 1292 | if (UNIV_UNLIKELY(!bitmap_dir)) { |
950 | 1268 | fprintf(stderr, | 1293 | fprintf(stderr, |
951 | 1269 | "InnoDB: Error: " | 1294 | "InnoDB: Error: " |
952 | 1270 | "failed to open bitmap directory \'%s\'\n", | 1295 | "failed to open bitmap directory \'%s\'\n", |
953 | @@ -1286,12 +1311,17 @@ | |||
954 | 1286 | continue; | 1311 | continue; |
955 | 1287 | } | 1312 | } |
956 | 1288 | 1313 | ||
957 | 1314 | if (file_seq_num > last_file_seq_num) { | ||
958 | 1315 | |||
959 | 1316 | last_file_seq_num = file_seq_num; | ||
960 | 1317 | } | ||
961 | 1318 | |||
962 | 1289 | if (file_start_lsn >= range_start | 1319 | if (file_start_lsn >= range_start |
963 | 1290 | || file_start_lsn == first_file_start_lsn | 1320 | || file_start_lsn == first_file_start_lsn |
964 | 1291 | || first_file_start_lsn > range_start) { | 1321 | || first_file_start_lsn > range_start) { |
965 | 1292 | 1322 | ||
966 | 1293 | /* A file that falls into the range */ | 1323 | /* A file that falls into the range */ |
968 | 1294 | bitmap_files->count++; | 1324 | |
969 | 1295 | if (file_start_lsn < first_file_start_lsn) { | 1325 | if (file_start_lsn < first_file_start_lsn) { |
970 | 1296 | 1326 | ||
971 | 1297 | first_file_start_lsn = file_start_lsn; | 1327 | first_file_start_lsn = file_start_lsn; |
972 | @@ -1309,23 +1339,27 @@ | |||
973 | 1309 | } | 1339 | } |
974 | 1310 | } | 1340 | } |
975 | 1311 | 1341 | ||
977 | 1312 | ut_a(first_file_seq_num != ULONG_MAX || bitmap_files->count == 0); | 1342 | if (UNIV_UNLIKELY(os_file_closedir(bitmap_dir))) { |
978 | 1313 | 1343 | ||
979 | 1314 | if (os_file_closedir(bitmap_dir)) { | ||
980 | 1315 | os_file_get_last_error(TRUE); | 1344 | os_file_get_last_error(TRUE); |
981 | 1316 | fprintf(stderr, "InnoDB: Error: cannot close \'%s\'\n", | 1345 | fprintf(stderr, "InnoDB: Error: cannot close \'%s\'\n", |
982 | 1317 | srv_data_home); | 1346 | srv_data_home); |
983 | 1318 | return FALSE; | 1347 | return FALSE; |
984 | 1319 | } | 1348 | } |
985 | 1320 | 1349 | ||
987 | 1321 | if (!bitmap_files->count) { | 1350 | if (first_file_seq_num == ULONG_MAX && last_file_seq_num == 0) { |
988 | 1351 | |||
989 | 1352 | bitmap_files->count = 0; | ||
990 | 1322 | return TRUE; | 1353 | return TRUE; |
991 | 1323 | } | 1354 | } |
992 | 1324 | 1355 | ||
993 | 1356 | bitmap_files->count = last_file_seq_num - first_file_seq_num + 1; | ||
994 | 1357 | |||
995 | 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 */ |
996 | 1326 | 1359 | ||
997 | 1327 | bitmap_dir = os_file_opendir(srv_data_home, FALSE); | 1360 | bitmap_dir = os_file_opendir(srv_data_home, FALSE); |
999 | 1328 | if (!bitmap_dir) { | 1361 | if (UNIV_UNLIKELY(!bitmap_dir)) { |
1000 | 1362 | |||
1001 | 1329 | fprintf(stderr, "InnoDB: Error: " | 1363 | fprintf(stderr, "InnoDB: Error: " |
1002 | 1330 | "failed to open bitmap directory \'%s\'\n", | 1364 | "failed to open bitmap directory \'%s\'\n", |
1003 | 1331 | srv_data_home); | 1365 | srv_data_home); |
1004 | @@ -1349,11 +1383,25 @@ | |||
1005 | 1349 | &file_start_lsn) | 1383 | &file_start_lsn) |
1006 | 1350 | || file_start_lsn >= range_end | 1384 | || file_start_lsn >= range_end |
1007 | 1351 | || file_start_lsn < first_file_start_lsn) { | 1385 | || file_start_lsn < first_file_start_lsn) { |
1008 | 1386 | |||
1009 | 1352 | continue; | 1387 | continue; |
1010 | 1353 | } | 1388 | } |
1011 | 1354 | 1389 | ||
1012 | 1355 | array_pos = file_seq_num - first_file_seq_num; | 1390 | array_pos = file_seq_num - first_file_seq_num; |
1013 | 1391 | if (UNIV_UNLIKELY(array_pos >= bitmap_files->count)) { | ||
1014 | 1392 | |||
1015 | 1393 | fprintf(stderr, | ||
1016 | 1394 | "InnoDB: Error: inconsistent bitmap file " | ||
1017 | 1395 | "directory for a " | ||
1018 | 1396 | "INFORMATION_SCHEMA.INNODB_CHANGED_PAGES query" | ||
1019 | 1397 | "\n"); | ||
1020 | 1398 | free(bitmap_files->files); | ||
1021 | 1399 | return FALSE; | ||
1022 | 1400 | } | ||
1023 | 1401 | |||
1024 | 1402 | |||
1025 | 1356 | if (file_seq_num > bitmap_files->files[array_pos].seq_num) { | 1403 | if (file_seq_num > bitmap_files->files[array_pos].seq_num) { |
1026 | 1404 | |||
1027 | 1357 | bitmap_files->files[array_pos].seq_num = file_seq_num; | 1405 | bitmap_files->files[array_pos].seq_num = file_seq_num; |
1028 | 1358 | strncpy(bitmap_files->files[array_pos].name, | 1406 | strncpy(bitmap_files->files[array_pos].name, |
1029 | 1359 | bitmap_dir_file_info.name, FN_REFLEN); | 1407 | bitmap_dir_file_info.name, FN_REFLEN); |
1030 | @@ -1364,7 +1412,8 @@ | |||
1031 | 1364 | } | 1412 | } |
1032 | 1365 | } | 1413 | } |
1033 | 1366 | 1414 | ||
1035 | 1367 | if (os_file_closedir(bitmap_dir)) { | 1415 | if (UNIV_UNLIKELY(os_file_closedir(bitmap_dir))) { |
1036 | 1416 | |||
1037 | 1368 | os_file_get_last_error(TRUE); | 1417 | os_file_get_last_error(TRUE); |
1038 | 1369 | fprintf(stderr, "InnoDB: Error: cannot close \'%s\'\n", | 1418 | fprintf(stderr, "InnoDB: Error: cannot close \'%s\'\n", |
1039 | 1370 | srv_data_home); | 1419 | srv_data_home); |
1040 | @@ -1411,6 +1460,8 @@ | |||
1041 | 1411 | ulint size_low; | 1460 | ulint size_low; |
1042 | 1412 | ulint size_high; | 1461 | ulint size_high; |
1043 | 1413 | 1462 | ||
1044 | 1463 | ut_ad(name[0] != '\0'); | ||
1045 | 1464 | |||
1046 | 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); |
1047 | 1415 | bitmap_file->file | 1466 | bitmap_file->file |
1048 | 1416 | = os_file_create_simple_no_error_handling(innodb_file_bmp_key, | 1467 | = os_file_create_simple_no_error_handling(innodb_file_bmp_key, |
1049 | @@ -1418,7 +1469,8 @@ | |||
1050 | 1418 | OS_FILE_OPEN, | 1469 | OS_FILE_OPEN, |
1051 | 1419 | OS_FILE_READ_ONLY, | 1470 | OS_FILE_READ_ONLY, |
1052 | 1420 | &success); | 1471 | &success); |
1054 | 1421 | if (!success) { | 1472 | if (UNIV_UNLIKELY(!success)) { |
1055 | 1473 | |||
1056 | 1422 | /* Here and below assume that bitmap file names do not | 1474 | /* Here and below assume that bitmap file names do not |
1057 | 1423 | contain apostrophes, thus no need for ut_print_filename(). */ | 1475 | contain apostrophes, thus no need for ut_print_filename(). */ |
1058 | 1424 | fprintf(stderr, | 1476 | fprintf(stderr, |
1059 | @@ -1461,7 +1513,8 @@ | |||
1060 | 1461 | || (bitmap_file->offset | 1513 | || (bitmap_file->offset |
1061 | 1462 | > bitmap_file->size - MODIFIED_PAGE_BLOCK_SIZE)) { | 1514 | > bitmap_file->size - MODIFIED_PAGE_BLOCK_SIZE)) { |
1062 | 1463 | 1515 | ||
1064 | 1464 | if (bitmap_file->offset != bitmap_file->size) { | 1516 | if (UNIV_UNLIKELY(bitmap_file->offset != bitmap_file->size)) { |
1065 | 1517 | |||
1066 | 1465 | /* If we are not at EOF and we have less than one page | 1518 | /* If we are not at EOF and we have less than one page |
1067 | 1466 | to read, it's junk. This error is not fatal in | 1519 | to read, it's junk. This error is not fatal in |
1068 | 1467 | itself. */ | 1520 | itself. */ |
1069 | @@ -1472,7 +1525,8 @@ | |||
1070 | 1472 | bitmap_file->name); | 1525 | bitmap_file->name); |
1071 | 1473 | } | 1526 | } |
1072 | 1474 | 1527 | ||
1074 | 1475 | if (!last_page_in_run) { | 1528 | if (UNIV_UNLIKELY(!last_page_in_run)) { |
1075 | 1529 | |||
1076 | 1476 | /* We are at EOF but the last read page did not finish | 1530 | /* We are at EOF but the last read page did not finish |
1077 | 1477 | a run */ | 1531 | a run */ |
1078 | 1478 | /* It's a "Warning" here because it's not a fatal error | 1532 | /* It's a "Warning" here because it's not a fatal error |
1079 | @@ -1512,18 +1566,29 @@ | |||
1080 | 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, |
1081 | 1513 | max_lsn)) { | 1567 | max_lsn)) { |
1082 | 1514 | 1568 | ||
1083 | 1569 | i->failed = TRUE; | ||
1084 | 1515 | return FALSE; | 1570 | return FALSE; |
1085 | 1516 | } | 1571 | } |
1086 | 1517 | 1572 | ||
1088 | 1518 | ut_a(i->in_files.count > 0); | 1573 | i->in_i = 0; |
1089 | 1574 | |||
1090 | 1575 | if (i->in_files.count == 0) { | ||
1091 | 1576 | |||
1092 | 1577 | /* Empty range */ | ||
1093 | 1578 | i->in.file = os_file_invalid; | ||
1094 | 1579 | i->page = NULL; | ||
1095 | 1580 | i->failed = FALSE; | ||
1096 | 1581 | return TRUE; | ||
1097 | 1582 | } | ||
1098 | 1519 | 1583 | ||
1099 | 1520 | /* Open the 1st bitmap file */ | 1584 | /* Open the 1st bitmap file */ |
1104 | 1521 | i->in_i = 0; | 1585 | if (UNIV_UNLIKELY(!log_online_open_bitmap_file_read_only( |
1105 | 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, |
1106 | 1523 | name, | 1587 | &i->in))) { |
1107 | 1524 | &i->in)) { | 1588 | |
1108 | 1525 | i->in_i = i->in_files.count; | 1589 | i->in_i = i->in_files.count; |
1109 | 1526 | free(i->in_files.files); | 1590 | free(i->in_files.files); |
1110 | 1591 | i->failed = TRUE; | ||
1111 | 1527 | return FALSE; | 1592 | return FALSE; |
1112 | 1528 | } | 1593 | } |
1113 | 1529 | 1594 | ||
1114 | @@ -1534,6 +1599,7 @@ | |||
1115 | 1534 | i->first_page_id = 0; | 1599 | i->first_page_id = 0; |
1116 | 1535 | i->last_page_in_run = TRUE; | 1600 | i->last_page_in_run = TRUE; |
1117 | 1536 | i->changed = FALSE; | 1601 | i->changed = FALSE; |
1118 | 1602 | i->failed = FALSE; | ||
1119 | 1537 | 1603 | ||
1120 | 1538 | return TRUE; | 1604 | return TRUE; |
1121 | 1539 | } | 1605 | } |
1122 | @@ -1548,11 +1614,20 @@ | |||
1123 | 1548 | { | 1614 | { |
1124 | 1549 | ut_a(i); | 1615 | ut_a(i); |
1125 | 1550 | 1616 | ||
1127 | 1551 | if (i->in_i < i->in_files.count) { | 1617 | if (i->in.file != os_file_invalid) { |
1128 | 1618 | |||
1129 | 1552 | os_file_close(i->in.file); | 1619 | os_file_close(i->in.file); |
1133 | 1553 | } | 1620 | i->in.file = os_file_invalid; |
1134 | 1554 | ut_free(i->in_files.files); | 1621 | } |
1135 | 1555 | ut_free(i->page); | 1622 | if (i->in_files.files) { |
1136 | 1623 | |||
1137 | 1624 | ut_free(i->in_files.files); | ||
1138 | 1625 | } | ||
1139 | 1626 | if (i->page) { | ||
1140 | 1627 | |||
1141 | 1628 | ut_free(i->page); | ||
1142 | 1629 | } | ||
1143 | 1630 | i->failed = TRUE; | ||
1144 | 1556 | } | 1631 | } |
1145 | 1557 | 1632 | ||
1146 | 1558 | /*********************************************************************//** | 1633 | /*********************************************************************//** |
1147 | @@ -1567,10 +1642,16 @@ | |||
1148 | 1567 | log_bitmap_iterator_t *i) /*!<in/out: iterator */ | 1642 | log_bitmap_iterator_t *i) /*!<in/out: iterator */ |
1149 | 1568 | { | 1643 | { |
1150 | 1569 | ibool checksum_ok = FALSE; | 1644 | ibool checksum_ok = FALSE; |
1151 | 1645 | ibool success; | ||
1152 | 1570 | 1646 | ||
1153 | 1571 | ut_a(i); | 1647 | ut_a(i); |
1154 | 1572 | 1648 | ||
1156 | 1573 | if (i->bit_offset < MODIFIED_PAGE_BLOCK_BITMAP_LEN) | 1649 | if (UNIV_UNLIKELY(i->in_files.count == 0)) { |
1157 | 1650 | |||
1158 | 1651 | return FALSE; | ||
1159 | 1652 | } | ||
1160 | 1653 | |||
1161 | 1654 | if (UNIV_LIKELY(i->bit_offset < MODIFIED_PAGE_BLOCK_BITMAP_LEN)) | ||
1162 | 1574 | { | 1655 | { |
1163 | 1575 | ++i->bit_offset; | 1656 | ++i->bit_offset; |
1164 | 1576 | i->changed = | 1657 | i->changed = |
1165 | @@ -1587,29 +1668,56 @@ | |||
1166 | 1587 | 1668 | ||
1167 | 1588 | /* Advance file */ | 1669 | /* Advance file */ |
1168 | 1589 | i->in_i++; | 1670 | i->in_i++; |
1179 | 1590 | os_file_close(i->in.file); | 1671 | success = os_file_close_no_error_handling(i->in.file); |
1180 | 1591 | log_online_diagnose_bitmap_eof(&i->in, | 1672 | i->in.file = os_file_invalid; |
1181 | 1592 | i->last_page_in_run); | 1673 | if (UNIV_UNLIKELY(!success)) { |
1182 | 1593 | if (i->in_i == i->in_files.count | 1674 | |
1183 | 1594 | || i->in_files.files[i->in_i].seq_num == 0) { | 1675 | os_file_get_last_error(TRUE); |
1184 | 1595 | 1676 | i->failed = TRUE; | |
1185 | 1596 | return FALSE; | 1677 | return FALSE; |
1186 | 1597 | } | 1678 | } |
1187 | 1598 | 1679 | ||
1188 | 1599 | if (!log_online_open_bitmap_file_read_only( | 1680 | success = log_online_diagnose_bitmap_eof( |
1189 | 1681 | &i->in, i->last_page_in_run); | ||
1190 | 1682 | if (UNIV_UNLIKELY(!success)) { | ||
1191 | 1683 | |||
1192 | 1684 | i->failed = TRUE; | ||
1193 | 1685 | return FALSE; | ||
1194 | 1686 | |||
1195 | 1687 | } | ||
1196 | 1688 | |||
1197 | 1689 | if (i->in_i == i->in_files.count) { | ||
1198 | 1690 | |||
1199 | 1691 | return FALSE; | ||
1200 | 1692 | } | ||
1201 | 1693 | |||
1202 | 1694 | if (UNIV_UNLIKELY(i->in_files.files[i->in_i].seq_num | ||
1203 | 1695 | == 0)) { | ||
1204 | 1696 | |||
1205 | 1697 | i->failed = TRUE; | ||
1206 | 1698 | return FALSE; | ||
1207 | 1699 | } | ||
1208 | 1700 | |||
1209 | 1701 | success = log_online_open_bitmap_file_read_only( | ||
1210 | 1600 | i->in_files.files[i->in_i].name, | 1702 | i->in_files.files[i->in_i].name, |
1212 | 1601 | &i->in)) { | 1703 | &i->in); |
1213 | 1704 | if (UNIV_UNLIKELY(!success)) { | ||
1214 | 1705 | |||
1215 | 1706 | i->failed = TRUE; | ||
1216 | 1602 | return FALSE; | 1707 | return FALSE; |
1217 | 1603 | } | 1708 | } |
1218 | 1604 | } | 1709 | } |
1219 | 1605 | 1710 | ||
1222 | 1606 | if (!log_online_read_bitmap_page(&i->in, i->page, | 1711 | success = log_online_read_bitmap_page(&i->in, i->page, |
1223 | 1607 | &checksum_ok)) { | 1712 | &checksum_ok); |
1224 | 1713 | if (UNIV_UNLIKELY(!success)) { | ||
1225 | 1714 | |||
1226 | 1608 | os_file_get_last_error(TRUE); | 1715 | os_file_get_last_error(TRUE); |
1227 | 1609 | fprintf(stderr, | 1716 | fprintf(stderr, |
1228 | 1610 | "InnoDB: Warning: failed reading " | 1717 | "InnoDB: Warning: failed reading " |
1229 | 1611 | "changed page bitmap file \'%s\'\n", | 1718 | "changed page bitmap file \'%s\'\n", |
1230 | 1612 | i->in_files.files[i->in_i].name); | 1719 | i->in_files.files[i->in_i].name); |
1231 | 1720 | i->failed = TRUE; | ||
1232 | 1613 | return FALSE; | 1721 | return FALSE; |
1233 | 1614 | } | 1722 | } |
1234 | 1615 | } | 1723 | } |
1235 | @@ -1666,7 +1774,7 @@ | |||
1236 | 1666 | /* If we have to delete the current output file, close it | 1774 | /* If we have to delete the current output file, close it |
1237 | 1667 | first. */ | 1775 | first. */ |
1238 | 1668 | os_file_close(log_bmp_sys->out.file); | 1776 | os_file_close(log_bmp_sys->out.file); |
1240 | 1669 | log_bmp_sys->out.file = -1; | 1777 | log_bmp_sys->out.file = os_file_invalid; |
1241 | 1670 | } | 1778 | } |
1242 | 1671 | 1779 | ||
1243 | 1672 | for (i = 0; i < bitmap_files.count; i++) { | 1780 | for (i = 0; i < bitmap_files.count; i++) { |
1244 | 1673 | 1781 | ||
1245 | === modified file 'Percona-Server/storage/innobase/log/log0recv.c' | |||
1246 | --- Percona-Server/storage/innobase/log/log0recv.c 2013-05-23 08:39:28 +0000 | |||
1247 | +++ Percona-Server/storage/innobase/log/log0recv.c 2013-05-29 15:11:30 +0000 | |||
1248 | @@ -546,7 +546,8 @@ | |||
1249 | 546 | } | 546 | } |
1250 | 547 | 547 | ||
1251 | 548 | log_group_read_log_seg(LOG_RECOVER, log_sys->buf, | 548 | log_group_read_log_seg(LOG_RECOVER, log_sys->buf, |
1253 | 549 | up_to_date_group, start_lsn, end_lsn); | 549 | up_to_date_group, start_lsn, end_lsn, |
1254 | 550 | FALSE); | ||
1255 | 550 | 551 | ||
1256 | 551 | len = (ulint) (end_lsn - start_lsn); | 552 | len = (ulint) (end_lsn - start_lsn); |
1257 | 552 | 553 | ||
1258 | @@ -590,7 +591,7 @@ | |||
1259 | 590 | ut_a(start_lsn != end_lsn); | 591 | ut_a(start_lsn != end_lsn); |
1260 | 591 | 592 | ||
1261 | 592 | log_group_read_log_seg(LOG_RECOVER, recv_sys->last_block, | 593 | log_group_read_log_seg(LOG_RECOVER, recv_sys->last_block, |
1263 | 593 | up_to_date_group, start_lsn, end_lsn); | 594 | up_to_date_group, start_lsn, end_lsn, FALSE); |
1264 | 594 | 595 | ||
1265 | 595 | group = UT_LIST_GET_FIRST(log_sys->log_groups); | 596 | group = UT_LIST_GET_FIRST(log_sys->log_groups); |
1266 | 596 | 597 | ||
1267 | @@ -2887,7 +2888,7 @@ | |||
1268 | 2887 | end_lsn = start_lsn + RECV_SCAN_SIZE; | 2888 | end_lsn = start_lsn + RECV_SCAN_SIZE; |
1269 | 2888 | 2889 | ||
1270 | 2889 | log_group_read_log_seg(LOG_RECOVER, log_sys->buf, | 2890 | log_group_read_log_seg(LOG_RECOVER, log_sys->buf, |
1272 | 2890 | group, start_lsn, end_lsn); | 2891 | group, start_lsn, end_lsn, FALSE); |
1273 | 2891 | 2892 | ||
1274 | 2892 | finished = recv_scan_log_recs( | 2893 | finished = recv_scan_log_recs( |
1275 | 2893 | (buf_pool_get_n_pages() | 2894 | (buf_pool_get_n_pages() |
1276 | 2894 | 2895 | ||
1277 | === modified file 'Percona-Server/storage/innobase/os/os0file.c' | |||
1278 | --- Percona-Server/storage/innobase/os/os0file.c 2013-05-23 08:39:28 +0000 | |||
1279 | +++ Percona-Server/storage/innobase/os/os0file.c 2013-05-29 15:11:30 +0000 | |||
1280 | @@ -1890,7 +1890,6 @@ | |||
1281 | 1890 | #endif | 1890 | #endif |
1282 | 1891 | } | 1891 | } |
1283 | 1892 | 1892 | ||
1284 | 1893 | #ifdef UNIV_HOTBACKUP | ||
1285 | 1894 | /***********************************************************************//** | 1893 | /***********************************************************************//** |
1286 | 1895 | Closes a file handle. | 1894 | Closes a file handle. |
1287 | 1896 | @return TRUE if success */ | 1895 | @return TRUE if success */ |
1288 | @@ -1925,7 +1924,6 @@ | |||
1289 | 1925 | return(TRUE); | 1924 | return(TRUE); |
1290 | 1926 | #endif | 1925 | #endif |
1291 | 1927 | } | 1926 | } |
1292 | 1928 | #endif /* UNIV_HOTBACKUP */ | ||
1293 | 1929 | 1927 | ||
1294 | 1930 | /***********************************************************************//** | 1928 | /***********************************************************************//** |
1295 | 1931 | Gets a file size. | 1929 | Gets a file size. |
1296 | 1932 | 1930 | ||
1297 | === modified file 'Percona-Server/storage/innobase/srv/srv0start.c' | |||
1298 | --- Percona-Server/storage/innobase/srv/srv0start.c 2013-02-04 11:28:50 +0000 | |||
1299 | +++ Percona-Server/storage/innobase/srv/srv0start.c 2013-05-29 15:11:30 +0000 | |||
1300 | @@ -496,12 +496,6 @@ | |||
1301 | 496 | } | 496 | } |
1302 | 497 | #endif /* !UNIV_HOTBACKUP */ | 497 | #endif /* !UNIV_HOTBACKUP */ |
1303 | 498 | 498 | ||
1304 | 499 | #ifdef __WIN__ | ||
1305 | 500 | #define SRV_PATH_SEPARATOR '\\' | ||
1306 | 501 | #else | ||
1307 | 502 | #define SRV_PATH_SEPARATOR '/' | ||
1308 | 503 | #endif | ||
1309 | 504 | |||
1310 | 505 | /*********************************************************************//** | 499 | /*********************************************************************//** |
1311 | 506 | Normalizes a directory path for Windows: converts slashes to backslashes. */ | 500 | Normalizes a directory path for Windows: converts slashes to backslashes. */ |
1312 | 507 | UNIV_INTERN | 501 | UNIV_INTERN |
The merge conflict is GCA vs trunk, does not hinder the review, and will be resolved at the trunk merge time.