List:Commits« Previous MessageNext Message »
From:Jan Wedvik Date:June 26 2012 12:26pm
Subject:bzr push into mysql-5.1-telco-6.3 branch (jan.wedvik:3477 to 3478)
View as plain text  
 3478 Jan Wedvik	2012-06-26
      Fixing Windows build break.

    modified:
      storage/ndb/test/ndbapi/testScan.cpp
 3477 Jan Wedvik	2012-06-26
      Patch updated according to suggestions from Magnus Blåudd and Fraqzer Clement.
      
      This is a fix for bug#11748194 "TRANSACTION OBJECT CREATED AND UNRELEASED BY 
      EXTRA CALL TO NEXTRESULT()".
      
      This bug had the following effect: If an API application tried calling 
      NdbScanOperation::nextResult() once more when the previous call had retuned
      end-of-file (return code 1), the api would leak a transaction object.
      
      This commit fixes that problem. Ndb::closeTransaction() will now put the
      extra transaction object associated with the scan back in the idle list
      for the right TC node.
      
      Also, calling NdbScanOperation::nextResult() once too much will now set
      a proper error code (4210), instead of the undefined code -1.
      
      Finally, this commit adds a regression test that will trigger the bug if the
      bugfix is not applied.

    modified:
      storage/ndb/src/ndbapi/NdbScanOperation.cpp
      storage/ndb/src/ndbapi/ndberror.c
      storage/ndb/test/ndbapi/testScan.cpp
      storage/ndb/test/run-test/daily-basic-tests.txt
=== modified file 'storage/ndb/test/ndbapi/testScan.cpp'
--- a/storage/ndb/test/ndbapi/testScan.cpp	2012-06-26 09:00:13 +0000
+++ b/storage/ndb/test/ndbapi/testScan.cpp	2012-06-26 12:26:28 +0000
@@ -1583,7 +1583,8 @@ runExtraNextResult(NDBT_Context* ctx, ND
     }
     
     // Do a random numer of scans in this transaction.
-    for (Uint32 j=0; j < random()%4; j++)
+    const int scanCount = rand()%4;
+    for (int j=0; j < scanCount; j++)
     {
       NdbScanOperation* const scan = trans->getNdbScanOperation(pTab);
       if (scan == NULL)

No bundle (reason: useless for push emails).
Thread
bzr push into mysql-5.1-telco-6.3 branch (jan.wedvik:3477 to 3478) Jan Wedvik26 Jun