Merge lp:~percona-core/percona-xtradb-cluster/bug-1402166 into lp:percona-xtradb-cluster

Proposed by Raghavendra D Prabhu
Status: Work in progress
Proposed branch: lp:~percona-core/percona-xtradb-cluster/bug-1402166
Merge into: lp:percona-xtradb-cluster
Diff against target: 19 lines (+5/-2)
1 file modified
sql/wsrep_sst.cc (+5/-2)
To merge this branch: bzr merge lp:~percona-core/percona-xtradb-cluster/bug-1402166
Reviewer Review Type Date Requested Status
Alexey Kopytov (community) Needs Fixing
Review via email: mp+245518@code.launchpad.net
To post a comment you must log in.
Revision history for this message
Alexey Kopytov (akopytov) wrote :

Shouldn't the code be rewritten as follows:

    if (!tmp || proc.error())
    {
      WSREP_ERROR("Failed to read uuid:seqno from joiner script.");
      if (proc.error())
        err = proc.error();
    }
    else
    {
      err= sst_scan_uuid_seqno (out, &ret_uuid, &ret_seqno);
    }

review: Needs Information
Revision history for this message
Raghavendra D Prabhu (raghavendra-prabhu) wrote :

Fixed.

Revision history for this message
Alexey Kopytov (akopytov) wrote :

1. if tmp == NULL, but proc.error() returns 0, you will overwrite 'err' with 0. Which is wrong.
2. the MySQL coding stile is 'var= val' (note the space after var)
3. please use my_strerror() instead of strerror().

review: Needs Fixing
Revision history for this message
Raghavendra D Prabhu (raghavendra-prabhu) wrote :

This will be resubmitted with fixes for issue mentioned above, as a separate pull request. (which I will mention here).

Unmerged revisions

947. By Raghavendra D Prabhu

Refactored the code for more clarity

946. By Raghavendra D Prabhu

Bug#1402166 Fix typo

945. By Raghavendra D Prabhu

Bug#1402166 Check for proc.error() in wsrep_joiner_thread in case the SST script aborts

944. By Alexey Kopytov

Merged lp:~akopytov/percona-xtradb-cluster/bug1382797-5.6.

943. By Raghavendra D Prabhu

Fix the syntax

942. By Raghavendra D Prabhu

Update for backup locks

941. By Raghavendra D Prabhu

Update documentation

940. By Raghavendra D Prabhu

Bug#1396757 Exit early in case mysqld was killed prematurely

939. By Hrvoje Matijakovic

Merged lp:~hrvojem/percona-xtradb-cluster/rn-5.6.21-25.8

938. By Raghavendra D Prabhu

Bump the PERCONA_INNODB_VERSION version

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'sql/wsrep_sst.cc'
--- sql/wsrep_sst.cc 2015-01-20 11:34:18 +0000
+++ sql/wsrep_sst.cc 2015-01-27 11:28:30 +0000
@@ -409,10 +409,13 @@
409 proc.wait();409 proc.wait();
410 err= EINVAL;410 err= EINVAL;
411411
412 if (!tmp)412 if (!tmp || proc.error())
413 {413 {
414 WSREP_ERROR("Failed to read uuid:seqno from joiner script.");414 WSREP_ERROR("Failed to read uuid:seqno from joiner script.");
415 if (proc.error()) err = proc.error();415 if ((err=proc.error()))
416 {
417 WSREP_ERROR("SST script aborted with error %d (%s)", err, strerror(err));
418 }
416 }419 }
417 else420 else
418 {421 {

Subscribers

People subscribed via source and target branches

to all changes: