List:Commits« Previous MessageNext Message »
From:Jonas Oreland Date:June 28 2011 8:58am
Subject:bzr push into mysql-5.1-telco-7.1 branch (jonas.oreland:4263 to 4264)
View as plain text  
 4264 Jonas Oreland	2011-06-28 [merge]
      ndb - merge 70 to 71

    modified:
      storage/ndb/src/ndbapi/NdbTransaction.cpp
      storage/ndb/test/ndbapi/testScan.cpp
      storage/ndb/test/run-test/daily-basic-tests.txt
 4263 magnus.blaudd@stripped	2011-06-27
      ndb
       - properly escape the semicolon(which is cmakes list
         separator) when building the classpath
       - use quotes when concatenating the classpath_str variable

    modified:
      storage/ndb/config/type_JAVA.cmake
=== modified file 'storage/ndb/src/ndbapi/NdbTransaction.cpp'
--- a/storage/ndb/src/ndbapi/NdbTransaction.cpp	2011-05-25 13:19:02 +0000
+++ b/storage/ndb/src/ndbapi/NdbTransaction.cpp	2011-06-28 08:47:18 +0000
@@ -937,7 +937,10 @@ int NdbTransaction::refresh()
       scan_op != 0; scan_op = (NdbIndexScanOperation *) scan_op->theNext)
   {
     NdbTransaction* scan_trans = scan_op->theNdbCon;
-    scan_trans->sendTC_HBREP();
+    if (scan_trans)
+    {
+      scan_trans->sendTC_HBREP();
+    }
   }
   return sendTC_HBREP();
 }

=== modified file 'storage/ndb/test/ndbapi/testScan.cpp'
--- a/storage/ndb/test/ndbapi/testScan.cpp	2011-04-07 07:22:49 +0000
+++ b/storage/ndb/test/ndbapi/testScan.cpp	2011-06-28 08:47:18 +0000
@@ -1424,6 +1424,86 @@ runBug54945(NDBT_Context* ctx, NDBT_Step
   return NDBT_OK;
 }
 
+int
+runCloseRefresh(NDBT_Context* ctx, NDBT_Step* step)
+{
+  Ndb * pNdb = GETNDB(step);
+
+  const Uint32 codeWords= 1;
+  Uint32 codeSpace[ codeWords ];
+  NdbInterpretedCode code(NULL, // Table is irrelevant
+                          &codeSpace[0],
+                          codeWords);
+  if ((code.interpret_exit_last_row() != 0) ||
+      (code.finalise() != 0))
+  {
+    ERR(code.getNdbError());
+    return NDBT_FAILED;
+  }
+
+  const NdbDictionary::Table*  pTab = ctx->getTab();
+  NdbTransaction* pTrans = pNdb->startTransaction();
+  NdbScanOperation* pOp = pTrans->getNdbScanOperation(pTab->getName());
+  if (pOp == NULL)
+  {
+    ERR(pTrans->getNdbError());
+    return NDBT_FAILED;
+  }
+
+  if (pOp->readTuples(NdbOperation::LM_CommittedRead) != 0)
+  {
+    ERR(pTrans->getNdbError());
+    return NDBT_FAILED;
+  }
+
+  if (pOp->setInterpretedCode(&code) == -1 )
+  {
+    ERR(pTrans->getNdbError());
+    pNdb->closeTransaction(pTrans);
+    return NDBT_FAILED;
+  }
+
+  if (pOp->getValue(NdbDictionary::Column::ROW_COUNT) == 0)
+  {
+    ERR(pTrans->getNdbError());
+    return NDBT_FAILED;
+  }
+
+  pTrans->execute(NdbTransaction::NoCommit);
+  pOp->close(); // close this
+
+  pOp = pTrans->getNdbScanOperation(pTab->getName());
+  if (pOp == NULL)
+  {
+    ERR(pTrans->getNdbError());
+    return NDBT_FAILED;
+  }
+
+  if (pOp->readTuples(NdbOperation::LM_CommittedRead) != 0)
+  {
+    ERR(pTrans->getNdbError());
+    return NDBT_FAILED;
+  }
+
+  if (pOp->setInterpretedCode(&code) == -1 )
+  {
+    ERR(pTrans->getNdbError());
+    pNdb->closeTransaction(pTrans);
+    return NDBT_FAILED;
+  }
+
+  if (pOp->getValue(NdbDictionary::Column::ROW_COUNT) == 0)
+  {
+    ERR(pTrans->getNdbError());
+    return NDBT_FAILED;
+  }
+
+  pTrans->execute(NdbTransaction::NoCommit);
+  pTrans->refresh();
+  pTrans->close();
+  return NDBT_OK;
+}
+
 #define CHK_RET_FAILED(x) if (!(x)) { ndbout_c("Failed on line: %u", __LINE__); return NDBT_FAILED; }
 
 int
@@ -2066,6 +2146,10 @@ TESTCASE("Bug42559", "")
   FINALIZER(finalizeBug42559);
   FINALIZER(runClearTable);
 }
+TESTCASE("CloseRefresh", "")
+{
+  INITIALIZER(runCloseRefresh);
+}
 TESTCASE("Bug54945", "")
 {
   INITIALIZER(runBug54945);

=== modified file 'storage/ndb/test/run-test/daily-basic-tests.txt'
--- a/storage/ndb/test/run-test/daily-basic-tests.txt	2011-06-07 10:03:02 +0000
+++ b/storage/ndb/test/run-test/daily-basic-tests.txt	2011-06-28 08:47:18 +0000
@@ -517,6 +517,10 @@ args: -n NoCloseTransaction T6 D1 D2
 
 max-time: 500
 cmd: testScan
+args: -n CloseRefresh T1
+
+max-time: 500
+cmd: testScan
 args: -n CheckInactivityTimeOut T6 D1 D2 
 
 max-time: 500

No bundle (reason: useless for push emails).
Thread
bzr push into mysql-5.1-telco-7.1 branch (jonas.oreland:4263 to 4264) Jonas Oreland28 Jun