MySQL Lists are EOL. Please join:

List:Commits« Previous MessageNext Message »
From:Jonas Oreland Date:August 21 2008 10:18pm
Subject:bzr push into mysql-5.1 branch (jonas:2721)
View as plain text  
 2721 Jonas Oreland	2008-08-22 [merge]
      merge 6.3 to 6.4
modified:
  storage/ndb/src/kernel/blocks/dblqh/DblqhMain.cpp
  storage/ndb/src/kernel/blocks/dbtc/DbtcMain.cpp
  storage/ndb/src/kernel/blocks/restore.cpp
  storage/ndb/src/mgmapi/mgmapi.cpp
  storage/ndb/src/mgmsrv/MgmtSrvr.cpp
  storage/ndb/test/ndbapi/testIndex.cpp
  storage/ndb/test/ndbapi/testNodeRestart.cpp

=== modified file 'storage/ndb/src/kernel/blocks/dblqh/DblqhMain.cpp'
--- a/storage/ndb/src/kernel/blocks/dblqh/DblqhMain.cpp	2008-08-21 16:10:55 +0000
+++ b/storage/ndb/src/kernel/blocks/dblqh/DblqhMain.cpp	2008-08-21 22:18:36 +0000
@@ -7546,7 +7546,7 @@ void Dblqh::abortStateHandlerLab(Signal*
 /* ------------------------------------------------------------------------- */
     ndbrequire(regTcPtr->abortState == TcConnectionrec::NEW_FROM_TC);
     sendLqhTransconf(signal, LqhTransConf::Prepared);
-    break;
+    return;
   case TcConnectionrec::WAIT_TUPKEYINFO:
   case TcConnectionrec::WAIT_ATTR:
     jam();

=== modified file 'storage/ndb/src/kernel/blocks/dbtc/DbtcMain.cpp'
--- a/storage/ndb/src/kernel/blocks/dbtc/DbtcMain.cpp	2008-08-11 12:48:03 +0000
+++ b/storage/ndb/src/kernel/blocks/dbtc/DbtcMain.cpp	2008-08-21 22:18:36 +0000
@@ -5188,10 +5188,7 @@ Dbtc::sendApiCommit(Signal* signal)
 
     SET_ERROR_INSERT_VALUE(8056);
 
-    Ptr<ApiConnectRecord> copyPtr;
-    copyPtr.i = regApiPtr.p->apiCopyRecord;
-    ptrCheckGuard(copyPtr, capiConnectFilesize, apiConnectRecord);
-    return copyPtr;
+    goto err8055;
   }
 
   if (regApiPtr.p->returnsignal == RS_TCKEYCONF)
@@ -5238,6 +5235,8 @@ Dbtc::sendApiCommit(Signal* signal)
     TCKEY_abort(signal, 37);
     return regApiPtr;
   }//if
+
+err8055:
   Ptr<ApiConnectRecord> copyPtr;
   UintR TapiConnectFilesize = capiConnectFilesize;
   UintR TcommitCount = c_counters.ccommitCount;

=== modified file 'storage/ndb/src/kernel/blocks/restore.cpp'
--- a/storage/ndb/src/kernel/blocks/restore.cpp	2008-08-11 11:37:57 +0000
+++ b/storage/ndb/src/kernel/blocks/restore.cpp	2008-08-21 22:18:36 +0000
@@ -1137,12 +1137,12 @@ Restore::reorder_key(const KeyDescriptor
       src += sz;
       break;
     case NDB_ARRAYTYPE_SHORT_VAR:
-      sz = (1 + ((char*)var)[0] + 3) >> 2;
+      sz = (1 + ((Uint8*)var)[0] + 3) >> 2;
       memcpy(dst, var, 4 * sz);
       var += sz;
       break;
     case NDB_ARRAYTYPE_MEDIUM_VAR:
-      sz = (2 + ((char*)var)[0] +  256*((char*)var)[1] + 3) >> 2;
+      sz = (2 + ((Uint8*)var)[0] +  256*((Uint8*)var)[1] + 3) >> 2;
       memcpy(dst, var, 4 * sz);
       var += sz;
       break;

=== modified file 'storage/ndb/src/mgmapi/mgmapi.cpp'
--- a/storage/ndb/src/mgmapi/mgmapi.cpp	2008-06-09 18:30:58 +0000
+++ b/storage/ndb/src/mgmapi/mgmapi.cpp	2008-08-21 22:18:36 +0000
@@ -125,7 +125,6 @@ setError(NdbMgmHandle h, int error, int 
 
 #define CHECK_HANDLE(handle, ret) \
   if(handle == 0) { \
-    SET_ERROR(handle, NDB_MGM_ILLEGAL_SERVER_HANDLE, ""); \
     return ret; \
   } 
 

=== modified file 'storage/ndb/src/mgmsrv/MgmtSrvr.cpp'
--- a/storage/ndb/src/mgmsrv/MgmtSrvr.cpp	2008-07-29 14:20:49 +0000
+++ b/storage/ndb/src/mgmsrv/MgmtSrvr.cpp	2008-08-21 22:18:36 +0000
@@ -1167,7 +1167,7 @@ int MgmtSrvr::sendSTOP_REQ(const Vector<
 	CAST_CONSTPTR(NodeFailRep, signal->getDataPtr());
       NdbNodeBitmask mask;
       mask.assign(NdbNodeBitmask::Size, rep->theNodes);
-      mask.bitAND(notstarted);
+      mask.bitANDC(notstarted);
       nodes.bitANDC(mask);
       
       if (singleUserNodeId == 0)

=== modified file 'storage/ndb/test/ndbapi/testIndex.cpp'
--- a/storage/ndb/test/ndbapi/testIndex.cpp	2008-08-04 13:40:17 +0000
+++ b/storage/ndb/test/ndbapi/testIndex.cpp	2008-08-21 22:18:36 +0000
@@ -169,6 +169,29 @@ int create_index(NDBT_Context* ctx, int 
     ndbout << pTab->getColumn(attrNo)->getName()<<" ";
   }
   
+  if (!orderedIndex)
+  {
+    /**
+     * For unique indexes we must add PK, otherwise it's not guaranteed
+     *  to be unique
+     */
+    for (int i = 0; i<pTab->getNoOfColumns(); i++)
+    {
+      if (pTab->getColumn(i)->getPrimaryKey())
+      {
+        for (int j = 0; j<attr->numAttribs; j++)
+        {
+          if (attr->attribs[j] == i)
+            goto next;
+        }
+        pIdx.addIndexColumn(pTab->getColumn(i)->getName());
+        ndbout << pTab->getColumn(i)->getName() << " ";
+      }
+  next:
+      (void)i;
+    }
+  }
+
   pIdx.setStoredIndex(logged);
   ndbout << ") ";
   if (pNdb->getDictionary()->createIndex(pIdx) != 0){

=== modified file 'storage/ndb/test/ndbapi/testNodeRestart.cpp'
--- a/storage/ndb/test/ndbapi/testNodeRestart.cpp	2008-08-04 13:40:17 +0000
+++ b/storage/ndb/test/ndbapi/testNodeRestart.cpp	2008-08-21 22:18:36 +0000
@@ -2466,21 +2466,33 @@ runBug34216(NDBT_Context* ctx, NDBT_Step
       break;
     }
 
-    int rows = 10;
+    int rows = 25;
+    if (rows > records)
+      rows = records;
+
     int batch = 1;
     int row = (records - rows) ? rand() % (records - rows) : 0;
+    if (row + rows > records)
+      row = records - row;
 
-    if(hugoOps.pkUpdateRecord(pNdb, row, batch, rand()) != 0)
-      goto err;
-
-    for (int l = 1; l<5; l++)
+    /**
+     * We should really somehow check that one of the 25 rows
+     *   resides in the node we're targeting
+     */
+    for (int r = row; r < row + rows; r++)
     {
-      if (hugoOps.execute_NoCommit(pNdb) != 0)
+      if(hugoOps.pkUpdateRecord(pNdb, r, batch, rand()) != 0)
         goto err;
-
-      if(hugoOps.pkUpdateRecord(pNdb, row, batch, rand()) != 0)
-        goto err;
-    }
+      
+      for (int l = 1; l<5; l++)
+      {
+        if (hugoOps.execute_NoCommit(pNdb) != 0)
+          goto err;
+        
+        if(hugoOps.pkUpdateRecord(pNdb, r, batch, rand()) != 0)
+          goto err;
+      }
+    }      
 
     hugoOps.execute_Commit(pNdb);
     hugoOps.closeTransaction(pNdb);

Thread
bzr push into mysql-5.1 branch (jonas:2721) Jonas Oreland22 Aug