Merge lp:~sergei.glushchenko/percona-xtrabackup/2.1-ST43302-xb-bug1340717 into lp:percona-xtrabackup/2.1

Proposed by Sergei Glushchenko
Status: Merged
Approved by: Alexey Kopytov
Approved revision: no longer in the source branch.
Merged at revision: 760
Proposed branch: lp:~sergei.glushchenko/percona-xtrabackup/2.1-ST43302-xb-bug1340717
Merge into: lp:percona-xtrabackup/2.1
Diff against target: 425 lines (+81/-43)
2 files modified
patches/innodb56.patch (+46/-43)
test/t/bug1340717.sh (+35/-0)
To merge this branch: bzr merge lp:~sergei.glushchenko/percona-xtrabackup/2.1-ST43302-xb-bug1340717
Reviewer Review Type Date Requested Status
Alexey Kopytov (community) Approve
Review via email: mp+227022@code.launchpad.net

Description of the change

    Bug 1340717: Crash on prepare partial backup with 5.6-based
    xtrabackup

    The root cause of the crash is that purge_sys is not initialized
    at the moment when xtrabackup trying to delete missing tablespace.

    Fix for upstream Bug#16593427 "ROLLBACK OF RECOVERED TRANSACTION
    CORRUPTS NON-ONLINE ADD INDEX" introduced function
    trx_resurrect_table_locks which being executed before purge_sys
    initialized. It loads some tablepsaces in data dictionary. Crash
    happens when tablespace is missing from partial backup.

    Fix is not to remove missing tablespaces from data dictionary
    until purge_sys is initialized. They will be eventually removed
    during subsequent operation.

To post a comment you must log in.
Revision history for this message
Sergei Glushchenko (sergei.glushchenko) wrote :

http://jenkins.percona.com/view/PXB%202.1/job/percona-xtrabackup-2.1-param/584/

lots of Jenkins failures are due to migration. hopefully Alexey will fix it and I re-run it.

Revision history for this message
Alexey Kopytov (akopytov) wrote :

Sergei,

Some questions:

1. " Fix is not to remove missing tablespaces from data dictionary
    until purge_sys is initialized. They will be eventually removed
    during subsequent operation."

What are those "subsequent operations"? If it is supposed to be removed when a redo log record is applied, what happens when there are no corresponding redo log records to replay?

2. What about a test case? Why isn't this case covered by current tests? I thought we have some partial prepared cases in the suite.

review: Needs Information
Revision history for this message
Sergei Glushchenko (sergei.glushchenko) wrote :

Hello Alexey,

Let me explain the bug more verbosely. New code has been added to
MySQL 5.6 to resurrect table locks. This code opens some tables. It
being done before purge_sys initialized and here is where the problem
is.

trx_resurrect_table_locks parses undo log and resurrects locks for
tables in it. It is done while purge_sys is still down. In order to
catch this crash we need to take a backup at the moment when there are
active transactions. Since our test suite communicate with MySQL via
mysql cli tool we cannot produce uncommitted transactions. Only option
for us is to run mysql in parallel and implement some hacks for
synchronization.

Subsequent operations are dict_check_tablespaces_and_store_max_id
invoked from innobase_start_or_create_for_mysql.

Hope this makes more sense.

Revision history for this message
Alexey Kopytov (akopytov) wrote :

It does make sense, thanks.

I still think a test case is possible. Have a look at start_uncommitted_transaction() in undo_tablespaces.sh. Which again makes me wonder why that specific test case passes. Any ideas?

review: Needs Information
Revision history for this message
Alexey Kopytov (akopytov) wrote :

ping?

Revision history for this message
Sergei Glushchenko (sergei.glushchenko) wrote :

I'll try to reproduce this crash. Will likely have results by Monday.

Revision history for this message
Sergei Glushchenko (sergei.glushchenko) wrote :

I constructed the test case based on start_uncommitted_transactio(), but I added additional sleep to make sure that transaction really started. It crashes the xtrabackup on prepare as expected. Patch fixes the crash. Will post link to Jenkins run once JEN-248 is fixed.

Revision history for this message
Alexey Kopytov (akopytov) wrote :

Are you saying that undo_tablespaces.sh is broken because it doesn't wait for the transaction to start, and that's why the test suite didn't trigger this bug before? If so, can you also fix the broken test?

Revision history for this message
Sergei Glushchenko (sergei.glushchenko) wrote :

This bug needs partial backup to crash. Recovery crashes when tablespace is not found and there is uncommitted transaction for this tablespace. Both conditions are essential. undo_tablespaces.sh does not do partial backup. Maybe it also doesn't wait for server to write something into undo tablespace. It takes backup immediately in parallel with delete statement. It is possible that delete work some time using only redo log and without flushing, thus not writing to undo tablespace.

Revision history for this message
Alexey Kopytov (akopytov) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'patches/innodb56.patch'
--- patches/innodb56.patch 2014-05-01 06:29:32 +0000
+++ patches/innodb56.patch 2014-08-17 09:44:59 +0000
@@ -112,16 +112,17 @@
112 bpage->offset, buf_page_get_zip_size(bpage),112 bpage->offset, buf_page_get_zip_size(bpage),
113--- a/storage/innobase/fil/fil0fil.cc113--- a/storage/innobase/fil/fil0fil.cc
114+++ b/storage/innobase/fil/fil0fil.cc114+++ b/storage/innobase/fil/fil0fil.cc
115@@ -43,6 +43,8 @@115@@ -43,6 +43,9 @@
116 #include "dict0dict.h"116 #include "dict0dict.h"
117 #include "page0page.h"117 #include "page0page.h"
118 #include "page0zip.h"118 #include "page0zip.h"
119+#include "pars0pars.h"119+#include "pars0pars.h"
120+#include "que0que.h"120+#include "que0que.h"
121+#include "trx0purge.h"
121 #include "trx0sys.h"122 #include "trx0sys.h"
122 #include "row0mysql.h"123 #include "row0mysql.h"
123 #ifndef UNIV_HOTBACKUP124 #ifndef UNIV_HOTBACKUP
124@@ -313,17 +315,15 @@125@@ -313,17 +316,15 @@
125 126
126 /** The tablespace memory cache. This variable is NULL before the module is127 /** The tablespace memory cache. This variable is NULL before the module is
127 initialized. */128 initialized. */
@@ -145,7 +146,7 @@
145 #else /* __WIN__ */146 #else /* __WIN__ */
146 # define fil_buffering_disabled(s) (0)147 # define fil_buffering_disabled(s) (0)
147 #endif /* __WIN__ */148 #endif /* __WIN__ */
148@@ -791,6 +791,7 @@149@@ -791,6 +792,7 @@
149 "InnoDB: Error: tablespace id is %lu"150 "InnoDB: Error: tablespace id is %lu"
150 " in the data dictionary\n"151 " in the data dictionary\n"
151 "InnoDB: but in file %s it is %lu!\n",152 "InnoDB: but in file %s it is %lu!\n",
@@ -153,7 +154,7 @@
153 space->id, node->name, space_id);154 space->id, node->name, space_id);
154 155
155 ut_error;156 ut_error;
156@@ -830,8 +831,9 @@157@@ -830,8 +832,9 @@
157 }158 }
158 159
159 if (size_bytes >= 1024 * 1024) {160 if (size_bytes >= 1024 * 1024) {
@@ -165,7 +166,7 @@
165 }166 }
166 167
167 if (!fsp_flags_is_compressed(flags)) {168 if (!fsp_flags_is_compressed(flags)) {
168@@ -1302,12 +1304,6 @@169@@ -1302,12 +1305,6 @@
169 170
170 if (!fil_system->space_id_reuse_warned) {171 if (!fil_system->space_id_reuse_warned) {
171 fil_system->space_id_reuse_warned = TRUE;172 fil_system->space_id_reuse_warned = TRUE;
@@ -178,7 +179,7 @@
178 }179 }
179 180
180 fil_system->max_assigned_id = id;181 fil_system->max_assigned_id = id;
181@@ -2031,12 +2027,6 @@182@@ -2031,12 +2028,6 @@
182 contain sensible data */183 contain sensible data */
183 ulint* flags, /*!< out: tablespace flags */184 ulint* flags, /*!< out: tablespace flags */
184 ulint* space_id, /*!< out: tablespace ID */185 ulint* space_id, /*!< out: tablespace ID */
@@ -191,7 +192,7 @@
191 lsn_t* min_flushed_lsn, /*!< out: min of flushed192 lsn_t* min_flushed_lsn, /*!< out: min of flushed
192 lsn values in data files */193 lsn values in data files */
193 lsn_t* max_flushed_lsn) /*!< out: max of flushed194 lsn_t* max_flushed_lsn) /*!< out: max of flushed
194@@ -2061,7 +2051,7 @@195@@ -2061,7 +2052,7 @@
195 196
196 flushed_lsn = mach_read_from_8(page + FIL_PAGE_FILE_FLUSH_LSN);197 flushed_lsn = mach_read_from_8(page + FIL_PAGE_FILE_FLUSH_LSN);
197 198
@@ -200,7 +201,7 @@
200 check_msg = fil_check_first_page(page);201 check_msg = fil_check_first_page(page);
201 }202 }
202 203
203@@ -2074,10 +2064,6 @@204@@ -2074,10 +2065,6 @@
204 if (!one_read_already) {205 if (!one_read_already) {
205 *min_flushed_lsn = flushed_lsn;206 *min_flushed_lsn = flushed_lsn;
206 *max_flushed_lsn = flushed_lsn;207 *max_flushed_lsn = flushed_lsn;
@@ -211,7 +212,7 @@
211 return(NULL);212 return(NULL);
212 }213 }
213 214
214@@ -2087,14 +2073,6 @@215@@ -2087,14 +2074,6 @@
215 if (*max_flushed_lsn < flushed_lsn) {216 if (*max_flushed_lsn < flushed_lsn) {
216 *max_flushed_lsn = flushed_lsn;217 *max_flushed_lsn = flushed_lsn;
217 }218 }
@@ -226,7 +227,7 @@
226 227
227 return(NULL);228 return(NULL);
228 }229 }
229@@ -2195,7 +2173,7 @@230@@ -2195,7 +2174,7 @@
230 mem_free(path);231 mem_free(path);
231 }232 }
232 233
@@ -235,7 +236,7 @@
235 /********************************************************//**236 /********************************************************//**
236 Writes a log record about an .ibd file create/rename/delete. */237 Writes a log record about an .ibd file create/rename/delete. */
237 static238 static
238@@ -2423,7 +2401,7 @@239@@ -2423,7 +2402,7 @@
239 space_id, name, path, flags,240 space_id, name, path, flags,
240 DICT_TF2_USE_TABLESPACE,241 DICT_TF2_USE_TABLESPACE,
241 FIL_IBD_FILE_INITIAL_SIZE) != DB_SUCCESS) {242 FIL_IBD_FILE_INITIAL_SIZE) != DB_SUCCESS) {
@@ -244,7 +245,7 @@
244 }245 }
245 }246 }
246 247
247@@ -2782,7 +2760,7 @@248@@ -2782,7 +2761,7 @@
248 }249 }
249 250
250 if (err == DB_SUCCESS) {251 if (err == DB_SUCCESS) {
@@ -253,7 +254,7 @@
253 /* Write a log record about the deletion of the .ibd254 /* Write a log record about the deletion of the .ibd
254 file, so that ibbackup can replay it in the255 file, so that ibbackup can replay it in the
255 --apply-log phase. We use a dummy mtr and the familiar256 --apply-log phase. We use a dummy mtr and the familiar
256@@ -3137,7 +3115,7 @@257@@ -3137,7 +3116,7 @@
257 258
258 mutex_exit(&fil_system->mutex);259 mutex_exit(&fil_system->mutex);
259 260
@@ -262,7 +263,7 @@
262 if (success && !recv_recovery_on) {263 if (success && !recv_recovery_on) {
263 mtr_t mtr;264 mtr_t mtr;
264 265
265@@ -3368,7 +3346,21 @@266@@ -3368,7 +3347,21 @@
266 ibool success;267 ibool success;
267 /* TRUE if a table is created with CREATE TEMPORARY TABLE */268 /* TRUE if a table is created with CREATE TEMPORARY TABLE */
268 bool is_temp = !!(flags2 & DICT_TF2_TEMPORARY);269 bool is_temp = !!(flags2 & DICT_TF2_TEMPORARY);
@@ -284,7 +285,7 @@
284 285
285 ut_a(space_id > 0);286 ut_a(space_id > 0);
286 ut_ad(!srv_read_only_mode);287 ut_ad(!srv_read_only_mode);
287@@ -3521,7 +3513,7 @@288@@ -3521,7 +3514,7 @@
288 goto error_exit_1;289 goto error_exit_1;
289 }290 }
290 291
@@ -293,7 +294,7 @@
293 {294 {
294 mtr_t mtr;295 mtr_t mtr;
295 ulint mlog_file_flag = 0;296 ulint mlog_file_flag = 0;
296@@ -3599,6 +3591,97 @@297@@ -3599,6 +3592,97 @@
297 (ulong) expected_id, (ulong) expected_flags);298 (ulong) expected_id, (ulong) expected_flags);
298 }299 }
299 300
@@ -391,7 +392,7 @@
391 /********************************************************************//**392 /********************************************************************//**
392 Tries to open a single-table tablespace and optionally checks that the393 Tries to open a single-table tablespace and optionally checks that the
393 space id in it is correct. If this does not succeed, print an error message394 space id in it is correct. If this does not succeed, print an error message
394@@ -3664,6 +3747,9 @@395@@ -3664,6 +3748,9 @@
395 in the default location. If it is remote, it should not be here. */396 in the default location. If it is remote, it should not be here. */
396 def.filepath = fil_make_ibd_name(tablename, false);397 def.filepath = fil_make_ibd_name(tablename, false);
397 398
@@ -401,7 +402,7 @@
401 /* The path_in was read from SYS_DATAFILES. */402 /* The path_in was read from SYS_DATAFILES. */
402 if (path_in) {403 if (path_in) {
403 if (strcmp(def.filepath, path_in)) {404 if (strcmp(def.filepath, path_in)) {
404@@ -3711,6 +3797,7 @@405@@ -3711,6 +3798,7 @@
405 tablespaces_found++;406 tablespaces_found++;
406 }407 }
407 }408 }
@@ -409,7 +410,7 @@
409 410
410 /* Always look for a file at the default location. */411 /* Always look for a file at the default location. */
411 ut_a(def.filepath);412 ut_a(def.filepath);
412@@ -3732,9 +3819,6 @@413@@ -3732,9 +3820,6 @@
413 if (def.success) {414 if (def.success) {
414 def.check_msg = fil_read_first_page(415 def.check_msg = fil_read_first_page(
415 def.file, FALSE, &def.flags, &def.id,416 def.file, FALSE, &def.flags, &def.id,
@@ -419,7 +420,7 @@
419 &def.lsn, &def.lsn);420 &def.lsn, &def.lsn);
420 def.valid = !def.check_msg;421 def.valid = !def.check_msg;
421 422
422@@ -3757,9 +3841,6 @@423@@ -3757,9 +3842,6 @@
423 if (remote.success) {424 if (remote.success) {
424 remote.check_msg = fil_read_first_page(425 remote.check_msg = fil_read_first_page(
425 remote.file, FALSE, &remote.flags, &remote.id,426 remote.file, FALSE, &remote.flags, &remote.id,
@@ -429,7 +430,7 @@
429 &remote.lsn, &remote.lsn);430 &remote.lsn, &remote.lsn);
430 remote.valid = !remote.check_msg;431 remote.valid = !remote.check_msg;
431 432
432@@ -3783,9 +3864,6 @@433@@ -3783,9 +3865,6 @@
433 if (dict.success) {434 if (dict.success) {
434 dict.check_msg = fil_read_first_page(435 dict.check_msg = fil_read_first_page(
435 dict.file, FALSE, &dict.flags, &dict.id,436 dict.file, FALSE, &dict.flags, &dict.id,
@@ -439,7 +440,7 @@
439 &dict.lsn, &dict.lsn);440 &dict.lsn, &dict.lsn);
440 dict.valid = !dict.check_msg;441 dict.valid = !dict.check_msg;
441 442
442@@ -3810,11 +3888,15 @@443@@ -3810,11 +3889,17 @@
443 /* The following call prints an error message */444 /* The following call prints an error message */
444 os_file_get_last_error(true);445 os_file_get_last_error(true);
445 446
@@ -452,11 +453,13 @@
452+ ib_logf(IB_LOG_LEVEL_WARN,453+ ib_logf(IB_LOG_LEVEL_WARN,
453+ "It will be removed from the data dictionary.");454+ "It will be removed from the data dictionary.");
454+455+
455+ fil_remove_invalid_table_from_data_dict(tablename);456+ if (purge_sys) {
457+ fil_remove_invalid_table_from_data_dict(tablename);
458+ }
456 459
457 err = DB_CORRUPTION;460 err = DB_CORRUPTION;
458 461
459@@ -4187,9 +4269,6 @@462@@ -4187,9 +4272,6 @@
460 fsp->success = TRUE;463 fsp->success = TRUE;
461 if (const char* check_msg = fil_read_first_page(464 if (const char* check_msg = fil_read_first_page(
462 fsp->file, FALSE, &fsp->flags, &fsp->id,465 fsp->file, FALSE, &fsp->flags, &fsp->id,
@@ -466,7 +469,7 @@
466 &fsp->lsn, &fsp->lsn)) {469 &fsp->lsn, &fsp->lsn)) {
467 ib_logf(IB_LOG_LEVEL_ERROR,470 ib_logf(IB_LOG_LEVEL_ERROR,
468 "%s in tablespace %s (table %s)",471 "%s in tablespace %s (table %s)",
469@@ -4266,6 +4345,9 @@472@@ -4266,6 +4348,9 @@
470 #ifdef UNIV_HOTBACKUP473 #ifdef UNIV_HOTBACKUP
471 fil_space_t* space;474 fil_space_t* space;
472 #endif475 #endif
@@ -476,7 +479,7 @@
476 479
477 memset(&def, 0, sizeof(def));480 memset(&def, 0, sizeof(def));
478 memset(&remote, 0, sizeof(remote));481 memset(&remote, 0, sizeof(remote));
479@@ -4310,6 +4392,9 @@482@@ -4310,6 +4395,9 @@
480 # endif /* !UNIV_HOTBACKUP */483 # endif /* !UNIV_HOTBACKUP */
481 #endif484 #endif
482 485
@@ -486,7 +489,7 @@
486 /* Check for a link file which locates a remote tablespace. */489 /* Check for a link file which locates a remote tablespace. */
487 remote.success = fil_open_linked_file(490 remote.success = fil_open_linked_file(
488 tablename, &remote.filepath, &remote.file);491 tablename, &remote.filepath, &remote.file);
489@@ -4320,8 +4405,20 @@492@@ -4320,8 +4408,20 @@
490 if (!remote.success) {493 if (!remote.success) {
491 os_file_close(remote.file);494 os_file_close(remote.file);
492 mem_free(remote.filepath);495 mem_free(remote.filepath);
@@ -507,7 +510,7 @@
507 510
508 511
509 /* Try to open the tablespace in the datadir. */512 /* Try to open the tablespace in the datadir. */
510@@ -4334,6 +4431,17 @@513@@ -4334,6 +4434,17 @@
511 fil_validate_single_table_tablespace(tablename, &def);514 fil_validate_single_table_tablespace(tablename, &def);
512 if (!def.success) {515 if (!def.success) {
513 os_file_close(def.file);516 os_file_close(def.file);
@@ -525,7 +528,7 @@
525 }528 }
526 }529 }
527 530
528@@ -4418,7 +4526,7 @@531@@ -4418,7 +4529,7 @@
529 /* At this point, only one tablespace is open */532 /* At this point, only one tablespace is open */
530 ut_a(def.success == !remote.success);533 ut_a(def.success == !remote.success);
531 534
@@ -534,7 +537,7 @@
534 537
535 /* Get and test the file size. */538 /* Get and test the file size. */
536 size = os_file_get_size(fsp->file);539 size = os_file_get_size(fsp->file);
537@@ -4437,9 +4545,9 @@540@@ -4437,9 +4548,9 @@
538 541
539 /* Every .ibd file is created >= 4 pages in size. Smaller files542 /* Every .ibd file is created >= 4 pages in size. Smaller files
540 cannot be ok. */543 cannot be ok. */
@@ -546,7 +549,7 @@
546 ib_logf(IB_LOG_LEVEL_ERROR,549 ib_logf(IB_LOG_LEVEL_ERROR,
547 "The size of single-table tablespace file %s "550 "The size of single-table tablespace file %s "
548 "is only " UINT64PF ", should be at least %lu!",551 "is only " UINT64PF ", should be at least %lu!",
549@@ -4520,7 +4628,7 @@552@@ -4520,7 +4631,7 @@
550 }553 }
551 mutex_exit(&fil_system->mutex);554 mutex_exit(&fil_system->mutex);
552 #endif /* UNIV_HOTBACKUP */555 #endif /* UNIV_HOTBACKUP */
@@ -555,7 +558,7 @@
555 tablename, fsp->id, fsp->flags, FIL_TABLESPACE);558 tablename, fsp->id, fsp->flags, FIL_TABLESPACE);
556 559
557 if (!file_space_create_success) {560 if (!file_space_create_success) {
558@@ -4547,13 +4655,55 @@561@@ -4547,13 +4658,55 @@
559 }562 }
560 563
561 func_exit:564 func_exit:
@@ -615,7 +618,7 @@
615 mem_free(tablename);618 mem_free(tablename);
616 if (remote.success) {619 if (remote.success) {
617 mem_free(remote.filepath);620 mem_free(remote.filepath);
618@@ -4567,7 +4717,7 @@621@@ -4567,7 +4720,7 @@
619 idea is to read as much good data as we can and jump over bad data.622 idea is to read as much good data as we can and jump over bad data.
620 @return 0 if ok, -1 if error even after the retries, 1 if at the end623 @return 0 if ok, -1 if error even after the retries, 1 if at the end
621 of the directory */624 of the directory */
@@ -624,7 +627,7 @@
624 int627 int
625 fil_file_readdir_next_file(628 fil_file_readdir_next_file(
626 /*=======================*/629 /*=======================*/
627@@ -4607,7 +4757,7 @@630@@ -4607,7 +4760,7 @@
628 @return DB_SUCCESS or error number */631 @return DB_SUCCESS or error number */
629 UNIV_INTERN632 UNIV_INTERN
630 dberr_t633 dberr_t
@@ -633,7 +636,7 @@
633 /*===================================*/636 /*===================================*/
634 {637 {
635 int ret;638 int ret;
636@@ -4663,7 +4813,9 @@639@@ -4663,7 +4816,9 @@
637 "%s/%s", fil_path_to_mysql_datadir, dbinfo.name);640 "%s/%s", fil_path_to_mysql_datadir, dbinfo.name);
638 srv_normalize_path_for_win(dbpath);641 srv_normalize_path_for_win(dbpath);
639 642
@@ -644,7 +647,7 @@
644 647
645 if (dbdir != NULL) {648 if (dbdir != NULL) {
646 649
647@@ -4684,9 +4836,15 @@650@@ -4684,9 +4839,15 @@
648 && (0 == strcmp(fileinfo.name651 && (0 == strcmp(fileinfo.name
649 + strlen(fileinfo.name) - 4,652 + strlen(fileinfo.name) - 4,
650 ".ibd")653 ".ibd")
@@ -662,7 +665,7 @@
662 /* The name ends in .ibd or .isl;665 /* The name ends in .ibd or .isl;
663 try opening the file */666 try opening the file */
664 fil_load_single_table_tablespace(667 fil_load_single_table_tablespace(
665@@ -4842,6 +5000,7 @@668@@ -4842,6 +5003,7 @@
666 {669 {
667 fil_space_t* fnamespace;670 fil_space_t* fnamespace;
668 fil_space_t* space;671 fil_space_t* space;
@@ -670,7 +673,7 @@
670 673
671 ut_ad(fil_system);674 ut_ad(fil_system);
672 675
673@@ -4919,6 +5078,10 @@676@@ -4919,6 +5081,10 @@
674 if (fnamespace == NULL) {677 if (fnamespace == NULL) {
675 if (print_error_if_does_not_exist) {678 if (print_error_if_does_not_exist) {
676 fil_report_missing_tablespace(name, id);679 fil_report_missing_tablespace(name, id);
@@ -681,18 +684,18 @@
681 }684 }
682 } else {685 } else {
683 ut_print_timestamp(stderr);686 ut_print_timestamp(stderr);
684@@ -4942,6 +5105,10 @@687@@ -4942,6 +5108,10 @@
685 688
686 mutex_exit(&fil_system->mutex);689 mutex_exit(&fil_system->mutex);
687 690
688+ if (remove_from_data_dict) {691+ if (remove_from_data_dict && purge_sys) {
689+ fil_remove_invalid_table_from_data_dict(name);692+ fil_remove_invalid_table_from_data_dict(name);
690+ }693+ }
691+694+
692 return(FALSE);695 return(FALSE);
693 }696 }
694 697
695@@ -5575,6 +5742,16 @@698@@ -5575,6 +5745,16 @@
696 699
697 ut_ad(mode != OS_AIO_IBUF || space->purpose == FIL_TABLESPACE);700 ut_ad(mode != OS_AIO_IBUF || space->purpose == FIL_TABLESPACE);
698 701
@@ -709,7 +712,7 @@
709 node = UT_LIST_GET_FIRST(space->chain);712 node = UT_LIST_GET_FIRST(space->chain);
710 713
711 for (;;) {714 for (;;) {
712@@ -6502,6 +6679,7 @@715@@ -6502,6 +6682,7 @@
713 return(err);716 return(err);
714 }717 }
715 718
@@ -717,7 +720,7 @@
717 /****************************************************************//**720 /****************************************************************//**
718 Generate redo logs for swapping two .ibd files */721 Generate redo logs for swapping two .ibd files */
719 UNIV_INTERN722 UNIV_INTERN
720@@ -6528,3 +6706,4 @@723@@ -6528,3 +6709,4 @@
721 0, 0, new_name, old_name, mtr);724 0, 0, new_name, old_name, mtr);
722 }725 }
723 }726 }
724727
=== added file 'test/t/bug1340717.sh'
--- test/t/bug1340717.sh 1970-01-01 00:00:00 +0000
+++ test/t/bug1340717.sh 2014-08-17 09:44:59 +0000
@@ -0,0 +1,35 @@
1########################################################################
2# Test resurrect table locks
3########################################################################
4
5. inc/common.sh
6
7require_server_version_higher_than 5.6.0
8
9################################################################################
10# Start an uncommitted transaction pause "indefinitely" to keep the connection
11# open
12################################################################################
13function start_uncomitted_transaction()
14{
15 run_cmd $MYSQL $MYSQL_ARGS sakila <<EOF
16START TRANSACTION;
17DELETE FROM payment;
18SELECT SLEEP(10000);
19EOF
20}
21
22start_server
23load_sakila
24
25start_uncomitted_transaction &
26job_master=$!
27
28sleep 5;
29
30innobackupex --no-timestamp --include="sakila.actor" $topdir/backup
31
32kill -SIGKILL $job_master
33stop_server
34
35innobackupex --apply-log $topdir/backup

Subscribers

People subscribed via source and target branches