Merge lp:~percona-dev/percona-xtrabackup/lp713799 into lp:percona-xtrabackup/2.0
- lp713799
- Merge into 2.0
Proposed by
Alexey Kopytov
Status: | Merged |
---|---|
Merged at revision: | 215 |
Proposed branch: | lp:~percona-dev/percona-xtrabackup/lp713799 |
Merge into: | lp:percona-xtrabackup/2.0 |
Diff against target: |
666 lines (+359/-40) 4 files modified
fix_innodb_for_backup55.patch (+114/-10) fix_innodb_for_backup_5.1_plugin.patch (+115/-10) fix_innodb_for_backup_percona-server.patch (+105/-10) xtrabackup.c (+25/-10) |
To merge this branch: | bzr merge lp:~percona-dev/percona-xtrabackup/lp713799 |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Yasufumi Kinoshita (community) | Approve | ||
Percona developers | Pending | ||
Review via email: mp+48729@code.launchpad.net |
Commit message
Description of the change
To post a comment you must log in.
Revision history for this message
Valentine Gostev (longbow) wrote : | # |
Revision history for this message
Alexey Kopytov (akopytov) wrote : | # |
Does the test case fail on trunk?
Revision history for this message
Alexey Kopytov (akopytov) wrote : | # |
<Valentine> on 1.5 I got Assertion failure described in bug report
Revision history for this message
Yasufumi Kinoshita (yasufumi-kinoshita) : | # |
review:
Approve
Preview Diff
[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1 | === modified file 'fix_innodb_for_backup55.patch' |
2 | --- fix_innodb_for_backup55.patch 2010-12-15 21:44:42 +0000 |
3 | +++ fix_innodb_for_backup55.patch 2011-02-06 13:37:00 +0000 |
4 | @@ -157,7 +157,41 @@ |
5 | |
6 | |
7 | /********************************************************************//** |
8 | -@@ -758,8 +760,8 @@ |
9 | +@@ -308,7 +310,7 @@ |
10 | + off the LRU list if it is in the LRU list. The caller must hold the fil_sys |
11 | + mutex. */ |
12 | + static |
13 | +-void |
14 | ++ulint |
15 | + fil_node_prepare_for_io( |
16 | + /*====================*/ |
17 | + fil_node_t* node, /*!< in: file node */ |
18 | +@@ -633,7 +635,7 @@ |
19 | + Opens a the file of a node of a tablespace. The caller must own the fil_system |
20 | + mutex. */ |
21 | + static |
22 | +-void |
23 | ++ulint |
24 | + fil_node_open_file( |
25 | + /*===============*/ |
26 | + fil_node_t* node, /*!< in: file node */ |
27 | +@@ -668,7 +670,14 @@ |
28 | + OS_FILE_READ_ONLY, &success); |
29 | + if (!success) { |
30 | + /* The following call prints an error message */ |
31 | +- os_file_get_last_error(TRUE); |
32 | ++ if (os_file_get_last_error(TRUE) == OS_FILE_NOT_FOUND) |
33 | ++ { |
34 | ++ ut_print_timestamp(stderr); |
35 | ++ fprintf(stderr, |
36 | ++ " InnoDB: Warning: cannot open %s\n", |
37 | ++ node->name); |
38 | ++ return(OS_FILE_NOT_FOUND); |
39 | ++ } |
40 | + |
41 | + ut_print_timestamp(stderr); |
42 | + |
43 | +@@ -758,8 +767,8 @@ |
44 | } |
45 | |
46 | if (size_bytes >= 1024 * 1024) { |
47 | @@ -168,7 +202,44 @@ |
48 | } |
49 | |
50 | if (!(flags & DICT_TF_ZSSIZE_MASK)) { |
51 | -@@ -2152,7 +2154,7 @@ |
52 | +@@ -810,6 +819,8 @@ |
53 | + /* Put the node to the LRU list */ |
54 | + UT_LIST_ADD_FIRST(LRU, system->LRU, node); |
55 | + } |
56 | ++ |
57 | ++ return(0); |
58 | + } |
59 | + |
60 | + /**********************************************************************//** |
61 | +@@ -1435,7 +1446,12 @@ |
62 | + the file yet; the following calls will open it and update the |
63 | + size fields */ |
64 | + |
65 | +- fil_node_prepare_for_io(node, fil_system, space); |
66 | ++ if (fil_node_prepare_for_io(node, fil_system, space)) |
67 | ++ { |
68 | ++ mutex_exit(&fil_system->mutex); |
69 | ++ |
70 | ++ return(0); |
71 | ++ } |
72 | + fil_node_complete_io(node, fil_system, OS_FILE_READ); |
73 | + } |
74 | + |
75 | +@@ -1487,7 +1503,12 @@ |
76 | + the file yet; the following calls will open it and update the |
77 | + size fields */ |
78 | + |
79 | +- fil_node_prepare_for_io(node, fil_system, space); |
80 | ++ if (fil_node_prepare_for_io(node, fil_system, space)) |
81 | ++ { |
82 | ++ mutex_exit(&fil_system->mutex); |
83 | ++ |
84 | ++ return(ULINT_UNDEFINED); |
85 | ++ } |
86 | + fil_node_complete_io(node, fil_system, OS_FILE_READ); |
87 | + } |
88 | + |
89 | +@@ -2152,7 +2173,7 @@ |
90 | if (fil_create_new_single_table_tablespace( |
91 | space_id, name, FALSE, flags, |
92 | FIL_IBD_FILE_INITIAL_SIZE) != DB_SUCCESS) { |
93 | @@ -177,7 +248,7 @@ |
94 | } |
95 | } |
96 | |
97 | -@@ -2315,7 +2317,7 @@ |
98 | +@@ -2315,7 +2336,7 @@ |
99 | } |
100 | |
101 | if (success) { |
102 | @@ -186,7 +257,7 @@ |
103 | /* Write a log record about the deletion of the .ibd |
104 | file, so that ibbackup can replay it in the |
105 | --apply-log phase. We use a dummy mtr and the familiar |
106 | -@@ -2616,7 +2618,7 @@ |
107 | +@@ -2616,7 +2637,7 @@ |
108 | |
109 | mutex_exit(&fil_system->mutex); |
110 | |
111 | @@ -195,7 +266,7 @@ |
112 | if (success) { |
113 | mtr_t mtr; |
114 | |
115 | -@@ -2807,7 +2809,7 @@ |
116 | +@@ -2807,7 +2828,7 @@ |
117 | |
118 | fil_node_create(path, size, space_id, FALSE); |
119 | |
120 | @@ -204,7 +275,7 @@ |
121 | { |
122 | mtr_t mtr; |
123 | |
124 | -@@ -3062,19 +3064,97 @@ |
125 | +@@ -3062,19 +3083,97 @@ |
126 | "InnoDB: open the tablespace file ", stderr); |
127 | ut_print_filename(stderr, filepath); |
128 | fputs("!\n" |
129 | @@ -312,7 +383,7 @@ |
130 | return(FALSE); |
131 | } |
132 | |
133 | -@@ -3306,7 +3386,7 @@ |
134 | +@@ -3306,7 +3405,7 @@ |
135 | cannot be ok. */ |
136 | |
137 | size = (((ib_int64_t)size_high) << 32) + (ib_int64_t)size_low; |
138 | @@ -321,7 +392,7 @@ |
139 | if (size < FIL_IBD_FILE_INITIAL_SIZE * UNIV_PAGE_SIZE) { |
140 | fprintf(stderr, |
141 | "InnoDB: Error: the size of single-table tablespace" |
142 | -@@ -3447,7 +3527,7 @@ |
143 | +@@ -3447,7 +3546,7 @@ |
144 | idea is to read as much good data as we can and jump over bad data. |
145 | @return 0 if ok, -1 if error even after the retries, 1 if at the end |
146 | of the directory */ |
147 | @@ -330,7 +401,7 @@ |
148 | int |
149 | fil_file_readdir_next_file( |
150 | /*=======================*/ |
151 | -@@ -3746,15 +3826,97 @@ |
152 | +@@ -3746,15 +3845,97 @@ |
153 | "InnoDB: in InnoDB data dictionary" |
154 | " has tablespace id %lu,\n" |
155 | "InnoDB: but tablespace with that id" |
156 | @@ -436,7 +507,40 @@ |
157 | } else { |
158 | ut_print_timestamp(stderr); |
159 | fputs(" InnoDB: Error: table ", stderr); |
160 | -@@ -4363,6 +4525,16 @@ |
161 | +@@ -4143,7 +4324,7 @@ |
162 | + off the LRU list if it is in the LRU list. The caller must hold the fil_sys |
163 | + mutex. */ |
164 | + static |
165 | +-void |
166 | ++ulint |
167 | + fil_node_prepare_for_io( |
168 | + /*====================*/ |
169 | + fil_node_t* node, /*!< in: file node */ |
170 | +@@ -4163,10 +4344,13 @@ |
171 | + } |
172 | + |
173 | + if (node->open == FALSE) { |
174 | ++ ulint err; |
175 | + /* File is closed: open it */ |
176 | + ut_a(node->n_pending == 0); |
177 | + |
178 | +- fil_node_open_file(node, system, space); |
179 | ++ err = fil_node_open_file(node, system, space); |
180 | ++ if (err) |
181 | ++ return(err); |
182 | + } |
183 | + |
184 | + if (node->n_pending == 0 && space->purpose == FIL_TABLESPACE |
185 | +@@ -4179,6 +4363,8 @@ |
186 | + } |
187 | + |
188 | + node->n_pending++; |
189 | ++ |
190 | ++ return(0); |
191 | + } |
192 | + |
193 | + /********************************************************************//** |
194 | +@@ -4363,6 +4549,16 @@ |
195 | |
196 | ut_ad((mode != OS_AIO_IBUF) || (space->purpose == FIL_TABLESPACE)); |
197 | |
198 | |
199 | === modified file 'fix_innodb_for_backup_5.1_plugin.patch' |
200 | --- fix_innodb_for_backup_5.1_plugin.patch 2010-12-15 21:44:42 +0000 |
201 | +++ fix_innodb_for_backup_5.1_plugin.patch 2011-02-06 13:37:00 +0000 |
202 | @@ -156,7 +156,41 @@ |
203 | |
204 | |
205 | /********************************************************************//** |
206 | -@@ -746,8 +747,8 @@ |
207 | +@@ -298,7 +299,7 @@ |
208 | + off the LRU list if it is in the LRU list. The caller must hold the fil_sys |
209 | + mutex. */ |
210 | + static |
211 | +-void |
212 | ++ulint |
213 | + fil_node_prepare_for_io( |
214 | + /*====================*/ |
215 | + fil_node_t* node, /*!< in: file node */ |
216 | +@@ -622,7 +623,7 @@ |
217 | + Opens a the file of a node of a tablespace. The caller must own the fil_system |
218 | + mutex. */ |
219 | + static |
220 | +-void |
221 | ++ulint |
222 | + fil_node_open_file( |
223 | + /*===============*/ |
224 | + fil_node_t* node, /*!< in: file node */ |
225 | +@@ -656,7 +657,14 @@ |
226 | + node->name, OS_FILE_OPEN, OS_FILE_READ_ONLY, &success); |
227 | + if (!success) { |
228 | + /* The following call prints an error message */ |
229 | +- os_file_get_last_error(TRUE); |
230 | ++ if (os_file_get_last_error(TRUE) == OS_FILE_NOT_FOUND) |
231 | ++ { |
232 | ++ ut_print_timestamp(stderr); |
233 | ++ fprintf(stderr, |
234 | ++ " InnoDB: Warning: cannot open %s\n", |
235 | ++ node->name); |
236 | ++ return(OS_FILE_NOT_FOUND); |
237 | ++ } |
238 | + |
239 | + ut_print_timestamp(stderr); |
240 | + |
241 | +@@ -746,8 +754,8 @@ |
242 | } |
243 | |
244 | if (size_bytes >= 1024 * 1024) { |
245 | @@ -167,7 +201,45 @@ |
246 | } |
247 | |
248 | if (!(flags & DICT_TF_ZSSIZE_MASK)) { |
249 | -@@ -2132,7 +2133,7 @@ |
250 | +@@ -792,6 +800,8 @@ |
251 | + /* Put the node to the LRU list */ |
252 | + UT_LIST_ADD_FIRST(LRU, system->LRU, node); |
253 | + } |
254 | ++ |
255 | ++ return(0); |
256 | + } |
257 | + |
258 | + /**********************************************************************//** |
259 | +@@ -1418,7 +1428,13 @@ |
260 | + the file yet; the following calls will open it and update the |
261 | + size fields */ |
262 | + |
263 | +- fil_node_prepare_for_io(node, fil_system, space); |
264 | ++ if (fil_node_prepare_for_io(node, fil_system, space)) |
265 | ++ { |
266 | ++ mutex_exit(&fil_system->mutex); |
267 | ++ |
268 | ++ return(0); |
269 | ++ |
270 | ++ } |
271 | + fil_node_complete_io(node, fil_system, OS_FILE_READ); |
272 | + } |
273 | + |
274 | +@@ -1470,7 +1486,12 @@ |
275 | + the file yet; the following calls will open it and update the |
276 | + size fields */ |
277 | + |
278 | +- fil_node_prepare_for_io(node, fil_system, space); |
279 | ++ if (fil_node_prepare_for_io(node, fil_system, space)) |
280 | ++ { |
281 | ++ mutex_exit(&fil_system->mutex); |
282 | ++ |
283 | ++ return(ULINT_UNDEFINED); |
284 | ++ } |
285 | + fil_node_complete_io(node, fil_system, OS_FILE_READ); |
286 | + } |
287 | + |
288 | +@@ -2132,7 +2153,7 @@ |
289 | if (fil_create_new_single_table_tablespace( |
290 | space_id, name, FALSE, flags, |
291 | FIL_IBD_FILE_INITIAL_SIZE) != DB_SUCCESS) { |
292 | @@ -176,7 +248,7 @@ |
293 | } |
294 | } |
295 | |
296 | -@@ -2276,7 +2277,7 @@ |
297 | +@@ -2276,7 +2297,7 @@ |
298 | } |
299 | |
300 | if (success) { |
301 | @@ -185,7 +257,7 @@ |
302 | /* Write a log record about the deletion of the .ibd |
303 | file, so that ibbackup can replay it in the |
304 | --apply-log phase. We use a dummy mtr and the familiar |
305 | -@@ -2552,7 +2553,7 @@ |
306 | +@@ -2552,7 +2573,7 @@ |
307 | |
308 | mutex_exit(&fil_system->mutex); |
309 | |
310 | @@ -194,7 +266,7 @@ |
311 | if (success) { |
312 | mtr_t mtr; |
313 | |
314 | -@@ -2742,7 +2743,7 @@ |
315 | +@@ -2742,7 +2763,7 @@ |
316 | |
317 | fil_node_create(path, size, space_id, FALSE); |
318 | |
319 | @@ -203,7 +275,7 @@ |
320 | { |
321 | mtr_t mtr; |
322 | |
323 | -@@ -2995,19 +2996,97 @@ |
324 | +@@ -2995,19 +3016,97 @@ |
325 | "InnoDB: open the tablespace file ", stderr); |
326 | ut_print_filename(stderr, filepath); |
327 | fputs("!\n" |
328 | @@ -311,7 +383,7 @@ |
329 | return(FALSE); |
330 | } |
331 | |
332 | -@@ -3238,7 +3317,7 @@ |
333 | +@@ -3238,7 +3337,7 @@ |
334 | cannot be ok. */ |
335 | |
336 | size = (((ib_int64_t)size_high) << 32) + (ib_int64_t)size_low; |
337 | @@ -320,7 +392,7 @@ |
338 | if (size < FIL_IBD_FILE_INITIAL_SIZE * UNIV_PAGE_SIZE) { |
339 | fprintf(stderr, |
340 | "InnoDB: Error: the size of single-table tablespace" |
341 | -@@ -3379,7 +3458,7 @@ |
342 | +@@ -3379,7 +3478,7 @@ |
343 | idea is to read as much good data as we can and jump over bad data. |
344 | @return 0 if ok, -1 if error even after the retries, 1 if at the end |
345 | of the directory */ |
346 | @@ -329,7 +401,7 @@ |
347 | int |
348 | fil_file_readdir_next_file( |
349 | /*=======================*/ |
350 | -@@ -3678,15 +3757,97 @@ |
351 | +@@ -3678,15 +3777,97 @@ |
352 | "InnoDB: in InnoDB data dictionary" |
353 | " has tablespace id %lu,\n" |
354 | "InnoDB: but tablespace with that id" |
355 | @@ -435,7 +507,40 @@ |
356 | } else { |
357 | ut_print_timestamp(stderr); |
358 | fputs(" InnoDB: Error: table ", stderr); |
359 | -@@ -4295,6 +4456,16 @@ |
360 | +@@ -4075,7 +4256,7 @@ |
361 | + off the LRU list if it is in the LRU list. The caller must hold the fil_sys |
362 | + mutex. */ |
363 | + static |
364 | +-void |
365 | ++ulint |
366 | + fil_node_prepare_for_io( |
367 | + /*====================*/ |
368 | + fil_node_t* node, /*!< in: file node */ |
369 | +@@ -4095,10 +4276,13 @@ |
370 | + } |
371 | + |
372 | + if (node->open == FALSE) { |
373 | ++ ulint err; |
374 | + /* File is closed: open it */ |
375 | + ut_a(node->n_pending == 0); |
376 | + |
377 | +- fil_node_open_file(node, system, space); |
378 | ++ err = fil_node_open_file(node, system, space); |
379 | ++ if (err) |
380 | ++ return(err); |
381 | + } |
382 | + |
383 | + if (node->n_pending == 0 && space->purpose == FIL_TABLESPACE |
384 | +@@ -4111,6 +4295,8 @@ |
385 | + } |
386 | + |
387 | + node->n_pending++; |
388 | ++ |
389 | ++ return(0); |
390 | + } |
391 | + |
392 | + /********************************************************************//** |
393 | +@@ -4295,6 +4481,16 @@ |
394 | |
395 | ut_ad((mode != OS_AIO_IBUF) || (space->purpose == FIL_TABLESPACE)); |
396 | |
397 | |
398 | === modified file 'fix_innodb_for_backup_percona-server.patch' |
399 | --- fix_innodb_for_backup_percona-server.patch 2010-12-01 22:03:06 +0000 |
400 | +++ fix_innodb_for_backup_percona-server.patch 2011-02-06 13:37:00 +0000 |
401 | @@ -49,7 +49,41 @@ |
402 | |
403 | |
404 | /********************************************************************//** |
405 | -@@ -753,8 +753,8 @@ |
406 | +@@ -305,7 +305,7 @@ |
407 | + off the LRU list if it is in the LRU list. The caller must hold the fil_sys |
408 | + mutex. */ |
409 | + static |
410 | +-void |
411 | ++ulint |
412 | + fil_node_prepare_for_io( |
413 | + /*====================*/ |
414 | + fil_node_t* node, /*!< in: file node */ |
415 | +@@ -629,7 +629,7 @@ |
416 | + Opens a the file of a node of a tablespace. The caller must own the fil_system |
417 | + mutex. */ |
418 | + static |
419 | +-void |
420 | ++ulint |
421 | + fil_node_open_file( |
422 | + /*===============*/ |
423 | + fil_node_t* node, /*!< in: file node */ |
424 | +@@ -663,7 +663,14 @@ |
425 | + node->name, OS_FILE_OPEN, OS_FILE_READ_ONLY, &success); |
426 | + if (!success) { |
427 | + /* The following call prints an error message */ |
428 | +- os_file_get_last_error(TRUE); |
429 | ++ if (os_file_get_last_error(TRUE) == OS_FILE_NOT_FOUND) |
430 | ++ { |
431 | ++ ut_print_timestamp(stderr); |
432 | ++ fprintf(stderr, |
433 | ++ " InnoDB: Warning: cannot open %s\n", |
434 | ++ node->name); |
435 | ++ return(OS_FILE_NOT_FOUND); |
436 | ++ } |
437 | + |
438 | + ut_print_timestamp(stderr); |
439 | + |
440 | +@@ -753,8 +760,8 @@ |
441 | } |
442 | |
443 | if (size_bytes >= 1024 * 1024) { |
444 | @@ -60,7 +94,44 @@ |
445 | } |
446 | |
447 | if (!(flags & DICT_TF_ZSSIZE_MASK)) { |
448 | -@@ -2143,7 +2143,7 @@ |
449 | +@@ -799,6 +806,8 @@ |
450 | + /* Put the node to the LRU list */ |
451 | + UT_LIST_ADD_FIRST(LRU, system->LRU, node); |
452 | + } |
453 | ++ |
454 | ++ return(0); |
455 | + } |
456 | + |
457 | + /**********************************************************************//** |
458 | +@@ -1428,7 +1437,12 @@ |
459 | + the file yet; the following calls will open it and update the |
460 | + size fields */ |
461 | + |
462 | +- fil_node_prepare_for_io(node, fil_system, space); |
463 | ++ if (fil_node_prepare_for_io(node, fil_system, space)) |
464 | ++ { |
465 | ++ mutex_exit(&fil_system->mutex); |
466 | ++ |
467 | ++ return(0); |
468 | ++ } |
469 | + fil_node_complete_io(node, fil_system, OS_FILE_READ); |
470 | + } |
471 | + |
472 | +@@ -1480,7 +1494,12 @@ |
473 | + the file yet; the following calls will open it and update the |
474 | + size fields */ |
475 | + |
476 | +- fil_node_prepare_for_io(node, fil_system, space); |
477 | ++ if (fil_node_prepare_for_io(node, fil_system, space)) |
478 | ++ { |
479 | ++ mutex_exit(&fil_system->mutex); |
480 | ++ |
481 | ++ return(ULINT_UNDEFINED); |
482 | ++ } |
483 | + fil_node_complete_io(node, fil_system, OS_FILE_READ); |
484 | + } |
485 | + |
486 | +@@ -2151,7 +2170,7 @@ |
487 | if (fil_create_new_single_table_tablespace( |
488 | space_id, name, FALSE, flags, |
489 | FIL_IBD_FILE_INITIAL_SIZE) != DB_SUCCESS) { |
490 | @@ -69,7 +140,7 @@ |
491 | } |
492 | } |
493 | |
494 | -@@ -2287,7 +2287,7 @@ |
495 | +@@ -2295,7 +2314,7 @@ |
496 | } |
497 | |
498 | if (success) { |
499 | @@ -78,7 +149,7 @@ |
500 | /* Write a log record about the deletion of the .ibd |
501 | file, so that ibbackup can replay it in the |
502 | --apply-log phase. We use a dummy mtr and the familiar |
503 | -@@ -2563,7 +2563,7 @@ |
504 | +@@ -2571,7 +2590,7 @@ |
505 | |
506 | mutex_exit(&fil_system->mutex); |
507 | |
508 | @@ -87,7 +158,7 @@ |
509 | if (success) { |
510 | mtr_t mtr; |
511 | |
512 | -@@ -2753,7 +2753,7 @@ |
513 | +@@ -2761,7 +2780,7 @@ |
514 | |
515 | fil_node_create(path, size, space_id, FALSE); |
516 | |
517 | @@ -96,7 +167,7 @@ |
518 | { |
519 | mtr_t mtr; |
520 | |
521 | -@@ -3006,19 +3006,97 @@ |
522 | +@@ -3014,19 +3033,97 @@ |
523 | "InnoDB: open the tablespace file ", stderr); |
524 | ut_print_filename(stderr, filepath); |
525 | fputs("!\n" |
526 | @@ -204,7 +275,7 @@ |
527 | return(FALSE); |
528 | } |
529 | |
530 | -@@ -3723,7 +3801,7 @@ |
531 | +@@ -3731,7 +3828,7 @@ |
532 | cannot be ok. */ |
533 | |
534 | size = (((ib_int64_t)size_high) << 32) + (ib_int64_t)size_low; |
535 | @@ -213,7 +284,7 @@ |
536 | if (size < FIL_IBD_FILE_INITIAL_SIZE * UNIV_PAGE_SIZE) { |
537 | fprintf(stderr, |
538 | "InnoDB: Error: the size of single-table tablespace" |
539 | -@@ -3864,7 +3942,7 @@ |
540 | +@@ -3872,7 +3969,7 @@ |
541 | idea is to read as much good data as we can and jump over bad data. |
542 | @return 0 if ok, -1 if error even after the retries, 1 if at the end |
543 | of the directory */ |
544 | @@ -222,7 +293,7 @@ |
545 | int |
546 | fil_file_readdir_next_file( |
547 | /*=======================*/ |
548 | -@@ -4163,15 +4241,97 @@ |
549 | +@@ -4171,15 +4268,97 @@ |
550 | "InnoDB: in InnoDB data dictionary" |
551 | " has tablespace id %lu,\n" |
552 | "InnoDB: but tablespace with that id" |
553 | @@ -328,7 +399,31 @@ |
554 | } else { |
555 | ut_print_timestamp(stderr); |
556 | fputs(" InnoDB: Error: table ", stderr); |
557 | -@@ -4781,6 +4941,16 @@ |
558 | +@@ -4568,7 +4747,7 @@ |
559 | + off the LRU list if it is in the LRU list. The caller must hold the fil_sys |
560 | + mutex. */ |
561 | + static |
562 | +-void |
563 | ++ulint |
564 | + fil_node_prepare_for_io( |
565 | + /*====================*/ |
566 | + fil_node_t* node, /*!< in: file node */ |
567 | +@@ -4588,10 +4767,13 @@ |
568 | + } |
569 | + |
570 | + if (node->open == FALSE) { |
571 | ++ ulint err; |
572 | + /* File is closed: open it */ |
573 | + ut_a(node->n_pending == 0); |
574 | + |
575 | +- fil_node_open_file(node, system, space); |
576 | ++ err = fil_node_open_file(node, system, space); |
577 | ++ if (err) |
578 | ++ return(err); |
579 | + } |
580 | + |
581 | + if (node->n_pending == 0 && space->purpose == FIL_TABLESPACE |
582 | +@@ -4789,6 +4971,16 @@ |
583 | |
584 | ut_ad((mode != OS_AIO_IBUF) || (space->purpose == FIL_TABLESPACE)); |
585 | |
586 | |
587 | === modified file 'xtrabackup.c' |
588 | --- xtrabackup.c 2010-12-30 16:54:43 +0000 |
589 | +++ xtrabackup.c 2011-02-06 13:37:00 +0000 |
590 | @@ -2310,7 +2310,6 @@ |
591 | LSN64 flush_lsn; |
592 | IB_INT64 file_size; |
593 | IB_INT64 offset; |
594 | - ibool src_exist = TRUE; |
595 | ulint page_in_buffer; |
596 | ulint incremental_buffers = 0; |
597 | ulint page_size; |
598 | @@ -2423,14 +2422,21 @@ |
599 | page_size_shift = UNIV_PAGE_SIZE_SHIFT; |
600 | #else |
601 | zip_size = fil_space_get_zip_size(node->space->id); |
602 | - if (zip_size) { |
603 | + if (zip_size == ULINT_UNDEFINED) { |
604 | + fprintf(stderr, "[%02u] xtrabackup: Warning: " |
605 | + "Failed to determine page size for %s.\n" |
606 | + "[%02u] xtrabackup: Warning: We assume the table was " |
607 | + "dropped during xtrabackup execution and ignore the " |
608 | + "file.\n", thread_n, node->name, thread_n); |
609 | + goto skip; |
610 | + } else if (zip_size) { |
611 | page_size = zip_size; |
612 | page_size_shift = get_page_size_shift(page_size); |
613 | fprintf(stderr, "[%02u] %s is compressed with page size = " |
614 | "%lu bytes\n", thread_n, node->name, page_size); |
615 | if (page_size_shift < 10 || page_size_shift > 14) { |
616 | fprintf(stderr, "[%02u] xtrabackup: Error: Invalid " |
617 | - "page size.\n"); |
618 | + "page size.\n", thread_n); |
619 | ut_error; |
620 | } |
621 | } else { |
622 | @@ -2485,11 +2491,12 @@ |
623 | os_file_get_last_error(TRUE); |
624 | |
625 | fprintf(stderr, |
626 | - "[%02u] xtrabackup: error: cannot open %s\n" |
627 | - "[%02u] xtrabackup: Have you deleted .ibd" |
628 | - "files under a running mysqld server?\n", |
629 | + "[%02u] xtrabackup: Warning: cannot open %s\n" |
630 | + "[%02u] xtrabackup: Warning: We assume the " |
631 | + "table was dropped during xtrabackup execution " |
632 | + "and ignore the file.\n", |
633 | thread_n, node->name, thread_n); |
634 | - src_exist = FALSE; |
635 | + goto skip; |
636 | } |
637 | |
638 | if (srv_unix_file_flush_method == SRV_UNIX_O_DIRECT) { |
639 | @@ -2525,9 +2532,6 @@ |
640 | posix_fadvise(dst_file, 0, 0, POSIX_FADV_DONTNEED); |
641 | #endif |
642 | |
643 | - if(!src_exist) |
644 | - goto error; |
645 | - |
646 | /* copy : TODO: tune later */ |
647 | printf("[%02u] Copying %s \n to %s\n", thread_n, |
648 | node->name, dst_path); |
649 | @@ -2735,6 +2739,17 @@ |
650 | fprintf(stderr, "[%02u] xtrabackup: Error: " |
651 | "xtrabackup_copy_datafile() failed.\n", thread_n); |
652 | return(TRUE); /*ERROR*/ |
653 | + |
654 | +skip: |
655 | + if (src_file != -1 && !node->open) |
656 | + os_file_close(src_file); |
657 | + if (dst_file != -1) |
658 | + os_file_close(dst_file); |
659 | + if (buf2) |
660 | + ut_free(buf2); |
661 | + fprintf(stderr, "[%02u] xtrabackup: Warning: skipping file %s.\n", |
662 | + thread_n, node->name); |
663 | + return(FALSE); |
664 | } |
665 | |
666 | my_bool |
Passes test case. Current behavior - detetects dropped table and mentions it in the output.