Merge lp:~laurynas-biveinis/percona-server/BT-16274-bug1087202-1087218-5.1 into lp:percona-server/5.1

Proposed by Laurynas Biveinis
Status: Merged
Approved by: Laurynas Biveinis
Approved revision: no longer in the source branch.
Merged at revision: 511
Proposed branch: lp:~laurynas-biveinis/percona-server/BT-16274-bug1087202-1087218-5.1
Merge into: lp:percona-server/5.1
Diff against target: 158 lines (+40/-16)
6 files modified
Percona-Server/storage/innodb_plugin/handler/i_s.cc (+2/-2)
Percona-Server/storage/innodb_plugin/include/ut0ut.h (+9/-0)
Percona-Server/storage/innodb_plugin/include/ut0ut.ic (+13/-0)
Percona-Server/storage/innodb_plugin/log/log0log.c (+2/-2)
Percona-Server/storage/innodb_plugin/log/log0online.c (+10/-10)
Percona-Server/storage/innodb_plugin/os/os0file.c (+4/-2)
To merge this branch: bzr merge lp:~laurynas-biveinis/percona-server/BT-16274-bug1087202-1087218-5.1
Reviewer Review Type Date Requested Status
Stewart Smith (community) Approve
Laurynas Biveinis (community) Approve
Sergei Glushchenko g2 Pending
Review via email: mp+141939@code.launchpad.net

This proposal supersedes a proposal from 2012-12-07.

Description of the change

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

Approve

review: Approve (g2)
Revision history for this message
Stewart Smith (stewart) : Posted in a previous version of this proposal
review: Approve
Revision history for this message
Stewart Smith (stewart) wrote : Posted in a previous version of this proposal

http://jenkins.percona.com/view/Merge/job/merge-PS-5.1-kickoff/21/console

22:36:24 Text conflict in Percona-Server/storage/innodb_plugin/log/log0online.c

<<<<<<< TREE
        fprintf(stderr, "InnoDB: last tracked LSN is %llu, but the last "
                "checkpoint LSN is %llu. This might be due to a server "
                "crash or a very fast shutdown. ", last_tracked_lsn,
                tracking_start_lsn);
=======
        fprintf(stderr, "InnoDB: last tracked LSN in \'%s\' is %llu, but "
                "last checkpoint LSN is %llu. This might be due to a server "
                "crash or a very fast shutdown. ", log_bmp_sys->out_name,
                last_tracked_lsn, tracking_start_lsn);

        /* last_tracked_lsn might be < MIN_TRACKED_LSN in the case of empty
           bitmap file, handle this too. */
        last_tracked_lsn = ut_max_uint64(last_tracked_lsn, MIN_TRACKED_LSN);
>>>>>>> MERGE-SOURCE

review: Needs Fixing
Revision history for this message
Laurynas Biveinis (laurynas-biveinis) wrote :

Self-approving as this is a rebase of already-approved branch on the current 5.1 trunk.

review: Approve
Revision history for this message
Stewart Smith (stewart) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'Percona-Server/storage/innodb_plugin/handler/i_s.cc'
--- Percona-Server/storage/innodb_plugin/handler/i_s.cc 2012-11-25 09:29:43 +0000
+++ Percona-Server/storage/innodb_plugin/handler/i_s.cc 2013-01-04 15:33:29 +0000
@@ -3932,10 +3932,10 @@
3932 LOG_BITMAP_ITERATOR_PAGE_NUM(i));3932 LOG_BITMAP_ITERATOR_PAGE_NUM(i));
3933 /* START_LSN */3933 /* START_LSN */
3934 table->field[2]->store(3934 table->field[2]->store(
3935 LOG_BITMAP_ITERATOR_START_LSN(i));3935 LOG_BITMAP_ITERATOR_START_LSN(i), true);
3936 /* END_LSN */3936 /* END_LSN */
3937 table->field[3]->store(3937 table->field[3]->store(
3938 LOG_BITMAP_ITERATOR_END_LSN(i));3938 LOG_BITMAP_ITERATOR_END_LSN(i), true);
39393939
3940 /*3940 /*
3941 I_S tables are in-memory tables. If bitmap file is big enough3941 I_S tables are in-memory tables. If bitmap file is big enough
39423942
=== modified file 'Percona-Server/storage/innodb_plugin/include/ut0ut.h'
--- Percona-Server/storage/innodb_plugin/include/ut0ut.h 2009-09-15 10:26:01 +0000
+++ Percona-Server/storage/innodb_plugin/include/ut0ut.h 2013-01-04 15:33:29 +0000
@@ -120,6 +120,15 @@
120/*===*/120/*===*/
121 ulint n1, /*!< in: first number */121 ulint n1, /*!< in: first number */
122 ulint n2); /*!< in: second number */122 ulint n2); /*!< in: second number */
123/******************************************************//**
124Calculates the maximum of two ib_uint64_t values.
125@return the maximum */
126UNIV_INLINE
127ib_uint64_t
128ut_max_uint64(
129/*==========*/
130 ib_uint64_t n1, /*!< in: first number */
131 ib_uint64_t n2); /*!< in: second number */
123/****************************************************************//**132/****************************************************************//**
124Calculates minimum of two ulint-pairs. */133Calculates minimum of two ulint-pairs. */
125UNIV_INLINE134UNIV_INLINE
126135
=== modified file 'Percona-Server/storage/innodb_plugin/include/ut0ut.ic'
--- Percona-Server/storage/innodb_plugin/include/ut0ut.ic 2009-05-25 09:52:29 +0000
+++ Percona-Server/storage/innodb_plugin/include/ut0ut.ic 2013-01-04 15:33:29 +0000
@@ -49,6 +49,19 @@
49 return((n1 <= n2) ? n2 : n1);49 return((n1 <= n2) ? n2 : n1);
50}50}
5151
52/******************************************************//**
53Calculates the maximum of two ib_uint64_t values.
54@return the maximum */
55UNIV_INLINE
56ib_uint64_t
57ut_max_uint64(
58/*==========*/
59 ib_uint64_t n1, /*!< in: first number */
60 ib_uint64_t n2) /*!< in: second number */
61{
62 return((n1 <= n2) ? n2 : n1);
63}
64
52/****************************************************************//**65/****************************************************************//**
53Calculates minimum of two ulint-pairs. */66Calculates minimum of two ulint-pairs. */
54UNIV_INLINE67UNIV_INLINE
5568
=== modified file 'Percona-Server/storage/innodb_plugin/log/log0log.c'
--- Percona-Server/storage/innodb_plugin/log/log0log.c 2012-06-14 09:16:03 +0000
+++ Percona-Server/storage/innodb_plugin/log/log0log.c 2013-01-04 15:33:29 +0000
@@ -233,7 +233,7 @@
233 checked for the already-written log. */233 checked for the already-written log. */
234{234{
235 ib_uint64_t tracked_lsn;235 ib_uint64_t tracked_lsn;
236 ulint tracked_lsn_age;236 ib_uint64_t tracked_lsn_age;
237237
238 if (!srv_track_changed_pages) {238 if (!srv_track_changed_pages) {
239 return FALSE;239 return FALSE;
@@ -445,7 +445,7 @@
445 ib_uint64_t oldest_lsn;445 ib_uint64_t oldest_lsn;
446 ib_uint64_t lsn;446 ib_uint64_t lsn;
447 ib_uint64_t tracked_lsn;447 ib_uint64_t tracked_lsn;
448 ulint tracked_lsn_age;448 ib_uint64_t tracked_lsn_age;
449 log_t* log = log_sys;449 log_t* log = log_sys;
450 ib_uint64_t checkpoint_age;450 ib_uint64_t checkpoint_age;
451451
452452
=== modified file 'Percona-Server/storage/innodb_plugin/log/log0online.c'
--- Percona-Server/storage/innodb_plugin/log/log0online.c 2012-11-25 09:29:43 +0000
+++ Percona-Server/storage/innodb_plugin/log/log0online.c 2013-01-04 15:33:29 +0000
@@ -401,7 +401,7 @@
401{401{
402 /* last_tracked_lsn might be < MIN_TRACKED_LSN in the case of empty402 /* last_tracked_lsn might be < MIN_TRACKED_LSN in the case of empty
403 bitmap file, handle this too. */403 bitmap file, handle this too. */
404 last_tracked_lsn = ut_max(last_tracked_lsn, MIN_TRACKED_LSN);404 last_tracked_lsn = ut_max_uint64(last_tracked_lsn, MIN_TRACKED_LSN);
405405
406 if (last_tracked_lsn > tracking_start_lsn) {406 if (last_tracked_lsn > tracking_start_lsn) {
407 fprintf(stderr,407 fprintf(stderr,
@@ -431,10 +431,10 @@
431{431{
432 ut_ad(last_tracked_lsn != tracking_start_lsn);432 ut_ad(last_tracked_lsn != tracking_start_lsn);
433433
434 fprintf(stderr, "InnoDB: last tracked LSN is %llu, but the last "434 fprintf(stderr, "InnoDB: last tracked LSN in \'%s\' is %llu, but the "
435 "checkpoint LSN is %llu. This might be due to a server "435 "last checkpoint LSN is %llu. This might be due to a server "
436 "crash or a very fast shutdown. ", last_tracked_lsn,436 "crash or a very fast shutdown. ", log_bmp_sys->out.name,
437 tracking_start_lsn);437 last_tracked_lsn, tracking_start_lsn);
438438
439 /* See if we can fully recover the missing interval */439 /* See if we can fully recover the missing interval */
440 if (log_online_can_track_missing(last_tracked_lsn,440 if (log_online_can_track_missing(last_tracked_lsn,
@@ -443,8 +443,8 @@
443 fprintf(stderr,443 fprintf(stderr,
444 "Reading the log to advance the last tracked LSN.\n");444 "Reading the log to advance the last tracked LSN.\n");
445445
446 log_bmp_sys->start_lsn = ut_max(last_tracked_lsn,446 log_bmp_sys->start_lsn = ut_max_uint64(last_tracked_lsn,
447 MIN_TRACKED_LSN);447 MIN_TRACKED_LSN);
448 log_set_tracked_lsn(log_bmp_sys->start_lsn);448 log_set_tracked_lsn(log_bmp_sys->start_lsn);
449 log_online_follow_redo_log();449 log_online_follow_redo_log();
450 ut_ad(log_bmp_sys->end_lsn >= tracking_start_lsn);450 ut_ad(log_bmp_sys->end_lsn >= tracking_start_lsn);
@@ -560,7 +560,7 @@
560{560{
561 ibool success;561 ibool success;
562 ib_uint64_t tracking_start_lsn562 ib_uint64_t tracking_start_lsn
563 = ut_max(log_sys->last_checkpoint_lsn, MIN_TRACKED_LSN);563 = ut_max_uint64(log_sys->last_checkpoint_lsn, MIN_TRACKED_LSN);
564 os_file_dir_t bitmap_dir;564 os_file_dir_t bitmap_dir;
565 os_file_stat_t bitmap_dir_file_info;565 os_file_stat_t bitmap_dir_file_info;
566 ib_uint64_t last_file_start_lsn = MIN_TRACKED_LSN;566 ib_uint64_t last_file_start_lsn = MIN_TRACKED_LSN;
@@ -931,8 +931,8 @@
931 /* The next parse LSN is inside the current block, skip931 /* The next parse LSN is inside the current block, skip
932 data preceding it. */932 data preceding it. */
933 skip_already_parsed_len933 skip_already_parsed_len
934 = log_bmp_sys->next_parse_lsn934 = (ulint)(log_bmp_sys->next_parse_lsn
935 - block_start_lsn;935 - block_start_lsn);
936 }936 }
937 else {937 else {
938938
939939
=== modified file 'Percona-Server/storage/innodb_plugin/os/os0file.c'
--- Percona-Server/storage/innodb_plugin/os/os0file.c 2012-06-14 09:16:03 +0000
+++ Percona-Server/storage/innodb_plugin/os/os0file.c 2013-01-04 15:33:29 +0000
@@ -1949,8 +1949,10 @@
1949 ib_uint64_t new_len)/*!< in: new file length */1949 ib_uint64_t new_len)/*!< in: new file length */
1950{1950{
1951#ifdef __WIN__1951#ifdef __WIN__
1952 /* TODO: untested! */1952 LARGE_INTEGER li, li2;
1953 return(!_chsize_s(file, new_len));1953 li.QuadPart = new_len;
1954 return(SetFilePointerEx(file, li, &li2,FILE_BEGIN)
1955 && SetEndOfFile(file));
1954#else1956#else
1955 /* TODO: works only with -D_FILE_OFFSET_BITS=64 ? */1957 /* TODO: works only with -D_FILE_OFFSET_BITS=64 ? */
1956 return(!ftruncate(file, new_len));1958 return(!ftruncate(file, new_len));

Subscribers

People subscribed via source and target branches