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

Proposed by Laurynas Biveinis
Status: Merged
Approved by: Stewart Smith
Approved revision: no longer in the source branch.
Merged at revision: 383
Proposed branch: lp:~laurynas-biveinis/percona-server/BT-16274-bug1087202-1087218-5.5
Merge into: lp:percona-server/5.5
Diff against target: 143 lines (+36/-12)
6 files modified
Percona-Server/storage/innobase/handler/i_s.cc (+2/-2)
Percona-Server/storage/innobase/include/ut0ut.h (+9/-0)
Percona-Server/storage/innobase/include/ut0ut.ic (+13/-0)
Percona-Server/storage/innobase/log/log0log.c (+2/-2)
Percona-Server/storage/innobase/log/log0online.c (+6/-6)
Percona-Server/storage/innobase/os/os0file.c (+4/-2)
To merge this branch: bzr merge lp:~laurynas-biveinis/percona-server/BT-16274-bug1087202-1087218-5.5
Reviewer Review Type Date Requested Status
Stewart Smith (community) Approve
Sergei Glushchenko (community) g2 Approve
Review via email: mp+138731@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)
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/innobase/handler/i_s.cc'
--- Percona-Server/storage/innobase/handler/i_s.cc 2012-11-25 09:30:58 +0000
+++ Percona-Server/storage/innobase/handler/i_s.cc 2012-12-07 13:35:37 +0000
@@ -7532,10 +7532,10 @@
7532 LOG_BITMAP_ITERATOR_PAGE_NUM(i));7532 LOG_BITMAP_ITERATOR_PAGE_NUM(i));
7533 /* START_LSN */7533 /* START_LSN */
7534 table->field[2]->store(7534 table->field[2]->store(
7535 LOG_BITMAP_ITERATOR_START_LSN(i));7535 LOG_BITMAP_ITERATOR_START_LSN(i), true);
7536 /* END_LSN */7536 /* END_LSN */
7537 table->field[3]->store(7537 table->field[3]->store(
7538 LOG_BITMAP_ITERATOR_END_LSN(i));7538 LOG_BITMAP_ITERATOR_END_LSN(i), true);
75397539
7540 /*7540 /*
7541 I_S tables are in-memory tables. If bitmap file is big enough7541 I_S tables are in-memory tables. If bitmap file is big enough
75427542
=== modified file 'Percona-Server/storage/innobase/include/ut0ut.h'
--- Percona-Server/storage/innobase/include/ut0ut.h 2011-04-06 06:22:36 +0000
+++ Percona-Server/storage/innobase/include/ut0ut.h 2012-12-07 13:35:37 +0000
@@ -122,6 +122,15 @@
122/*===*/122/*===*/
123 ulint n1, /*!< in: first number */123 ulint n1, /*!< in: first number */
124 ulint n2); /*!< in: second number */124 ulint n2); /*!< in: second number */
125/******************************************************//**
126Calculates the maximum of two ib_uint64_t values.
127@return the maximum */
128UNIV_INLINE
129ib_uint64_t
130ut_max_uint64(
131/*==========*/
132 ib_uint64_t n1, /*!< in: first number */
133 ib_uint64_t n2); /*!< in: second number */
125/****************************************************************//**134/****************************************************************//**
126Calculates minimum of two ulint-pairs. */135Calculates minimum of two ulint-pairs. */
127UNIV_INLINE136UNIV_INLINE
128137
=== modified file 'Percona-Server/storage/innobase/include/ut0ut.ic'
--- Percona-Server/storage/innobase/include/ut0ut.ic 2010-06-22 15:58:28 +0000
+++ Percona-Server/storage/innobase/include/ut0ut.ic 2012-12-07 13:35:37 +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/innobase/log/log0log.c'
--- Percona-Server/storage/innobase/log/log0log.c 2012-08-22 07:21:28 +0000
+++ Percona-Server/storage/innobase/log/log0log.c 2012-12-07 13:35:37 +0000
@@ -246,7 +246,7 @@
246 checked for the already-written log. */246 checked for the already-written log. */
247{247{
248 ib_uint64_t tracked_lsn;248 ib_uint64_t tracked_lsn;
249 ulint tracked_lsn_age;249 ib_uint64_t tracked_lsn_age;
250250
251 if (!srv_track_changed_pages) {251 if (!srv_track_changed_pages) {
252 return FALSE;252 return FALSE;
@@ -458,7 +458,7 @@
458 ib_uint64_t oldest_lsn;458 ib_uint64_t oldest_lsn;
459 ib_uint64_t lsn;459 ib_uint64_t lsn;
460 ib_uint64_t tracked_lsn;460 ib_uint64_t tracked_lsn;
461 ulint tracked_lsn_age;461 ib_uint64_t tracked_lsn_age;
462 log_t* log = log_sys;462 log_t* log = log_sys;
463 ib_uint64_t checkpoint_age;463 ib_uint64_t checkpoint_age;
464464
465465
=== modified file 'Percona-Server/storage/innobase/log/log0online.c'
--- Percona-Server/storage/innobase/log/log0online.c 2012-11-25 09:30:58 +0000
+++ Percona-Server/storage/innobase/log/log0online.c 2012-12-07 13:35:37 +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,
@@ -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);
@@ -561,7 +561,7 @@
561{561{
562 ibool success;562 ibool success;
563 ib_uint64_t tracking_start_lsn563 ib_uint64_t tracking_start_lsn
564 = ut_max(log_sys->last_checkpoint_lsn, MIN_TRACKED_LSN);564 = ut_max_uint64(log_sys->last_checkpoint_lsn, MIN_TRACKED_LSN);
565 os_file_dir_t bitmap_dir;565 os_file_dir_t bitmap_dir;
566 os_file_stat_t bitmap_dir_file_info;566 os_file_stat_t bitmap_dir_file_info;
567 ib_uint64_t last_file_start_lsn = MIN_TRACKED_LSN;567 ib_uint64_t last_file_start_lsn = MIN_TRACKED_LSN;
@@ -932,8 +932,8 @@
932 /* The next parse LSN is inside the current block, skip932 /* The next parse LSN is inside the current block, skip
933 data preceding it. */933 data preceding it. */
934 skip_already_parsed_len934 skip_already_parsed_len
935 = log_bmp_sys->next_parse_lsn935 = (ulint)(log_bmp_sys->next_parse_lsn
936 - block_start_lsn;936 - block_start_lsn);
937 }937 }
938 else {938 else {
939939
940940
=== modified file 'Percona-Server/storage/innobase/os/os0file.c'
--- Percona-Server/storage/innobase/os/os0file.c 2012-08-22 07:21:28 +0000
+++ Percona-Server/storage/innobase/os/os0file.c 2012-12-07 13:35:37 +0000
@@ -2057,8 +2057,10 @@
2057 ib_uint64_t new_len)/*!< in: new file length */2057 ib_uint64_t new_len)/*!< in: new file length */
2058{2058{
2059#ifdef __WIN__2059#ifdef __WIN__
2060 /* TODO: untested! */2060 LARGE_INTEGER li, li2;
2061 return(!_chsize_s(file, new_len));2061 li.QuadPart = new_len;
2062 return(SetFilePointerEx(file, li, &li2,FILE_BEGIN)
2063 && SetEndOfFile(file));
2062#else2064#else
2063 /* TODO: works only with -D_FILE_OFFSET_BITS=64 ? */2065 /* TODO: works only with -D_FILE_OFFSET_BITS=64 ? */
2064 return(!ftruncate(file, new_len));2066 return(!ftruncate(file, new_len));

Subscribers

People subscribed via source and target branches