Merge lp:~tsarev/percona-server/18205_01_mysqlbinlog_fix.patch into lp:percona-server/rnt-5.1

Proposed by Oleg Tsarev
Status: Merged
Approved by: Laurynas Biveinis
Approved revision: no longer in the source branch.
Merged at revision: 209
Proposed branch: lp:~tsarev/percona-server/18205_01_mysqlbinlog_fix.patch
Merge into: lp:percona-server/rnt-5.1
Diff against target: 32 lines (+6/-4)
1 file modified
patches/mysqlbinlog_fix.patch (+6/-4)
To merge this branch: bzr merge lp:~tsarev/percona-server/18205_01_mysqlbinlog_fix.patch
Reviewer Review Type Date Requested Status
Laurynas Biveinis (community) Approve
Review via email: mp+90834@code.launchpad.net

This proposal supersedes a proposal from 2012-01-31.

Description of the change

fix code policy in mysqlbinlog_fix.patch

(issue 18205 - prepare lp:percona-server/rnt-5.1 patches to merge to lp:percona-server/5.1)

after merge this fix to lp:percona-server/rnt-5.1 I will propose for merge it to lp:percona-server/5.1

To post a comment you must log in.
Revision history for this message
Laurynas Biveinis (laurynas-biveinis) wrote : Posted in a previous version of this proposal

Is the

32 + if (mysql)
33 ++ {
34 + mysql_close(mysql);
35 ++ }

change necessary?

The coding standards say

"After if or else or while, when there is only one instruction after the condition, braces are not necessary and the instruction goes on the next line, indented. "

review: Needs Information
Revision history for this message
Laurynas Biveinis (laurynas-biveinis) wrote : Posted in a previous version of this proposal

And they also say

"if, while, etc *must* always have braces. "

So, a self-contradiction. The change looks good to me, then.

review: Approve
Revision history for this message
Alexey Kopytov (akopytov) wrote : Posted in a previous version of this proposal

The "must" part is from the NDB guidelines. So those changes are not necessary in the server.

Revision history for this message
Laurynas Biveinis (laurynas-biveinis) wrote : Posted in a previous version of this proposal

Thanks Alexey.

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

LGTM, thank you.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'patches/mysqlbinlog_fix.patch'
2--- patches/mysqlbinlog_fix.patch 2011-11-17 12:41:18 +0000
3+++ patches/mysqlbinlog_fix.patch 2012-01-31 07:53:24 +0000
4@@ -7,7 +7,7 @@
5 # should be done or reviewed by the maintainer!
6 --- a/client/mysqlbinlog.cc
7 +++ b/client/mysqlbinlog.cc
8-@@ -741,9 +741,17 @@
9+@@ -741,9 +741,19 @@
10
11 switch (ev_type) {
12 case QUERY_EVENT:
13@@ -21,14 +21,16 @@
14 + }
15 + else
16 + {
17-+ // In case the event for one of these statements is obtained
18-+ // from binary log 5.0, make it compatible with 5.1
19++ /*
20++ In case the event for one of these statements is obtained
21++ from binary log 5.0, make it compatible with 5.1.
22++ */
23 + ev->flags|= LOG_EVENT_SUPPRESS_USE_F;
24 + }
25 if (opt_base64_output_mode == BASE64_OUTPUT_ALWAYS)
26 {
27 if ((retval= write_event_header_and_base64(ev, result_file,
28-@@ -1391,6 +1399,10 @@
29+@@ -1391,6 +1401,10 @@
30 */
31 static Exit_status safe_connect()
32 {

Subscribers

People subscribed via source and target branches