List:Commits« Previous MessageNext Message »
From:Jonas Oreland Date:October 12 2011 10:37am
Subject:bzr push into mysql-5.1-telco-7.0 branch (jonas.oreland:4590 to 4592)
View as plain text  
 4592 Jonas Oreland	2011-10-12
      ndb - fix bug in arena-ification of dbdict

    modified:
      storage/ndb/src/kernel/blocks/dbdict/Dbdict.cpp
 4591 Jonas Oreland	2011-10-12
      ndb - add some new utility methods to Hugo

    modified:
      storage/ndb/test/include/HugoCalculator.hpp
      storage/ndb/test/include/HugoOperations.hpp
      storage/ndb/test/src/HugoOperations.cpp
 4590 Pekka Nousiainen	2011-10-11 [merge]
      merge 7.0 to wl4124

    added:
      mysql-test/suite/ndb_big/bug37983-master.opt
      mysql-test/suite/ndb_big/disabled.def
    modified:
      mysql-test/mysql-test-run.pl
      mysql-test/suite/ndb/r/ndbinfo.result
      storage/ndb/include/ndb_constants.h
      storage/ndb/src/kernel/blocks/dblqh/Dblqh.hpp
      storage/ndb/src/kernel/blocks/dblqh/DblqhMain.cpp
      storage/ndb/src/kernel/vm/Ndbinfo.hpp
      storage/ndb/src/kernel/vm/NdbinfoTables.cpp
=== modified file 'storage/ndb/src/kernel/blocks/dbdict/Dbdict.cpp'
--- a/storage/ndb/src/kernel/blocks/dbdict/Dbdict.cpp	2011-10-07 13:15:08 +0000
+++ b/storage/ndb/src/kernel/blocks/dbdict/Dbdict.cpp	2011-10-12 10:37:29 +0000
@@ -24227,7 +24227,6 @@ Dbdict::releaseSchemaOp(SchemaOpPtr& op_
   ndbrequire(op_ptr.p->m_magic == SchemaOp::DICT_MAGIC);
   c_schemaOpHash.remove(op_ptr);
   c_schemaOpPool.release(op_ptr);
-  ndbrequire(op_ptr.p->m_magic == 0);
   op_ptr.setNull();
 }
 
@@ -24548,11 +24547,17 @@ Dbdict::releaseSchemaTrans(SchemaTransPt
 {
   D("releaseSchemaTrans" << V(trans_ptr.p->trans_key));
 
-  LocalSchemaOp_list list(c_schemaOpPool, trans_ptr.p->m_op_list);
-  SchemaOpPtr op_ptr;
-  while (list.first(op_ptr)) {
-    list.remove(op_ptr);
-    releaseSchemaOp(op_ptr);
+  {
+    /**
+     * Put in own scope...since LocalSchemaOp_list stores back head
+     *   in destructor
+     */
+    LocalSchemaOp_list list(c_schemaOpPool, trans_ptr.p->m_op_list);
+    SchemaOpPtr op_ptr;
+    while (list.first(op_ptr)) {
+      list.remove(op_ptr);
+      releaseSchemaOp(op_ptr);
+    }
   }
   ndbrequire(trans_ptr.p->m_magic == SchemaTrans::DICT_MAGIC);
   ndbrequire(c_schemaTransCount != 0);

=== modified file 'storage/ndb/test/include/HugoCalculator.hpp'
--- a/storage/ndb/test/include/HugoCalculator.hpp	2011-06-30 15:59:25 +0000
+++ b/storage/ndb/test/include/HugoCalculator.hpp	2011-10-12 10:19:08 +0000
@@ -41,6 +41,7 @@ public:
                      const char* valPtr, Uint32 valLen);
   int getIdValue(NDBT_ResultRow* const pRow) const;
   int getUpdatesValue(NDBT_ResultRow* const pRow) const;
+  int getIdColNo() const { return m_idCol;}
   int isIdCol(int colId) { return m_idCol == colId; };
   int isUpdateCol(int colId){ return m_updatesCol == colId; };
 

=== modified file 'storage/ndb/test/include/HugoOperations.hpp'
--- a/storage/ndb/test/include/HugoOperations.hpp	2011-06-30 15:59:25 +0000
+++ b/storage/ndb/test/include/HugoOperations.hpp	2011-10-12 10:19:08 +0000
@@ -117,7 +117,8 @@ public:
   bool getPartIdForRow(const NdbOperation* pOp, int rowid, Uint32& partId);
   
   int setValues(NdbOperation*, int rowId, int updateId);
-  
+  int setNonPkValues(NdbOperation*, int rowId, int updateId);
+
   int verifyUpdatesValue(int updatesValue, int _numRows = 0);
 
   int indexReadRecords(Ndb*, const char * idxName, int recordNo,

=== modified file 'storage/ndb/test/src/HugoOperations.cpp'
--- a/storage/ndb/test/src/HugoOperations.cpp	2011-06-30 15:59:25 +0000
+++ b/storage/ndb/test/src/HugoOperations.cpp	2011-10-12 10:19:08 +0000
@@ -411,20 +411,30 @@ int
 HugoOperations::setValues(NdbOperation* pOp, int rowId, int updateId)
 {
   // Define primary keys
-  int a;
   if (equalForRow(pOp, rowId) != 0)
     return NDBT_FAILED;
-  
-  for(a = 0; a<tab.getNoOfColumns(); a++){
-    if (tab.getColumn(a)->getPrimaryKey() == false){
-      if(setValueForAttr(pOp, a, rowId, updateId ) != 0){ 
+
+  if (setNonPkValues(pOp, rowId, updateId) != 0)
+    return NDBT_FAILED;
+
+  return NDBT_OK;
+}
+
+int
+HugoOperations::setNonPkValues(NdbOperation* pOp, int rowId, int updateId)
+{
+  for(int a = 0; a<tab.getNoOfColumns(); a++)
+  {
+    if (tab.getColumn(a)->getPrimaryKey() == false)
+    {
+      if(setValueForAttr(pOp, a, rowId, updateId ) != 0)
+      {
 	ERR(pTrans->getNdbError());
         setNdbError(pTrans->getNdbError());
 	return NDBT_FAILED;
       }
     }
   }
-  
   return NDBT_OK;
 }
 

No bundle (reason: useless for push emails).
Thread
bzr push into mysql-5.1-telco-7.0 branch (jonas.oreland:4590 to 4592) Jonas Oreland13 Oct