Merge lp:~akopytov/percona-xtrabackup/rebase-2.1-on-5.6.17 into lp:percona-xtrabackup/2.1

Proposed by Alexey Kopytov
Status: Merged
Approved by: Sergei Glushchenko
Approved revision: no longer in the source branch.
Merged at revision: 739
Proposed branch: lp:~akopytov/percona-xtrabackup/rebase-2.1-on-5.6.17
Merge into: lp:percona-xtrabackup/2.1
Diff against target: 1167 lines (+193/-129)
3 files modified
Makefile (+1/-1)
patches/innodb56.patch (+190/-126)
utils/build.sh (+2/-2)
To merge this branch: bzr merge lp:~akopytov/percona-xtrabackup/rebase-2.1-on-5.6.17
Reviewer Review Type Date Requested Status
Sergei Glushchenko (community) g2 Approve
Review via email: mp+217464@code.launchpad.net

Description of the change

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

Approve

review: Approve (g2)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'Makefile'
--- Makefile 2014-01-10 11:13:00 +0000
+++ Makefile 2014-04-28 14:58:04 +0000
@@ -6,7 +6,7 @@
66
7MYSQL_51_SOURCE=mysql-5.1.73.tar.gz7MYSQL_51_SOURCE=mysql-5.1.73.tar.gz
8MYSQL_55_SOURCE=mysql-5.5.35.tar.gz8MYSQL_55_SOURCE=mysql-5.5.35.tar.gz
9MYSQL_56_SOURCE=mysql-5.6.15.tar.gz9MYSQL_56_SOURCE=mysql-5.6.17.tar.gz
10PS_51_SOURCE=Percona-Server-5.1.73-rel14.11.tar.gz10PS_51_SOURCE=Percona-Server-5.1.73-rel14.11.tar.gz
11PS_55_SOURCE=Percona-Server-5.5.35-rel33.0.tar.gz11PS_55_SOURCE=Percona-Server-5.5.35-rel33.0.tar.gz
12BZR_REVNO=$(shell bzr revno 2>/dev/null || cat REVNO)12BZR_REVNO=$(shell bzr revno 2>/dev/null || cat REVNO)
1313
=== modified file 'patches/innodb56.patch'
--- patches/innodb56.patch 2014-02-25 10:19:01 +0000
+++ patches/innodb56.patch 2014-04-28 14:58:04 +0000
@@ -1,6 +1,6 @@
1--- a/configure.cmake1--- a/configure.cmake
2+++ b/configure.cmake2+++ b/configure.cmake
3@@ -985,14 +985,6 @@3@@ -987,14 +987,6 @@
4 ENDIF()4 ENDIF()
5 5
6 CHECK_C_SOURCE_COMPILES("6 CHECK_C_SOURCE_COMPILES("
@@ -60,7 +60,7 @@
60 60
61 /*61 /*
62 IMPLEMENTATION OF THE BUFFER POOL62 IMPLEMENTATION OF THE BUFFER POOL
63@@ -548,9 +549,15 @@63@@ -568,12 +569,18 @@
64 if (checksum_field1 == 0 && checksum_field2 == 064 if (checksum_field1 == 0 && checksum_field2 == 0
65 && mach_read_from_4(read_buf + FIL_PAGE_LSN) == 0) {65 && mach_read_from_4(read_buf + FIL_PAGE_LSN) == 0) {
66 /* make sure that the page is really empty */66 /* make sure that the page is really empty */
@@ -69,14 +69,17 @@
69+ is incompatible with 1st newly-created tablespace pages, which69+ is incompatible with 1st newly-created tablespace pages, which
70+ have FIL_PAGE_FIL_FLUSH_LSN != 0, FIL_PAGE_OR_CHKSUM == 0,70+ have FIL_PAGE_FIL_FLUSH_LSN != 0, FIL_PAGE_OR_CHKSUM == 0,
71+ FIL_PAGE_END_LSN_OLD_CHKSUM == 0 */71+ FIL_PAGE_END_LSN_OLD_CHKSUM == 0 */
72 ut_d(for (ulint i = 0; i < UNIV_PAGE_SIZE; i++) {72 for (ulint i = 0; i < UNIV_PAGE_SIZE; i++) {
73 ut_a(read_buf[i] == 0); });73 if (read_buf[i] != 0) {
74 return(TRUE);
75 }
76 }
74 77
75+#endif78+#endif
76 return(FALSE);79 return(FALSE);
77 }80 }
78 81
79@@ -975,6 +982,7 @@82@@ -998,6 +1005,7 @@
80 block->page.in_flush_list = FALSE;83 block->page.in_flush_list = FALSE;
81 block->page.in_free_list = FALSE;84 block->page.in_free_list = FALSE;
82 block->page.in_LRU_list = FALSE;85 block->page.in_LRU_list = FALSE;
@@ -84,7 +87,7 @@
84 block->in_unzip_LRU_list = FALSE;87 block->in_unzip_LRU_list = FALSE;
85 #endif /* UNIV_DEBUG */88 #endif /* UNIV_DEBUG */
86 #if defined UNIV_AHI_DEBUG || defined UNIV_DEBUG89 #if defined UNIV_AHI_DEBUG || defined UNIV_DEBUG
87@@ -3948,6 +3956,13 @@90@@ -4095,6 +4103,13 @@
88 frame = ((buf_block_t*) bpage)->frame;91 frame = ((buf_block_t*) bpage)->frame;
89 }92 }
90 93
@@ -98,7 +101,7 @@
98 /* If this page is not uninitialized and not in the101 /* If this page is not uninitialized and not in the
99 doublewrite buffer, then the page number and space id102 doublewrite buffer, then the page number and space id
100 should be the same as in block. */103 should be the same as in block. */
101@@ -4065,7 +4080,7 @@104@@ -4212,7 +4227,7 @@
102 recv_recover_page(TRUE, (buf_block_t*) bpage);105 recv_recover_page(TRUE, (buf_block_t*) bpage);
103 }106 }
104 107
@@ -232,7 +235,7 @@
232 /********************************************************//**235 /********************************************************//**
233 Writes a log record about an .ibd file create/rename/delete. */236 Writes a log record about an .ibd file create/rename/delete. */
234 static237 static
235@@ -2429,7 +2407,7 @@238@@ -2423,7 +2401,7 @@
236 space_id, name, path, flags,239 space_id, name, path, flags,
237 DICT_TF2_USE_TABLESPACE,240 DICT_TF2_USE_TABLESPACE,
238 FIL_IBD_FILE_INITIAL_SIZE) != DB_SUCCESS) {241 FIL_IBD_FILE_INITIAL_SIZE) != DB_SUCCESS) {
@@ -241,7 +244,7 @@
241 }244 }
242 }245 }
243 246
244@@ -2788,7 +2766,7 @@247@@ -2782,7 +2760,7 @@
245 }248 }
246 249
247 if (err == DB_SUCCESS) {250 if (err == DB_SUCCESS) {
@@ -250,7 +253,7 @@
250 /* Write a log record about the deletion of the .ibd253 /* Write a log record about the deletion of the .ibd
251 file, so that ibbackup can replay it in the254 file, so that ibbackup can replay it in the
252 --apply-log phase. We use a dummy mtr and the familiar255 --apply-log phase. We use a dummy mtr and the familiar
253@@ -3143,7 +3121,7 @@256@@ -3137,7 +3115,7 @@
254 257
255 mutex_exit(&fil_system->mutex);258 mutex_exit(&fil_system->mutex);
256 259
@@ -259,7 +262,7 @@
259 if (success && !recv_recovery_on) {262 if (success && !recv_recovery_on) {
260 mtr_t mtr;263 mtr_t mtr;
261 264
262@@ -3527,7 +3505,7 @@265@@ -3521,7 +3499,7 @@
263 goto error_exit_1;266 goto error_exit_1;
264 }267 }
265 268
@@ -268,14 +271,9 @@
268 {271 {
269 mtr_t mtr;272 mtr_t mtr;
270 ulint mlog_file_flag = 0;273 ulint mlog_file_flag = 0;
271@@ -3614,11 +3592,99 @@274@@ -3599,6 +3577,97 @@
272 lsn_t lsn; /*!< Flushed LSN from header page */275 (ulong) expected_id, (ulong) expected_flags);
273 ulint id; /*!< Space ID */276 }
274 ulint flags; /*!< Tablespace flags */
275-#ifdef UNIV_LOG_ARCHIVE
276- ulint arch_log_no; /*!< latest archived log file number */
277-#endif /* UNIV_LOG_ARCHIVE */
278 };
279 277
280+static278+static
281+void279+void
@@ -371,7 +369,7 @@
371 /********************************************************************//**369 /********************************************************************//**
372 Tries to open a single-table tablespace and optionally checks that the370 Tries to open a single-table tablespace and optionally checks that the
373 space id in it is correct. If this does not succeed, print an error message371 space id in it is correct. If this does not succeed, print an error message
374@@ -3684,6 +3750,9 @@372@@ -3664,6 +3733,9 @@
375 in the default location. If it is remote, it should not be here. */373 in the default location. If it is remote, it should not be here. */
376 def.filepath = fil_make_ibd_name(tablename, false);374 def.filepath = fil_make_ibd_name(tablename, false);
377 375
@@ -381,7 +379,7 @@
381 /* The path_in was read from SYS_DATAFILES. */379 /* The path_in was read from SYS_DATAFILES. */
382 if (path_in) {380 if (path_in) {
383 if (strcmp(def.filepath, path_in)) {381 if (strcmp(def.filepath, path_in)) {
384@@ -3731,6 +3800,7 @@382@@ -3711,6 +3783,7 @@
385 tablespaces_found++;383 tablespaces_found++;
386 }384 }
387 }385 }
@@ -389,7 +387,7 @@
389 387
390 /* Always look for a file at the default location. */388 /* Always look for a file at the default location. */
391 ut_a(def.filepath);389 ut_a(def.filepath);
392@@ -3752,9 +3822,6 @@390@@ -3732,9 +3805,6 @@
393 if (def.success) {391 if (def.success) {
394 def.check_msg = fil_read_first_page(392 def.check_msg = fil_read_first_page(
395 def.file, FALSE, &def.flags, &def.id,393 def.file, FALSE, &def.flags, &def.id,
@@ -399,7 +397,7 @@
399 &def.lsn, &def.lsn);397 &def.lsn, &def.lsn);
400 def.valid = !def.check_msg;398 def.valid = !def.check_msg;
401 399
402@@ -3777,9 +3844,6 @@400@@ -3757,9 +3827,6 @@
403 if (remote.success) {401 if (remote.success) {
404 remote.check_msg = fil_read_first_page(402 remote.check_msg = fil_read_first_page(
405 remote.file, FALSE, &remote.flags, &remote.id,403 remote.file, FALSE, &remote.flags, &remote.id,
@@ -409,7 +407,7 @@
409 &remote.lsn, &remote.lsn);407 &remote.lsn, &remote.lsn);
410 remote.valid = !remote.check_msg;408 remote.valid = !remote.check_msg;
411 409
412@@ -3803,9 +3867,6 @@410@@ -3783,9 +3850,6 @@
413 if (dict.success) {411 if (dict.success) {
414 dict.check_msg = fil_read_first_page(412 dict.check_msg = fil_read_first_page(
415 dict.file, FALSE, &dict.flags, &dict.id,413 dict.file, FALSE, &dict.flags, &dict.id,
@@ -419,7 +417,7 @@
419 &dict.lsn, &dict.lsn);417 &dict.lsn, &dict.lsn);
420 dict.valid = !dict.check_msg;418 dict.valid = !dict.check_msg;
421 419
422@@ -3830,11 +3891,15 @@420@@ -3810,11 +3874,15 @@
423 /* The following call prints an error message */421 /* The following call prints an error message */
424 os_file_get_last_error(true);422 os_file_get_last_error(true);
425 423
@@ -436,8 +434,8 @@
436 434
437 err = DB_CORRUPTION;435 err = DB_CORRUPTION;
438 436
439@@ -4034,9 +4099,6 @@437@@ -4187,9 +4255,6 @@
440 {438 fsp->success = TRUE;
441 if (const char* check_msg = fil_read_first_page(439 if (const char* check_msg = fil_read_first_page(
442 fsp->file, FALSE, &fsp->flags, &fsp->id,440 fsp->file, FALSE, &fsp->flags, &fsp->id,
443-#ifdef UNIV_LOG_ARCHIVE441-#ifdef UNIV_LOG_ARCHIVE
@@ -446,7 +444,7 @@
446 &fsp->lsn, &fsp->lsn)) {444 &fsp->lsn, &fsp->lsn)) {
447 ib_logf(IB_LOG_LEVEL_ERROR,445 ib_logf(IB_LOG_LEVEL_ERROR,
448 "%s in tablespace %s (table %s)",446 "%s in tablespace %s (table %s)",
449@@ -4098,6 +4160,9 @@447@@ -4266,6 +4331,9 @@
450 #ifdef UNIV_HOTBACKUP448 #ifdef UNIV_HOTBACKUP
451 fil_space_t* space;449 fil_space_t* space;
452 #endif450 #endif
@@ -456,7 +454,7 @@
456 454
457 memset(&def, 0, sizeof(def));455 memset(&def, 0, sizeof(def));
458 memset(&remote, 0, sizeof(remote));456 memset(&remote, 0, sizeof(remote));
459@@ -4142,6 +4207,9 @@457@@ -4310,6 +4378,9 @@
460 # endif /* !UNIV_HOTBACKUP */458 # endif /* !UNIV_HOTBACKUP */
461 #endif459 #endif
462 460
@@ -466,7 +464,7 @@
466 /* Check for a link file which locates a remote tablespace. */464 /* Check for a link file which locates a remote tablespace. */
467 remote.success = fil_open_linked_file(465 remote.success = fil_open_linked_file(
468 tablename, &remote.filepath, &remote.file);466 tablename, &remote.filepath, &remote.file);
469@@ -4152,8 +4220,20 @@467@@ -4320,8 +4391,20 @@
470 if (!remote.success) {468 if (!remote.success) {
471 os_file_close(remote.file);469 os_file_close(remote.file);
472 mem_free(remote.filepath);470 mem_free(remote.filepath);
@@ -487,7 +485,7 @@
487 485
488 486
489 /* Try to open the tablespace in the datadir. */487 /* Try to open the tablespace in the datadir. */
490@@ -4166,6 +4246,17 @@488@@ -4334,6 +4417,17 @@
491 fil_validate_single_table_tablespace(tablename, &def);489 fil_validate_single_table_tablespace(tablename, &def);
492 if (!def.success) {490 if (!def.success) {
493 os_file_close(def.file);491 os_file_close(def.file);
@@ -505,7 +503,7 @@
505 }503 }
506 }504 }
507 505
508@@ -4250,7 +4341,7 @@506@@ -4418,7 +4512,7 @@
509 /* At this point, only one tablespace is open */507 /* At this point, only one tablespace is open */
510 ut_a(def.success == !remote.success);508 ut_a(def.success == !remote.success);
511 509
@@ -514,7 +512,7 @@
514 512
515 /* Get and test the file size. */513 /* Get and test the file size. */
516 size = os_file_get_size(fsp->file);514 size = os_file_get_size(fsp->file);
517@@ -4269,9 +4360,9 @@515@@ -4437,9 +4531,9 @@
518 516
519 /* Every .ibd file is created >= 4 pages in size. Smaller files517 /* Every .ibd file is created >= 4 pages in size. Smaller files
520 cannot be ok. */518 cannot be ok. */
@@ -526,7 +524,7 @@
526 ib_logf(IB_LOG_LEVEL_ERROR,524 ib_logf(IB_LOG_LEVEL_ERROR,
527 "The size of single-table tablespace file %s "525 "The size of single-table tablespace file %s "
528 "is only " UINT64PF ", should be at least %lu!",526 "is only " UINT64PF ", should be at least %lu!",
529@@ -4352,7 +4443,7 @@527@@ -4520,7 +4614,7 @@
530 }528 }
531 mutex_exit(&fil_system->mutex);529 mutex_exit(&fil_system->mutex);
532 #endif /* UNIV_HOTBACKUP */530 #endif /* UNIV_HOTBACKUP */
@@ -535,7 +533,7 @@
535 tablename, fsp->id, fsp->flags, FIL_TABLESPACE);533 tablename, fsp->id, fsp->flags, FIL_TABLESPACE);
536 534
537 if (!file_space_create_success) {535 if (!file_space_create_success) {
538@@ -4379,13 +4470,55 @@536@@ -4547,13 +4641,55 @@
539 }537 }
540 538
541 func_exit:539 func_exit:
@@ -595,7 +593,7 @@
595 mem_free(tablename);593 mem_free(tablename);
596 if (remote.success) {594 if (remote.success) {
597 mem_free(remote.filepath);595 mem_free(remote.filepath);
598@@ -4399,7 +4532,7 @@596@@ -4567,7 +4703,7 @@
599 idea is to read as much good data as we can and jump over bad data.597 idea is to read as much good data as we can and jump over bad data.
600 @return 0 if ok, -1 if error even after the retries, 1 if at the end598 @return 0 if ok, -1 if error even after the retries, 1 if at the end
601 of the directory */599 of the directory */
@@ -604,7 +602,7 @@
604 int602 int
605 fil_file_readdir_next_file(603 fil_file_readdir_next_file(
606 /*=======================*/604 /*=======================*/
607@@ -4439,7 +4572,7 @@605@@ -4607,7 +4743,7 @@
608 @return DB_SUCCESS or error number */606 @return DB_SUCCESS or error number */
609 UNIV_INTERN607 UNIV_INTERN
610 dberr_t608 dberr_t
@@ -613,7 +611,7 @@
613 /*===================================*/611 /*===================================*/
614 {612 {
615 int ret;613 int ret;
616@@ -4495,7 +4628,9 @@614@@ -4663,7 +4799,9 @@
617 "%s/%s", fil_path_to_mysql_datadir, dbinfo.name);615 "%s/%s", fil_path_to_mysql_datadir, dbinfo.name);
618 srv_normalize_path_for_win(dbpath);616 srv_normalize_path_for_win(dbpath);
619 617
@@ -624,7 +622,7 @@
624 622
625 if (dbdir != NULL) {623 if (dbdir != NULL) {
626 624
627@@ -4516,9 +4651,15 @@625@@ -4684,9 +4822,15 @@
628 && (0 == strcmp(fileinfo.name626 && (0 == strcmp(fileinfo.name
629 + strlen(fileinfo.name) - 4,627 + strlen(fileinfo.name) - 4,
630 ".ibd")628 ".ibd")
@@ -642,7 +640,7 @@
642 /* The name ends in .ibd or .isl;640 /* The name ends in .ibd or .isl;
643 try opening the file */641 try opening the file */
644 fil_load_single_table_tablespace(642 fil_load_single_table_tablespace(
645@@ -4674,6 +4815,7 @@643@@ -4842,6 +4986,7 @@
646 {644 {
647 fil_space_t* fnamespace;645 fil_space_t* fnamespace;
648 fil_space_t* space;646 fil_space_t* space;
@@ -650,7 +648,7 @@
650 648
651 ut_ad(fil_system);649 ut_ad(fil_system);
652 650
653@@ -4751,6 +4893,10 @@651@@ -4919,6 +5064,10 @@
654 if (fnamespace == NULL) {652 if (fnamespace == NULL) {
655 if (print_error_if_does_not_exist) {653 if (print_error_if_does_not_exist) {
656 fil_report_missing_tablespace(name, id);654 fil_report_missing_tablespace(name, id);
@@ -661,7 +659,7 @@
661 }659 }
662 } else {660 } else {
663 ut_print_timestamp(stderr);661 ut_print_timestamp(stderr);
664@@ -4774,6 +4920,10 @@662@@ -4942,6 +5091,10 @@
665 663
666 mutex_exit(&fil_system->mutex);664 mutex_exit(&fil_system->mutex);
667 665
@@ -672,7 +670,7 @@
672 return(FALSE);670 return(FALSE);
673 }671 }
674 672
675@@ -5407,6 +5557,16 @@673@@ -5575,6 +5728,16 @@
676 674
677 ut_ad(mode != OS_AIO_IBUF || space->purpose == FIL_TABLESPACE);675 ut_ad(mode != OS_AIO_IBUF || space->purpose == FIL_TABLESPACE);
678 676
@@ -689,7 +687,7 @@
689 node = UT_LIST_GET_FIRST(space->chain);687 node = UT_LIST_GET_FIRST(space->chain);
690 688
691 for (;;) {689 for (;;) {
692@@ -6334,6 +6494,7 @@690@@ -6502,6 +6665,7 @@
693 return(err);691 return(err);
694 }692 }
695 693
@@ -697,7 +695,7 @@
697 /****************************************************************//**695 /****************************************************************//**
698 Generate redo logs for swapping two .ibd files */696 Generate redo logs for swapping two .ibd files */
699 UNIV_INTERN697 UNIV_INTERN
700@@ -6360,3 +6521,4 @@698@@ -6528,3 +6692,4 @@
701 0, 0, new_name, old_name, mtr);699 0, 0, new_name, old_name, mtr);
702 }700 }
703 }701 }
@@ -725,7 +723,7 @@
725 static TYPELIB innodb_checksum_algorithm_typelib = {723 static TYPELIB innodb_checksum_algorithm_typelib = {
726 array_elements(innodb_checksum_algorithm_names) - 1,724 array_elements(innodb_checksum_algorithm_names) - 1,
727 "innodb_checksum_algorithm_typelib",725 "innodb_checksum_algorithm_typelib",
728@@ -1568,7 +1569,7 @@726@@ -1587,7 +1588,7 @@
729 ut_ad(*mbminlen < DATA_MBMAX);727 ut_ad(*mbminlen < DATA_MBMAX);
730 ut_ad(*mbmaxlen < DATA_MBMAX);728 ut_ad(*mbmaxlen < DATA_MBMAX);
731 } else {729 } else {
@@ -734,7 +732,7 @@
734 732
735 if (thd && thd_sql_command(thd) == SQLCOM_DROP_TABLE) {733 if (thd && thd_sql_command(thd) == SQLCOM_DROP_TABLE) {
736 734
737@@ -2113,6 +2114,62 @@735@@ -2132,6 +2133,62 @@
738 return(trx->state != TRX_STATE_NOT_STARTED);736 return(trx->state != TRX_STATE_NOT_STARTED);
739 }737 }
740 738
@@ -797,7 +795,7 @@
797 /*********************************************************************//**795 /*********************************************************************//**
798 Copy table flags from MySQL's HA_CREATE_INFO into an InnoDB table object.796 Copy table flags from MySQL's HA_CREATE_INFO into an InnoDB table object.
799 Those flags are stored in .frm file and end up in the MySQL table object,797 Those flags are stored in .frm file and end up in the MySQL table object,
800@@ -2478,40 +2535,19 @@798@@ -2497,40 +2554,19 @@
801 ulint buflen, /*!< in: length of buf, in bytes */799 ulint buflen, /*!< in: length of buf, in bytes */
802 const char* id, /*!< in: identifier to convert */800 const char* id, /*!< in: identifier to convert */
803 ulint idlen, /*!< in: length of id, in bytes */801 ulint idlen, /*!< in: length of id, in bytes */
@@ -843,7 +841,7 @@
843 if (UNIV_UNLIKELY(idlen > buflen)) {841 if (UNIV_UNLIKELY(idlen > buflen)) {
844 idlen = buflen;842 idlen = buflen;
845 }843 }
846@@ -2899,12 +2935,9 @@844@@ -2921,12 +2957,9 @@
847 }845 }
848 846
849 #ifdef UNIV_LOG_ARCHIVE847 #ifdef UNIV_LOG_ARCHIVE
@@ -859,7 +857,7 @@
859 srv_arch_dir = innobase_log_arch_dir;857 srv_arch_dir = innobase_log_arch_dir;
860 #endif /* UNIG_LOG_ARCHIVE */858 #endif /* UNIG_LOG_ARCHIVE */
861 859
862@@ -3146,6 +3179,8 @@860@@ -3168,6 +3201,8 @@
863 srv_checksum_algorithm = SRV_CHECKSUM_ALGORITHM_NONE;861 srv_checksum_algorithm = SRV_CHECKSUM_ALGORITHM_NONE;
864 }862 }
865 863
@@ -868,7 +866,7 @@
868 #ifdef HAVE_LARGE_PAGES866 #ifdef HAVE_LARGE_PAGES
869 if ((os_use_large_pages = (ibool) my_use_large_pages)) {867 if ((os_use_large_pages = (ibool) my_use_large_pages)) {
870 os_large_page_size = (ulint) opt_large_page_size;868 os_large_page_size = (ulint) opt_large_page_size;
871@@ -15476,6 +15511,33 @@869@@ -15641,6 +15676,33 @@
872 NULL, NULL, SRV_CHECKSUM_ALGORITHM_INNODB,870 NULL, NULL, SRV_CHECKSUM_ALGORITHM_INNODB,
873 &innodb_checksum_algorithm_typelib);871 &innodb_checksum_algorithm_typelib);
874 872
@@ -902,7 +900,7 @@
902 static MYSQL_SYSVAR_BOOL(checksums, innobase_use_checksums,900 static MYSQL_SYSVAR_BOOL(checksums, innobase_use_checksums,
903 PLUGIN_VAR_NOCMDARG | PLUGIN_VAR_READONLY,901 PLUGIN_VAR_NOCMDARG | PLUGIN_VAR_READONLY,
904 "DEPRECATED. Use innodb_checksum_algorithm=NONE instead of setting "902 "DEPRECATED. Use innodb_checksum_algorithm=NONE instead of setting "
905@@ -16258,6 +16320,7 @@903@@ -16447,6 +16509,7 @@
906 MYSQL_SYSVAR(lru_scan_depth),904 MYSQL_SYSVAR(lru_scan_depth),
907 MYSQL_SYSVAR(flush_neighbors),905 MYSQL_SYSVAR(flush_neighbors),
908 MYSQL_SYSVAR(checksum_algorithm),906 MYSQL_SYSVAR(checksum_algorithm),
@@ -910,7 +908,7 @@
910 MYSQL_SYSVAR(checksums),908 MYSQL_SYSVAR(checksums),
911 MYSQL_SYSVAR(commit_concurrency),909 MYSQL_SYSVAR(commit_concurrency),
912 MYSQL_SYSVAR(concurrency_tickets),910 MYSQL_SYSVAR(concurrency_tickets),
913@@ -16836,45 +16899,24 @@911@@ -17034,47 +17097,24 @@
914 void912 void
915 ib_logf(913 ib_logf(
916 /*====*/914 /*====*/
@@ -931,7 +929,9 @@
931- str[size - 1] = 0x0;929- str[size - 1] = 0x0;
932- vsnprintf(str, size, format, args);930- vsnprintf(str, size, format, args);
933-#elif HAVE_VASPRINTF931-#elif HAVE_VASPRINTF
934- (void) vasprintf(&str, format, args);932- int ret;
933- ret = vasprintf(&str, format, args);
934- ut_a(ret != -1);
935-#else935-#else
936- /* Use a fixed length string. */936- /* Use a fixed length string. */
937- str = static_cast<char*>(malloc(BUFSIZ));937- str = static_cast<char*>(malloc(BUFSIZ));
@@ -966,7 +966,7 @@
966 ut_error;966 ut_error;
967--- a/storage/innobase/handler/handler0alter.cc967--- a/storage/innobase/handler/handler0alter.cc
968+++ b/storage/innobase/handler/handler0alter.cc968+++ b/storage/innobase/handler/handler0alter.cc
969@@ -5440,6 +5440,7 @@969@@ -5505,6 +5505,7 @@
970 = static_cast<ha_innobase_inplace_ctx*>(*pctx);970 = static_cast<ha_innobase_inplace_ctx*>(*pctx);
971 971
972 DBUG_ASSERT(ctx->need_rebuild());972 DBUG_ASSERT(ctx->need_rebuild());
@@ -974,7 +974,7 @@
974 /* Generate the redo log for the file974 /* Generate the redo log for the file
975 operations that will be performed in975 operations that will be performed in
976 commit_cache_rebuild(). */976 commit_cache_rebuild(). */
977@@ -5448,6 +5449,7 @@977@@ -5513,6 +5514,7 @@
978 ctx->new_table->space,978 ctx->new_table->space,
979 ctx->new_table->name,979 ctx->new_table->name,
980 ctx->tmp_name, &mtr);980 ctx->tmp_name, &mtr);
@@ -984,7 +984,7 @@
984 }984 }
985--- a/storage/innobase/include/buf0buf.h985--- a/storage/innobase/include/buf0buf.h
986+++ b/storage/innobase/include/buf0buf.h986+++ b/storage/innobase/include/buf0buf.h
987@@ -1580,6 +1580,8 @@987@@ -1610,6 +1610,8 @@
988 or buf_block_t::mutex. */988 or buf_block_t::mutex. */
989 # endif /* UNIV_DEBUG_FILE_ACCESSES || UNIV_DEBUG */989 # endif /* UNIV_DEBUG_FILE_ACCESSES || UNIV_DEBUG */
990 #endif /* !UNIV_HOTBACKUP */990 #endif /* !UNIV_HOTBACKUP */
@@ -995,7 +995,7 @@
995 /** The buffer control block structure */995 /** The buffer control block structure */
996--- a/storage/innobase/include/fil0fil.h996--- a/storage/innobase/include/fil0fil.h
997+++ b/storage/innobase/include/fil0fil.h997+++ b/storage/innobase/include/fil0fil.h
998@@ -163,6 +163,9 @@998@@ -165,6 +165,9 @@
999 #define FIL_LOG 502 /*!< redo log */999 #define FIL_LOG 502 /*!< redo log */
1000 /* @} */1000 /* @} */
1001 1001
@@ -1005,7 +1005,17 @@
1005 /** The number of fsyncs done to the log */1005 /** The number of fsyncs done to the log */
1006 extern ulint fil_n_log_flushes;1006 extern ulint fil_n_log_flushes;
1007 1007
1008@@ -373,12 +376,6 @@1008@@ -185,9 +188,6 @@
1009 lsn_t lsn; /*!< Flushed LSN from header page */
1010 ulint id; /*!< Space ID */
1011 ulint flags; /*!< Tablespace flags */
1012-#ifdef UNIV_LOG_ARCHIVE
1013- ulint arch_log_no; /*!< latest archived log file number */
1014-#endif /* UNIV_LOG_ARCHIVE */
1015 };
1016
1017 #ifndef UNIV_HOTBACKUP
1018@@ -389,12 +389,6 @@
1009 contain sensible data */1019 contain sensible data */
1010 ulint* flags, /*!< out: tablespace flags */1020 ulint* flags, /*!< out: tablespace flags */
1011 ulint* space_id, /*!< out: tablespace ID */1021 ulint* space_id, /*!< out: tablespace ID */
@@ -1018,7 +1028,7 @@
1018 lsn_t* min_flushed_lsn, /*!< out: min of flushed1028 lsn_t* min_flushed_lsn, /*!< out: min of flushed
1019 lsn values in data files */1029 lsn values in data files */
1020 lsn_t* max_flushed_lsn) /*!< out: max of flushed1030 lsn_t* max_flushed_lsn) /*!< out: max of flushed
1021@@ -611,7 +608,7 @@1031@@ -627,7 +621,7 @@
1022 @return DB_SUCCESS or error number */1032 @return DB_SUCCESS or error number */
1023 UNIV_INTERN1033 UNIV_INTERN
1024 dberr_t1034 dberr_t
@@ -1181,7 +1191,7 @@
1181 UNIV_INLINE1191 UNIV_INLINE
1182--- a/storage/innobase/include/log0recv.h1192--- a/storage/innobase/include/log0recv.h
1183+++ b/storage/innobase/include/log0recv.h1193+++ b/storage/innobase/include/log0recv.h
1184@@ -297,18 +297,13 @@1194@@ -298,18 +298,13 @@
1185 Recovers from archived log files, and also from log files, if they exist.1195 Recovers from archived log files, and also from log files, if they exist.
1186 @return error code or DB_SUCCESS */1196 @return error code or DB_SUCCESS */
1187 UNIV_INTERN1197 UNIV_INTERN
@@ -1213,7 +1223,7 @@
1213 1223
1214 /** Options for os_file_create_func @{ */1224 /** Options for os_file_create_func @{ */
1215 enum os_file_create_t {1225 enum os_file_create_t {
1216@@ -202,6 +202,10 @@1226@@ -206,6 +206,10 @@
1217 extern ulint os_n_file_writes;1227 extern ulint os_n_file_writes;
1218 extern ulint os_n_fsyncs;1228 extern ulint os_n_fsyncs;
1219 1229
@@ -1239,7 +1249,7 @@
1239+1249+
1240 /*-------------------------------------------*/1250 /*-------------------------------------------*/
1241 1251
1242 extern ibool srv_print_innodb_monitor;1252 extern my_bool srv_print_innodb_monitor;
1243@@ -496,13 +503,17 @@1253@@ -496,13 +503,17 @@
1244 the reason for which is that some FS1254 the reason for which is that some FS
1245 do not flush meta-data when1255 do not flush meta-data when
@@ -1601,7 +1611,7 @@
1601 #ifdef UNIV_LOG_DEBUG1611 #ifdef UNIV_LOG_DEBUG
1602--- a/storage/innobase/log/log0recv.cc1612--- a/storage/innobase/log/log0recv.cc
1603+++ b/storage/innobase/log/log0recv.cc1613+++ b/storage/innobase/log/log0recv.cc
1604@@ -43,20 +43,28 @@1614@@ -48,21 +48,29 @@
1605 #include "trx0undo.h"1615 #include "trx0undo.h"
1606 #include "trx0rec.h"1616 #include "trx0rec.h"
1607 #include "fil0fil.h"1617 #include "fil0fil.h"
@@ -1624,6 +1634,7 @@
1624+/** The maximum LSN of found archived log files */1634+/** The maximum LSN of found archived log files */
1625+extern ib_uint64_t xtrabackup_arch_last_file_lsn;1635+extern ib_uint64_t xtrabackup_arch_last_file_lsn;
1626 1636
1637
1627 /** This is set to FALSE if the backup was originally taken with the1638 /** This is set to FALSE if the backup was originally taken with the
1628 ibbackup --include regexp option: then we do not want to create tables in1639 ibbackup --include regexp option: then we do not want to create tables in
1629 directories which were not included */1640 directories which were not included */
@@ -1633,7 +1644,7 @@
1633 1644
1634 /** Log records are stored in the hash table in chunks at most of this size;1645 /** Log records are stored in the hash table in chunks at most of this size;
1635 this must be less than UNIV_PAGE_SIZE as it is stored in the buffer pool */1646 this must be less than UNIV_PAGE_SIZE as it is stored in the buffer pool */
1636@@ -399,7 +407,7 @@1647@@ -405,7 +413,7 @@
1637 /* Set appropriate value of recv_n_pool_free_frames. */1648 /* Set appropriate value of recv_n_pool_free_frames. */
1638 if (buf_pool_get_curr_size() >= (10 * 1024 * 1024)) {1649 if (buf_pool_get_curr_size() >= (10 * 1024 * 1024)) {
1639 /* Buffer pool of size greater than 10 MB. */1650 /* Buffer pool of size greater than 10 MB. */
@@ -1642,7 +1653,7 @@
1642 }1653 }
1643 1654
1644 recv_sys->buf = static_cast<byte*>(ut_malloc(RECV_PARSING_BUF_SIZE));1655 recv_sys->buf = static_cast<byte*>(ut_malloc(RECV_PARSING_BUF_SIZE));
1645@@ -703,7 +711,7 @@1656@@ -712,7 +720,7 @@
1646 /***********************************************************************//**1657 /***********************************************************************//**
1647 Checks the consistency of the checkpoint info1658 Checks the consistency of the checkpoint info
1648 @return TRUE if ok */1659 @return TRUE if ok */
@@ -1651,7 +1662,7 @@
1651 ibool1662 ibool
1652 recv_check_cp_is_consistent(1663 recv_check_cp_is_consistent(
1653 /*========================*/1664 /*========================*/
1654@@ -733,7 +741,7 @@1665@@ -742,7 +750,7 @@
1655 /********************************************************//**1666 /********************************************************//**
1656 Looks for the maximum consistent checkpoint from the log groups.1667 Looks for the maximum consistent checkpoint from the log groups.
1657 @return error code or DB_SUCCESS */1668 @return error code or DB_SUCCESS */
@@ -1660,7 +1671,7 @@
1660 dberr_t1671 dberr_t
1661 recv_find_max_checkpoint(1672 recv_find_max_checkpoint(
1662 /*=====================*/1673 /*=====================*/
1663@@ -893,7 +901,7 @@1674@@ -902,7 +910,7 @@
1664 InnoDB-3.23.52 where the checksum field contains the log block number.1675 InnoDB-3.23.52 where the checksum field contains the log block number.
1665 @return TRUE if ok, or if the log block may be in the format of InnoDB1676 @return TRUE if ok, or if the log block may be in the format of InnoDB
1666 version predating 3.23.52 */1677 version predating 3.23.52 */
@@ -1669,7 +1680,7 @@
1669 ibool1680 ibool
1670 log_block_checksum_is_ok_or_old_format(1681 log_block_checksum_is_ok_or_old_format(
1671 /*===================================*/1682 /*===================================*/
1672@@ -902,12 +910,72 @@1683@@ -911,12 +919,72 @@
1673 #ifdef UNIV_LOG_DEBUG1684 #ifdef UNIV_LOG_DEBUG
1674 return(TRUE);1685 return(TRUE);
1675 #endif /* UNIV_LOG_DEBUG */1686 #endif /* UNIV_LOG_DEBUG */
@@ -1744,7 +1755,7 @@
1744 1755
1745 /* We assume the log block is in the format of1756 /* We assume the log block is in the format of
1746 InnoDB version < 3.23.52 and the block is ok */1757 InnoDB version < 3.23.52 and the block is ok */
1747@@ -1588,6 +1656,8 @@1758@@ -1606,6 +1674,8 @@
1748 buf_block_get_page_no(block));1759 buf_block_get_page_no(block));
1749 1760
1750 if ((recv_addr == NULL)1761 if ((recv_addr == NULL)
@@ -1753,7 +1764,7 @@
1753 || (recv_addr->state == RECV_BEING_PROCESSED)1764 || (recv_addr->state == RECV_BEING_PROCESSED)
1754 || (recv_addr->state == RECV_PROCESSED)) {1765 || (recv_addr->state == RECV_PROCESSED)) {
1755 1766
1756@@ -1677,9 +1747,17 @@1767@@ -1695,9 +1765,17 @@
1757 if (page_zip) {1768 if (page_zip) {
1758 memset(FIL_PAGE_LSN + page_zip->data, 0, 8);1769 memset(FIL_PAGE_LSN + page_zip->data, 0, 8);
1759 }1770 }
@@ -1772,7 +1783,7 @@
1772 1783
1773 lsn_t end_lsn;1784 lsn_t end_lsn;
1774 1785
1775@@ -1865,6 +1943,19 @@1786@@ -1883,6 +1961,19 @@
1776 ulint zip_size = fil_space_get_zip_size(space);1787 ulint zip_size = fil_space_get_zip_size(space);
1777 ulint page_no = recv_addr->page_no;1788 ulint page_no = recv_addr->page_no;
1778 1789
@@ -1792,7 +1803,7 @@
1792 if (recv_addr->state == RECV_NOT_PROCESSED) {1803 if (recv_addr->state == RECV_NOT_PROCESSED) {
1793 if (!has_printed) {1804 if (!has_printed) {
1794 ib_logf(IB_LOG_LEVEL_INFO,1805 ib_logf(IB_LOG_LEVEL_INFO,
1795@@ -2406,7 +2497,7 @@1806@@ -2424,7 +2515,7 @@
1796 || type == MLOG_FILE_RENAME1807 || type == MLOG_FILE_RENAME
1797 || type == MLOG_FILE_DELETE) {1808 || type == MLOG_FILE_DELETE) {
1798 ut_a(space);1809 ut_a(space);
@@ -1801,7 +1812,7 @@
1801 if (recv_replay_file_ops) {1812 if (recv_replay_file_ops) {
1802 1813
1803 /* In ibbackup --apply-log, replay an .ibd file1814 /* In ibbackup --apply-log, replay an .ibd file
1804@@ -2429,7 +2520,7 @@1815@@ -2447,7 +2538,7 @@
1805 ut_error;1816 ut_error;
1806 }1817 }
1807 }1818 }
@@ -1810,7 +1821,7 @@
1810 /* In normal mysqld crash recovery we do not try to1821 /* In normal mysqld crash recovery we do not try to
1811 replay file operations */1822 replay file operations */
1812 #ifdef UNIV_LOG_LSN_DEBUG1823 #ifdef UNIV_LOG_LSN_DEBUG
1813@@ -2832,7 +2923,10 @@1824@@ -2850,7 +2941,10 @@
1814 = log_block_get_checkpoint_no(log_block);1825 = log_block_get_checkpoint_no(log_block);
1815 }1826 }
1816 1827
@@ -1822,7 +1833,7 @@
1822 /* Log data for this group ends here */1833 /* Log data for this group ends here */
1823 1834
1824 finished = TRUE;1835 finished = TRUE;
1825@@ -2852,8 +2946,14 @@1836@@ -2870,8 +2964,14 @@
1826 1837
1827 fprintf(stderr,1838 fprintf(stderr,
1828 "InnoDB: Doing recovery: scanned up to"1839 "InnoDB: Doing recovery: scanned up to"
@@ -1839,7 +1850,7 @@
1839 }1850 }
1840 }1851 }
1841 1852
1842@@ -2953,7 +3053,7 @@1853@@ -2971,7 +3071,7 @@
1843 ib_logf(IB_LOG_LEVEL_INFO,1854 ib_logf(IB_LOG_LEVEL_INFO,
1844 "Reading tablespace information from the .ibd files...");1855 "Reading tablespace information from the .ibd files...");
1845 1856
@@ -1848,7 +1859,7 @@
1848 1859
1849 /* If we are using the doublewrite method, we will1860 /* If we are using the doublewrite method, we will
1850 check if there are half-written pages in data files,1861 check if there are half-written pages in data files,
1851@@ -2997,6 +3097,7 @@1862@@ -3015,6 +3115,7 @@
1852 log_group_t* group;1863 log_group_t* group;
1853 log_group_t* max_cp_group;1864 log_group_t* max_cp_group;
1854 ulint max_cp_field;1865 ulint max_cp_field;
@@ -1856,7 +1867,7 @@
1856 lsn_t checkpoint_lsn;1867 lsn_t checkpoint_lsn;
1857 ib_uint64_t checkpoint_no;1868 ib_uint64_t checkpoint_no;
1858 lsn_t group_scanned_lsn = 0;1869 lsn_t group_scanned_lsn = 0;
1859@@ -3006,9 +3107,13 @@1870@@ -3024,10 +3125,14 @@
1860 lsn_t archived_lsn;1871 lsn_t archived_lsn;
1861 #endif /* UNIV_LOG_ARCHIVE */1872 #endif /* UNIV_LOG_ARCHIVE */
1862 byte* buf;1873 byte* buf;
@@ -1864,6 +1875,7 @@
1864+ byte* log_hdr_buf;1875+ byte* log_hdr_buf;
1865+ byte log_hdr_buf_base[LOG_FILE_HDR_SIZE + OS_FILE_LOG_BLOCK_SIZE];1876+ byte log_hdr_buf_base[LOG_FILE_HDR_SIZE + OS_FILE_LOG_BLOCK_SIZE];
1866 dberr_t err;1877 dberr_t err;
1878 ut_when_dtor<recv_dblwr_t> tmp(recv_sys->dblwr);
1867 1879
1868+ log_hdr_buf = static_cast<byte *>1880+ log_hdr_buf = static_cast<byte *>
1869+ (ut_align(log_hdr_buf_base, OS_FILE_LOG_BLOCK_SIZE));1881+ (ut_align(log_hdr_buf_base, OS_FILE_LOG_BLOCK_SIZE));
@@ -1871,7 +1883,7 @@
1871 #ifdef UNIV_LOG_ARCHIVE1883 #ifdef UNIV_LOG_ARCHIVE
1872 ut_ad(type != LOG_CHECKPOINT || limit_lsn == LSN_MAX);1884 ut_ad(type != LOG_CHECKPOINT || limit_lsn == LSN_MAX);
1873 /** TRUE when recovering from a checkpoint */1885 /** TRUE when recovering from a checkpoint */
1874@@ -3102,14 +3207,33 @@1886@@ -3116,14 +3221,33 @@
1875 log_hdr_buf, max_cp_group);1887 log_hdr_buf, max_cp_group);
1876 }1888 }
1877 1889
@@ -1906,7 +1918,7 @@
1906 group = UT_LIST_GET_NEXT(log_groups, group);1918 group = UT_LIST_GET_NEXT(log_groups, group);
1907 }1919 }
1908 #endif /* UNIV_LOG_ARCHIVE */1920 #endif /* UNIV_LOG_ARCHIVE */
1909@@ -3435,7 +3559,8 @@1921@@ -3444,7 +3568,8 @@
1910 that the data dictionary tables will be free of any locks.1922 that the data dictionary tables will be free of any locks.
1911 The data dictionary latch should guarantee that there is at1923 The data dictionary latch should guarantee that there is at
1912 most one data dictionary transaction active at a time. */1924 most one data dictionary transaction active at a time. */
@@ -1916,7 +1928,7 @@
1916 trx_rollback_or_clean_recovered(FALSE);1928 trx_rollback_or_clean_recovered(FALSE);
1917 }1929 }
1918 }1930 }
1919@@ -3664,23 +3789,23 @@1931@@ -3673,23 +3798,23 @@
1920 ulint len;1932 ulint len;
1921 ibool ret;1933 ibool ret;
1922 byte* buf;1934 byte* buf;
@@ -1945,7 +1957,7 @@
1945 1957
1946 if (ret == FALSE) {1958 if (ret == FALSE) {
1947 ask_again:1959 ask_again:
1948@@ -3725,20 +3850,19 @@1960@@ -3734,20 +3859,19 @@
1949 1961
1950 /* Add the archive file as a node to the space */1962 /* Add the archive file as a node to the space */
1951 1963
@@ -1972,7 +1984,7 @@
1972 != group->archived_file_no) {1984 != group->archived_file_no) {
1973 fprintf(stderr,1985 fprintf(stderr,
1974 "InnoDB: Archive file header inconsistent %s\n", name);1986 "InnoDB: Archive file header inconsistent %s\n", name);
1975@@ -3767,6 +3891,20 @@1987@@ -3776,6 +3900,20 @@
1976 return(TRUE);1988 return(TRUE);
1977 }1989 }
1978 1990
@@ -1993,7 +2005,7 @@
1993 recv_sys->scanned_lsn = start_lsn;2005 recv_sys->scanned_lsn = start_lsn;
1994 }2006 }
1995 2007
1996@@ -3779,7 +3917,7 @@2008@@ -3788,7 +3926,7 @@
1997 return(TRUE);2009 return(TRUE);
1998 }2010 }
1999 2011
@@ -2002,7 +2014,7 @@
2002 2014
2003 for (;;) {2015 for (;;) {
2004 len = RECV_SCAN_SIZE;2016 len = RECV_SCAN_SIZE;
2005@@ -3799,13 +3937,13 @@2017@@ -3808,13 +3946,13 @@
2006 fprintf(stderr,2018 fprintf(stderr,
2007 "InnoDB: Archive read starting at"2019 "InnoDB: Archive read starting at"
2008 " lsn %llu, len %lu from file %s\n",2020 " lsn %llu, len %lu from file %s\n",
@@ -2018,7 +2030,7 @@
2018 read_offset % UNIV_PAGE_SIZE, len, buf, NULL);2030 read_offset % UNIV_PAGE_SIZE, len, buf, NULL);
2019 2031
2020 ret = recv_scan_log_recs(2032 ret = recv_scan_log_recs(
2021@@ -3820,10 +3958,12 @@2033@@ -3829,10 +3967,12 @@
2022 }2034 }
2023 2035
2024 if (ret) {2036 if (ret) {
@@ -2035,7 +2047,7 @@
2035 return(TRUE);2047 return(TRUE);
2036 }2048 }
2037 2049
2038@@ -3840,26 +3980,18 @@2050@@ -3849,26 +3989,18 @@
2039 Recovers from archived log files, and also from log files, if they exist.2051 Recovers from archived log files, and also from log files, if they exist.
2040 @return error code or DB_SUCCESS */2052 @return error code or DB_SUCCESS */
2041 UNIV_INTERN2053 UNIV_INTERN
@@ -2064,7 +2076,7 @@
2064 2076
2065 recv_sys_create();2077 recv_sys_create();
2066 recv_sys_init(buf_pool_get_curr_size());2078 recv_sys_init(buf_pool_get_curr_size());
2067@@ -3889,7 +4021,7 @@2079@@ -3898,7 +4030,7 @@
2068 return(DB_ERROR);2080 return(DB_ERROR);
2069 }2081 }
2070 2082
@@ -2073,7 +2085,7 @@
2073 2085
2074 recv_sys->parse_start_lsn = min_flushed_lsn;2086 recv_sys->parse_start_lsn = min_flushed_lsn;
2075 2087
2076@@ -3903,7 +4035,8 @@2088@@ -3912,7 +4044,8 @@
2077 2089
2078 mutex_enter(&(log_sys->mutex));2090 mutex_enter(&(log_sys->mutex));
2079 2091
@@ -2083,7 +2095,7 @@
2083 ret = log_group_recover_from_archive_file(group);2095 ret = log_group_recover_from_archive_file(group);
2084 2096
2085 /* Close and truncate a possible processed archive file2097 /* Close and truncate a possible processed archive file
2086@@ -3916,9 +4049,9 @@2098@@ -3925,9 +4058,9 @@
2087 trunc_len);2099 trunc_len);
2088 }2100 }
2089 2101
@@ -2095,7 +2107,7 @@
2095 if (recv_sys->recovered_lsn < limit_lsn) {2107 if (recv_sys->recovered_lsn < limit_lsn) {
2096 2108
2097 if (!recv_sys->scanned_lsn) {2109 if (!recv_sys->scanned_lsn) {
2098@@ -3939,12 +4072,12 @@2110@@ -3948,12 +4081,12 @@
2099 2111
2100 mutex_enter(&(log_sys->mutex));2112 mutex_enter(&(log_sys->mutex));
2101 }2113 }
@@ -2155,7 +2167,7 @@
2155 }2167 }
2156--- a/storage/innobase/os/os0file.cc2168--- a/storage/innobase/os/os0file.cc
2157+++ b/storage/innobase/os/os0file.cc2169+++ b/storage/innobase/os/os0file.cc
2158@@ -686,7 +686,7 @@2170@@ -691,7 +691,7 @@
2159 }2171 }
2160 2172
2161 #undef USE_FILE_LOCK2173 #undef USE_FILE_LOCK
@@ -2164,7 +2176,7 @@
2164 #if defined(UNIV_HOTBACKUP) || defined(__WIN__)2176 #if defined(UNIV_HOTBACKUP) || defined(__WIN__)
2165 /* InnoDB Hot Backup does not lock the data files.2177 /* InnoDB Hot Backup does not lock the data files.
2166 * On Windows, mandatory locking is used.2178 * On Windows, mandatory locking is used.
2167@@ -1750,8 +1750,6 @@2179@@ -1755,8 +1755,6 @@
2168 2180
2169 } while (retry);2181 } while (retry);
2170 2182
@@ -2173,7 +2185,7 @@
2173 if (!srv_read_only_mode2185 if (!srv_read_only_mode
2174 && *success2186 && *success
2175 && type != OS_LOG_FILE2187 && type != OS_LOG_FILE
2176@@ -1759,6 +1757,11 @@2188@@ -1764,6 +1762,11 @@
2177 || srv_unix_file_flush_method == SRV_UNIX_O_DIRECT_NO_FSYNC)) {2189 || srv_unix_file_flush_method == SRV_UNIX_O_DIRECT_NO_FSYNC)) {
2178 2190
2179 os_file_set_nocache(file, name, mode_str);2191 os_file_set_nocache(file, name, mode_str);
@@ -2187,8 +2199,8 @@
2187 #ifdef USE_FILE_LOCK2199 #ifdef USE_FILE_LOCK
2188--- a/storage/innobase/page/page0cur.cc2200--- a/storage/innobase/page/page0cur.cc
2189+++ b/storage/innobase/page/page0cur.cc2201+++ b/storage/innobase/page/page0cur.cc
2190@@ -1207,7 +1207,9 @@2202@@ -1209,7 +1209,9 @@
2191 == index->id || mtr->inside_ibuf || recv_recovery_is_on());2203 || (mtr ? mtr->inside_ibuf : dict_index_is_ibuf(index)));
2192 2204
2193 ut_ad(!page_cur_is_after_last(cursor));2205 ut_ad(!page_cur_is_after_last(cursor));
2194-#ifdef UNIV_ZIP_DEBUG2206-#ifdef UNIV_ZIP_DEBUG
@@ -2254,7 +2266,7 @@
2254 2266
2255 /** io_handler_thread parameters for thread identification */2267 /** io_handler_thread parameters for thread identification */
2256 static ulint n[SRV_MAX_N_IO_THREADS + 6];2268 static ulint n[SRV_MAX_N_IO_THREADS + 6];
2257@@ -658,6 +659,12 @@2269@@ -663,6 +664,12 @@
2258 }2270 }
2259 }2271 }
2260 2272
@@ -2267,7 +2279,7 @@
2267 log_group_init(0, srv_n_log_files,2279 log_group_init(0, srv_n_log_files,
2268 srv_log_file_size * UNIV_PAGE_SIZE,2280 srv_log_file_size * UNIV_PAGE_SIZE,
2269 SRV_LOG_SPACE_FIRST_ID,2281 SRV_LOG_SPACE_FIRST_ID,
2270@@ -668,7 +675,12 @@2282@@ -673,7 +680,12 @@
2271 /* Create a log checkpoint. */2283 /* Create a log checkpoint. */
2272 mutex_enter(&log_sys->mutex);2284 mutex_enter(&log_sys->mutex);
2273 ut_d(recv_no_log_write = FALSE);2285 ut_d(recv_no_log_write = FALSE);
@@ -2281,7 +2293,7 @@
2281 mutex_exit(&log_sys->mutex);2293 mutex_exit(&log_sys->mutex);
2282 2294
2283 return(DB_SUCCESS);2295 return(DB_SUCCESS);
2284@@ -749,18 +761,12 @@2296@@ -754,18 +766,12 @@
2285 /*********************************************************************//**2297 /*********************************************************************//**
2286 Creates or opens database data files and closes them.2298 Creates or opens database data files and closes them.
2287 @return DB_SUCCESS or error code */2299 @return DB_SUCCESS or error code */
@@ -2301,8 +2313,20 @@
2301 lsn_t* min_flushed_lsn,/*!< out: min of flushed lsn2313 lsn_t* min_flushed_lsn,/*!< out: min of flushed lsn
2302 values in data files */2314 values in data files */
2303 lsn_t* max_flushed_lsn,/*!< out: max of flushed lsn2315 lsn_t* max_flushed_lsn,/*!< out: max of flushed lsn
2304@@ -982,9 +988,6 @@2316@@ -989,17 +995,16 @@
2305 skip_size_check:2317 /* This is the earliest location where we can load
2318 the double write buffer. */
2319 if (i == 0) {
2320- buf_dblwr_init_or_load_pages(
2321- files[i], srv_data_file_names[i], true);
2322+ /* XtraBackup never loads corrupted pages from
2323+ the doublewrite buffer */
2324+ buf_dblwr_init_or_load_pages(
2325+ files[i], srv_data_file_names[i], false);
2326 }
2327
2328 bool retry = true;
2329 check_first_page:
2306 check_msg = fil_read_first_page(2330 check_msg = fil_read_first_page(
2307 files[i], one_opened, &flags, &space,2331 files[i], one_opened, &flags, &space,
2308-#ifdef UNIV_LOG_ARCHIVE2332-#ifdef UNIV_LOG_ARCHIVE
@@ -2311,7 +2335,7 @@
2311 min_flushed_lsn, max_flushed_lsn);2335 min_flushed_lsn, max_flushed_lsn);
2312 2336
2313 if (check_msg) {2337 if (check_msg) {
2314@@ -1236,12 +1239,16 @@2338@@ -1267,12 +1272,16 @@
2315 /********************************************************************2339 /********************************************************************
2316 Opens the configured number of undo tablespaces.2340 Opens the configured number of undo tablespaces.
2317 @return DB_SUCCESS or error code */2341 @return DB_SUCCESS or error code */
@@ -2329,7 +2353,7 @@
2329 const ulint n_conf_tablespaces, /*!< in: configured undo2353 const ulint n_conf_tablespaces, /*!< in: configured undo
2330 tablespaces */2354 tablespaces */
2331 ulint* n_opened) /*!< out: number of UNDO2355 ulint* n_opened) /*!< out: number of UNDO
2332@@ -1257,6 +1264,7 @@2356@@ -1288,6 +1297,7 @@
2333 *n_opened = 0;2357 *n_opened = 0;
2334 2358
2335 ut_a(n_conf_tablespaces <= TRX_SYS_N_RSEGS);2359 ut_a(n_conf_tablespaces <= TRX_SYS_N_RSEGS);
@@ -2337,7 +2361,7 @@
2337 2361
2338 memset(undo_tablespace_ids, 0x0, sizeof(undo_tablespace_ids));2362 memset(undo_tablespace_ids, 0x0, sizeof(undo_tablespace_ids));
2339 2363
2340@@ -1290,12 +1298,13 @@2364@@ -1321,12 +1331,13 @@
2341 }2365 }
2342 }2366 }
2343 2367
@@ -2355,7 +2379,7 @@
2355 n_undo_tablespaces = trx_rseg_get_n_undo_tablespaces(2379 n_undo_tablespaces = trx_rseg_get_n_undo_tablespaces(
2356 undo_tablespace_ids);2380 undo_tablespace_ids);
2357 } else {2381 } else {
2358@@ -1401,7 +1410,7 @@2382@@ -1432,7 +1443,7 @@
2359 ib_logf(IB_LOG_LEVEL_INFO, "Opened %lu undo tablespaces",2383 ib_logf(IB_LOG_LEVEL_INFO, "Opened %lu undo tablespaces",
2360 n_undo_tablespaces);2384 n_undo_tablespaces);
2361 2385
@@ -2364,7 +2388,7 @@
2364 ib_logf(IB_LOG_LEVEL_WARN,2388 ib_logf(IB_LOG_LEVEL_WARN,
2365 "Using the system tablespace for all UNDO "2389 "Using the system tablespace for all UNDO "
2366 "logging because innodb_undo_tablespaces=0");2390 "logging because innodb_undo_tablespaces=0");
2367@@ -1475,8 +1484,8 @@2391@@ -1506,8 +1517,8 @@
2368 lsn_t min_flushed_lsn;2392 lsn_t min_flushed_lsn;
2369 lsn_t max_flushed_lsn;2393 lsn_t max_flushed_lsn;
2370 #ifdef UNIV_LOG_ARCHIVE2394 #ifdef UNIV_LOG_ARCHIVE
@@ -2375,7 +2399,7 @@
2375 #endif /* UNIV_LOG_ARCHIVE */2399 #endif /* UNIV_LOG_ARCHIVE */
2376 ulint sum_of_new_sizes;2400 ulint sum_of_new_sizes;
2377 ulint sum_of_data_file_sizes;2401 ulint sum_of_data_file_sizes;
2378@@ -1699,6 +1708,9 @@2402@@ -1740,6 +1751,9 @@
2379 } else if (0 == ut_strcmp(srv_file_flush_method_str, "O_DIRECT")) {2403 } else if (0 == ut_strcmp(srv_file_flush_method_str, "O_DIRECT")) {
2380 srv_unix_file_flush_method = SRV_UNIX_O_DIRECT;2404 srv_unix_file_flush_method = SRV_UNIX_O_DIRECT;
2381 2405
@@ -2385,7 +2409,7 @@
2385 } else if (0 == ut_strcmp(srv_file_flush_method_str, "O_DIRECT_NO_FSYNC")) {2409 } else if (0 == ut_strcmp(srv_file_flush_method_str, "O_DIRECT_NO_FSYNC")) {
2386 srv_unix_file_flush_method = SRV_UNIX_O_DIRECT_NO_FSYNC;2410 srv_unix_file_flush_method = SRV_UNIX_O_DIRECT_NO_FSYNC;
2387 2411
2388@@ -1931,17 +1943,6 @@2412@@ -1972,17 +1986,6 @@
2389 os_thread_create(io_handler_thread, n + i, thread_ids + i);2413 os_thread_create(io_handler_thread, n + i, thread_ids + i);
2390 }2414 }
2391 2415
@@ -2403,8 +2427,8 @@
2403 if (srv_n_log_files * srv_log_file_size * UNIV_PAGE_SIZE2427 if (srv_n_log_files * srv_log_file_size * UNIV_PAGE_SIZE
2404 >= 512ULL * 1024ULL * 1024ULL * 1024ULL) {2428 >= 512ULL * 1024ULL * 1024ULL * 1024ULL) {
2405 /* log_block_convert_lsn_to_no() limits the returned block2429 /* log_block_convert_lsn_to_no() limits the returned block
2406@@ -2000,9 +2001,6 @@2430@@ -2044,9 +2047,6 @@
2407 }2431 recv_sys_init(buf_pool_get_curr_size());
2408 2432
2409 err = open_or_create_data_files(&create_new_db,2433 err = open_or_create_data_files(&create_new_db,
2410-#ifdef UNIV_LOG_ARCHIVE2434-#ifdef UNIV_LOG_ARCHIVE
@@ -2413,7 +2437,7 @@
2413 &min_flushed_lsn, &max_flushed_lsn,2437 &min_flushed_lsn, &max_flushed_lsn,
2414 &sum_of_new_sizes);2438 &sum_of_new_sizes);
2415 if (err == DB_FAIL) {2439 if (err == DB_FAIL) {
2416@@ -2030,7 +2028,6 @@2440@@ -2074,7 +2074,6 @@
2417 2441
2418 #ifdef UNIV_LOG_ARCHIVE2442 #ifdef UNIV_LOG_ARCHIVE
2419 srv_normalize_path_for_win(srv_arch_dir);2443 srv_normalize_path_for_win(srv_arch_dir);
@@ -2421,7 +2445,7 @@
2421 #endif /* UNIV_LOG_ARCHIVE */2445 #endif /* UNIV_LOG_ARCHIVE */
2422 2446
2423 dirnamelen = strlen(srv_log_group_home_dir);2447 dirnamelen = strlen(srv_log_group_home_dir);
2424@@ -2110,15 +2107,23 @@2448@@ -2154,15 +2153,23 @@
2425 max_flushed_lsn, logfile0);2449 max_flushed_lsn, logfile0);
2426 2450
2427 /* Suppress the message about2451 /* Suppress the message about
@@ -2448,7 +2472,7 @@
2448 }2472 }
2449 2473
2450 /* opened all files */2474 /* opened all files */
2451@@ -2211,6 +2216,7 @@2475@@ -2255,6 +2262,7 @@
2452 2476
2453 err = srv_undo_tablespaces_init(2477 err = srv_undo_tablespaces_init(
2454 create_new_db,2478 create_new_db,
@@ -2456,7 +2480,7 @@
2456 srv_undo_tablespaces,2480 srv_undo_tablespaces,
2457 &srv_undo_tablespaces_open);2481 &srv_undo_tablespaces_open);
2458 2482
2459@@ -2284,10 +2290,13 @@2483@@ -2328,10 +2336,13 @@
2460 2484
2461 ib_logf(IB_LOG_LEVEL_INFO,2485 ib_logf(IB_LOG_LEVEL_INFO,
2462 " Starting archive recovery from a backup...");2486 " Starting archive recovery from a backup...");
@@ -2472,7 +2496,7 @@
2472 if (err != DB_SUCCESS) {2496 if (err != DB_SUCCESS) {
2473 2497
2474 return(DB_ERROR);2498 return(DB_ERROR);
2475@@ -2312,6 +2321,11 @@2499@@ -2356,6 +2367,11 @@
2476 srv_startup_is_before_trx_rollback_phase = FALSE;2500 srv_startup_is_before_trx_rollback_phase = FALSE;
2477 2501
2478 recv_recovery_from_archive_finish();2502 recv_recovery_from_archive_finish();
@@ -2484,7 +2508,7 @@
2484 #endif /* UNIV_LOG_ARCHIVE */2508 #endif /* UNIV_LOG_ARCHIVE */
2485 } else {2509 } else {
2486 2510
2487@@ -2378,6 +2392,10 @@2511@@ -2422,6 +2438,10 @@
2488 2512
2489 recv_recovery_from_checkpoint_finish();2513 recv_recovery_from_checkpoint_finish();
2490 2514
@@ -2495,7 +2519,7 @@
2495 if (srv_force_recovery < SRV_FORCE_NO_IBUF_MERGE) {2519 if (srv_force_recovery < SRV_FORCE_NO_IBUF_MERGE) {
2496 /* The following call is necessary for the insert2520 /* The following call is necessary for the insert
2497 buffer to work with multiple tablespaces. We must2521 buffer to work with multiple tablespaces. We must
2498@@ -2500,7 +2518,9 @@2522@@ -2544,7 +2564,9 @@
2499 value. Important to note that we can do it ONLY after2523 value. Important to note that we can do it ONLY after
2500 we have finished the recovery process so that the2524 we have finished the recovery process so that the
2501 image of TRX_SYS_PAGE_NO is not stale. */2525 image of TRX_SYS_PAGE_NO is not stale. */
@@ -2506,7 +2530,7 @@
2506 }2530 }
2507 2531
2508 if (!create_new_db && sum_of_new_sizes > 0) {2532 if (!create_new_db && sum_of_new_sizes > 0) {
2509@@ -2523,6 +2543,8 @@2533@@ -2567,6 +2589,8 @@
2510 if (!srv_log_archive_on) {2534 if (!srv_log_archive_on) {
2511 ut_a(DB_SUCCESS == log_archive_noarchivelog());2535 ut_a(DB_SUCCESS == log_archive_noarchivelog());
2512 } else {2536 } else {
@@ -2515,7 +2539,7 @@
2515 mutex_enter(&(log_sys->mutex));2539 mutex_enter(&(log_sys->mutex));
2516 2540
2517 start_archive = FALSE;2541 start_archive = FALSE;
2518@@ -2714,6 +2736,7 @@2542@@ -2758,6 +2782,7 @@
2519 && srv_auto_extend_last_data_file2543 && srv_auto_extend_last_data_file
2520 && sum_of_data_file_sizes < tablespace_size_in_header) {2544 && sum_of_data_file_sizes < tablespace_size_in_header) {
2521 2545
@@ -2523,7 +2547,7 @@
2523 ut_print_timestamp(stderr);2547 ut_print_timestamp(stderr);
2524 fprintf(stderr,2548 fprintf(stderr,
2525 " InnoDB: Error: tablespace size stored in header"2549 " InnoDB: Error: tablespace size stored in header"
2526@@ -2750,6 +2773,7 @@2550@@ -2794,6 +2819,7 @@
2527 2551
2528 return(DB_ERROR);2552 return(DB_ERROR);
2529 }2553 }
@@ -2531,7 +2555,7 @@
2531 }2555 }
2532 2556
2533 /* Check that os_fast_mutexes work as expected */2557 /* Check that os_fast_mutexes work as expected */
2534@@ -2774,6 +2798,10 @@2558@@ -2818,6 +2844,10 @@
2535 2559
2536 os_fast_mutex_free(&srv_os_test_mutex);2560 os_fast_mutex_free(&srv_os_test_mutex);
2537 2561
@@ -2542,7 +2566,7 @@
2542 if (srv_print_verbose_log) {2566 if (srv_print_verbose_log) {
2543 ib_logf(IB_LOG_LEVEL_INFO,2567 ib_logf(IB_LOG_LEVEL_INFO,
2544 "%s started; log sequence number " LSN_PF "",2568 "%s started; log sequence number " LSN_PF "",
2545@@ -2806,6 +2834,7 @@2569@@ -2850,6 +2880,7 @@
2546 fts_optimize_init();2570 fts_optimize_init();
2547 }2571 }
2548 2572
@@ -2550,7 +2574,7 @@
2550 srv_was_started = TRUE;2574 srv_was_started = TRUE;
2551 2575
2552 return(DB_SUCCESS);2576 return(DB_SUCCESS);
2553@@ -2861,7 +2890,7 @@2577@@ -2905,7 +2936,7 @@
2554 return(DB_SUCCESS);2578 return(DB_SUCCESS);
2555 }2579 }
2556 2580
@@ -2661,7 +2685,7 @@
2661 } else {2685 } else {
2662 fprintf(stderr,2686 fprintf(stderr,
2663 "InnoDB: Since innodb_force_recovery"2687 "InnoDB: Since innodb_force_recovery"
2664@@ -592,14 +592,13 @@2688@@ -599,14 +599,13 @@
2665 " was in the XA prepared state.\n", trx->id);2689 " was in the XA prepared state.\n", trx->id);
2666 2690
2667 if (srv_force_recovery == 0) {2691 if (srv_force_recovery == 0) {
@@ -2680,7 +2704,7 @@
2680 } else {2704 } else {
2681 fprintf(stderr,2705 fprintf(stderr,
2682 "InnoDB: Since innodb_force_recovery"2706 "InnoDB: Since innodb_force_recovery"
2683@@ -2206,7 +2208,8 @@2707@@ -2221,7 +2220,8 @@
2684 scenario where some undo generated by a transaction,2708 scenario where some undo generated by a transaction,
2685 has XA stuff, and other undo, generated by the same2709 has XA stuff, and other undo, generated by the same
2686 transaction, doesn't. */2710 transaction, doesn't. */
@@ -2708,3 +2732,43 @@
2708 /*********************************************************************//**2732 /*********************************************************************//**
2709 Wrapper around MySQL's copy_and_convert function.2733 Wrapper around MySQL's copy_and_convert function.
2710 @return number of bytes copied to 'to' */2734 @return number of bytes copied to 'to' */
2735--- a/sql/sql_yacc.yy
2736+++ b/sql/sql_yacc.yy
2737@@ -26,8 +26,6 @@
2738 ** The type will be void*, so it must be cast to (THD*) when used.
2739 ** Use the YYTHD macro for this.
2740 */
2741-#define YYPARSE_PARAM yythd
2742-#define YYLEX_PARAM yythd
2743 #define YYTHD ((THD *)yythd)
2744 #define YYLIP (& YYTHD->m_parser_state->m_lip)
2745 #define YYPS (& YYTHD->m_parser_state->m_yacc)
2746@@ -85,7 +83,7 @@
2747 ulong val= *(F); \
2748 if (my_yyoverflow((B), (D), &val)) \
2749 { \
2750- yyerror((char*) (A)); \
2751+ yyerror(yythd, (char*) (A)); \
2752 return 2; \
2753 } \
2754 else \
2755@@ -183,7 +181,7 @@
2756 to abort from the parser.
2757 */
2758
2759-void MYSQLerror(const char *s)
2760+void MYSQLerror(void *yythd, const char *s)
2761 {
2762 THD *thd= current_thd;
2763
2764@@ -1031,7 +1029,9 @@
2765 bool my_yyoverflow(short **a, YYSTYPE **b, ulong *yystacksize);
2766 %}
2767
2768-%pure_parser /* We have threads */
2769+%pure-parser /* We have threads */
2770+%parse-param { void *yythd }
2771+%lex-param { void *yythd }
2772 /*
2773 Currently there are 161 shift/reduce conflicts.
2774 We should not introduce new conflicts any more.
27112775
=== modified file 'utils/build.sh'
--- utils/build.sh 2014-01-16 08:56:59 +0000
+++ utils/build.sh 2014-04-28 14:58:04 +0000
@@ -4,7 +4,7 @@
44
5MYSQL_51_VERSION=5.1.735MYSQL_51_VERSION=5.1.73
6MYSQL_55_VERSION=5.5.356MYSQL_55_VERSION=5.5.35
7MYSQL_56_VERSION=5.6.157MYSQL_56_VERSION=5.6.17
8PS_51_VERSION=5.1.73-14.118PS_51_VERSION=5.1.73-14.11
9PS_55_VERSION=5.5.35-33.09PS_55_VERSION=5.5.35-33.0
1010
@@ -326,7 +326,7 @@
326 server_patch=innodb56.patch326 server_patch=innodb56.patch
327 innodb_name=innobase327 innodb_name=innobase
328 xtrabackup_target=5.6328 xtrabackup_target=5.6
329 server_tarball=mysql-5.6.15.tar.gz329 server_tarball=mysql-5.6.17.tar.gz
330 configure_cmd="cmake . \330 configure_cmd="cmake . \
331 -DWITH_INNOBASE_STORAGE_ENGINE=ON \331 -DWITH_INNOBASE_STORAGE_ENGINE=ON \
332 -DWITH_ZLIB=bundled \332 -DWITH_ZLIB=bundled \

Subscribers

People subscribed via source and target branches

to all changes: