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
1=== modified file 'Percona-Server/storage/innodb_plugin/handler/i_s.cc'
2--- Percona-Server/storage/innodb_plugin/handler/i_s.cc 2012-11-25 09:29:43 +0000
3+++ Percona-Server/storage/innodb_plugin/handler/i_s.cc 2013-01-04 15:33:29 +0000
4@@ -3932,10 +3932,10 @@
5 LOG_BITMAP_ITERATOR_PAGE_NUM(i));
6 /* START_LSN */
7 table->field[2]->store(
8- LOG_BITMAP_ITERATOR_START_LSN(i));
9+ LOG_BITMAP_ITERATOR_START_LSN(i), true);
10 /* END_LSN */
11 table->field[3]->store(
12- LOG_BITMAP_ITERATOR_END_LSN(i));
13+ LOG_BITMAP_ITERATOR_END_LSN(i), true);
14
15 /*
16 I_S tables are in-memory tables. If bitmap file is big enough
17
18=== modified file 'Percona-Server/storage/innodb_plugin/include/ut0ut.h'
19--- Percona-Server/storage/innodb_plugin/include/ut0ut.h 2009-09-15 10:26:01 +0000
20+++ Percona-Server/storage/innodb_plugin/include/ut0ut.h 2013-01-04 15:33:29 +0000
21@@ -120,6 +120,15 @@
22 /*===*/
23 ulint n1, /*!< in: first number */
24 ulint n2); /*!< in: second number */
25+/******************************************************//**
26+Calculates the maximum of two ib_uint64_t values.
27+@return the maximum */
28+UNIV_INLINE
29+ib_uint64_t
30+ut_max_uint64(
31+/*==========*/
32+ ib_uint64_t n1, /*!< in: first number */
33+ ib_uint64_t n2); /*!< in: second number */
34 /****************************************************************//**
35 Calculates minimum of two ulint-pairs. */
36 UNIV_INLINE
37
38=== modified file 'Percona-Server/storage/innodb_plugin/include/ut0ut.ic'
39--- Percona-Server/storage/innodb_plugin/include/ut0ut.ic 2009-05-25 09:52:29 +0000
40+++ Percona-Server/storage/innodb_plugin/include/ut0ut.ic 2013-01-04 15:33:29 +0000
41@@ -49,6 +49,19 @@
42 return((n1 <= n2) ? n2 : n1);
43 }
44
45+/******************************************************//**
46+Calculates the maximum of two ib_uint64_t values.
47+@return the maximum */
48+UNIV_INLINE
49+ib_uint64_t
50+ut_max_uint64(
51+/*==========*/
52+ ib_uint64_t n1, /*!< in: first number */
53+ ib_uint64_t n2) /*!< in: second number */
54+{
55+ return((n1 <= n2) ? n2 : n1);
56+}
57+
58 /****************************************************************//**
59 Calculates minimum of two ulint-pairs. */
60 UNIV_INLINE
61
62=== modified file 'Percona-Server/storage/innodb_plugin/log/log0log.c'
63--- Percona-Server/storage/innodb_plugin/log/log0log.c 2012-06-14 09:16:03 +0000
64+++ Percona-Server/storage/innodb_plugin/log/log0log.c 2013-01-04 15:33:29 +0000
65@@ -233,7 +233,7 @@
66 checked for the already-written log. */
67 {
68 ib_uint64_t tracked_lsn;
69- ulint tracked_lsn_age;
70+ ib_uint64_t tracked_lsn_age;
71
72 if (!srv_track_changed_pages) {
73 return FALSE;
74@@ -445,7 +445,7 @@
75 ib_uint64_t oldest_lsn;
76 ib_uint64_t lsn;
77 ib_uint64_t tracked_lsn;
78- ulint tracked_lsn_age;
79+ ib_uint64_t tracked_lsn_age;
80 log_t* log = log_sys;
81 ib_uint64_t checkpoint_age;
82
83
84=== modified file 'Percona-Server/storage/innodb_plugin/log/log0online.c'
85--- Percona-Server/storage/innodb_plugin/log/log0online.c 2012-11-25 09:29:43 +0000
86+++ Percona-Server/storage/innodb_plugin/log/log0online.c 2013-01-04 15:33:29 +0000
87@@ -401,7 +401,7 @@
88 {
89 /* last_tracked_lsn might be < MIN_TRACKED_LSN in the case of empty
90 bitmap file, handle this too. */
91- last_tracked_lsn = ut_max(last_tracked_lsn, MIN_TRACKED_LSN);
92+ last_tracked_lsn = ut_max_uint64(last_tracked_lsn, MIN_TRACKED_LSN);
93
94 if (last_tracked_lsn > tracking_start_lsn) {
95 fprintf(stderr,
96@@ -431,10 +431,10 @@
97 {
98 ut_ad(last_tracked_lsn != tracking_start_lsn);
99
100- fprintf(stderr, "InnoDB: last tracked LSN is %llu, but the last "
101- "checkpoint LSN is %llu. This might be due to a server "
102- "crash or a very fast shutdown. ", last_tracked_lsn,
103- tracking_start_lsn);
104+ fprintf(stderr, "InnoDB: last tracked LSN in \'%s\' is %llu, but the "
105+ "last checkpoint LSN is %llu. This might be due to a server "
106+ "crash or a very fast shutdown. ", log_bmp_sys->out.name,
107+ last_tracked_lsn, tracking_start_lsn);
108
109 /* See if we can fully recover the missing interval */
110 if (log_online_can_track_missing(last_tracked_lsn,
111@@ -443,8 +443,8 @@
112 fprintf(stderr,
113 "Reading the log to advance the last tracked LSN.\n");
114
115- log_bmp_sys->start_lsn = ut_max(last_tracked_lsn,
116- MIN_TRACKED_LSN);
117+ log_bmp_sys->start_lsn = ut_max_uint64(last_tracked_lsn,
118+ MIN_TRACKED_LSN);
119 log_set_tracked_lsn(log_bmp_sys->start_lsn);
120 log_online_follow_redo_log();
121 ut_ad(log_bmp_sys->end_lsn >= tracking_start_lsn);
122@@ -560,7 +560,7 @@
123 {
124 ibool success;
125 ib_uint64_t tracking_start_lsn
126- = ut_max(log_sys->last_checkpoint_lsn, MIN_TRACKED_LSN);
127+ = ut_max_uint64(log_sys->last_checkpoint_lsn, MIN_TRACKED_LSN);
128 os_file_dir_t bitmap_dir;
129 os_file_stat_t bitmap_dir_file_info;
130 ib_uint64_t last_file_start_lsn = MIN_TRACKED_LSN;
131@@ -931,8 +931,8 @@
132 /* The next parse LSN is inside the current block, skip
133 data preceding it. */
134 skip_already_parsed_len
135- = log_bmp_sys->next_parse_lsn
136- - block_start_lsn;
137+ = (ulint)(log_bmp_sys->next_parse_lsn
138+ - block_start_lsn);
139 }
140 else {
141
142
143=== modified file 'Percona-Server/storage/innodb_plugin/os/os0file.c'
144--- Percona-Server/storage/innodb_plugin/os/os0file.c 2012-06-14 09:16:03 +0000
145+++ Percona-Server/storage/innodb_plugin/os/os0file.c 2013-01-04 15:33:29 +0000
146@@ -1949,8 +1949,10 @@
147 ib_uint64_t new_len)/*!< in: new file length */
148 {
149 #ifdef __WIN__
150- /* TODO: untested! */
151- return(!_chsize_s(file, new_len));
152+ LARGE_INTEGER li, li2;
153+ li.QuadPart = new_len;
154+ return(SetFilePointerEx(file, li, &li2,FILE_BEGIN)
155+ && SetEndOfFile(file));
156 #else
157 /* TODO: works only with -D_FILE_OFFSET_BITS=64 ? */
158 return(!ftruncate(file, new_len));

Subscribers

People subscribed via source and target branches