List:Commits« Previous MessageNext Message »
From:jonas Date:January 10 2006 8:37am
Subject:bk commit into 5.1 tree (jonas:1.1995) BUG#16158
View as plain text  
Below is the list of changes that have just been committed into a local
5.1 repository of jonas. When jonas does a push these changes will
be propagated to the main repository and, within 24 hours after the
push, to the public repository.
For information on how to access the public repository
see http://dev.mysql.com/doc/mysql/en/installing-source-tree.html

ChangeSet
  1.1995 06/01/10 09:37:15 jonas@stripped +1 -0
  bug#16158 - ndb dd
    fix create_fg_abort

  storage/ndb/src/kernel/blocks/dbdict/Dbdict.cpp
    1.69 06/01/10 09:37:12 jonas@stripped +42 -9
    Fix create_fg_abort_XXX

# This is a BitKeeper patch.  What follows are the unified diffs for the
# set of deltas contained in the patch.  The rest of the patch, the part
# that BitKeeper cares about, is below these diffs.
# User:	jonas
# Host:	perch.ndb.mysql.com
# Root:	/home/jonas/src/51-dd

--- 1.68/storage/ndb/src/kernel/blocks/dbdict/Dbdict.cpp	2006-01-06 18:35:08 +01:00
+++ 1.69/storage/ndb/src/kernel/blocks/dbdict/Dbdict.cpp	2006-01-10 09:37:12 +01:00
@@ -13870,6 +13870,7 @@
   createObjPtr.p->m_obj_type = objType;
   createObjPtr.p->m_obj_version = objVersion;
   createObjPtr.p->m_obj_info_ptr_i = objInfoPtr.i;
+  createObjPtr.p->m_obj_ptr_i = RNIL;
 
   createObjPtr.p->m_callback.m_callbackData = key;
   createObjPtr.p->m_callback.m_callbackFunction= 
@@ -14566,6 +14567,9 @@
   SegmentedSectionPtr objInfoPtr;
   getSection(objInfoPtr, ((OpCreateObj*)op)->m_obj_info_ptr_i);
   SimplePropertiesSectionReader it(objInfoPtr, getSectionSegmentPool());
+
+  Ptr<DictObject> obj_ptr; obj_ptr.setNull();
+  FilegroupPtr fg_ptr; fg_ptr.setNull();
   
   SimpleProperties::UnpackStatus status;
   DictFilegroupInfo::Filegroup fg; fg.init();
@@ -14605,15 +14609,12 @@
       break;
     }
     
-    Ptr<DictObject> obj_ptr;
     if(!c_obj_pool.seize(obj_ptr)){
       op->m_errorCode = CreateTableRef::NoMoreTableRecords;
       break;
     }
     
-    FilegroupPtr fg_ptr;
     if(!c_filegroup_pool.seize(fg_ptr)){
-      c_obj_pool.release(obj_ptr);
       op->m_errorCode = CreateTableRef::NoMoreTableRecords;
       break;
     }
@@ -14622,8 +14623,6 @@
       Rope name(c_rope_pool, obj_ptr.p->m_name);
       if(!name.assign(fg.FilegroupName, len, hash)){
 	op->m_errorCode = CreateTableRef::TableNameTooLong;
-	c_obj_pool.release(obj_ptr);
-	c_filegroup_pool.release(fg_ptr);
 	break;
       }
     }
@@ -14671,8 +14670,24 @@
     
     op->m_obj_ptr_i = fg_ptr.i;
   } while(0);
-  
+
 error:
+  if (op->m_errorCode)
+  {
+    jam();
+    if (!fg_ptr.isNull())
+    {
+      jam();
+      c_filegroup_pool.release(fg_ptr);
+    }
+
+    if (!obj_ptr.isNull())
+    {
+      jam();
+      c_obj_pool.release(obj_ptr);
+    }
+  }
+  
   execute(signal, op->m_callback, 0);
 }
 
@@ -14743,14 +14758,32 @@
 
 void
 Dbdict::create_fg_abort_start(Signal* signal, SchemaOp* op){
-  execute(signal, op->m_callback, 0);
-  abort();
+  CreateFilegroupImplReq* req = 
+    (CreateFilegroupImplReq*)signal->getDataPtrSend();
+
+  if (op->m_obj_ptr_i != RNIL)
+  {
+    jam();
+    send_drop_fg(signal, op, DropFilegroupImplReq::Commit);
+    return;
+  }
+  
+  execute(signal, op->m_callback, 0);  
 }
 
 void
 Dbdict::create_fg_abort_complete(Signal* signal, SchemaOp* op){
+  
+  if (op->m_obj_ptr_i != RNIL)
+  {
+    jam();
+    FilegroupPtr fg_ptr;
+    c_filegroup_pool.getPtr(fg_ptr, op->m_obj_ptr_i);
+    
+    release_object(fg_ptr.p->m_obj_ptr_i);
+  }
+  
   execute(signal, op->m_callback, 0);
-  abort();
 }
 
 void 
Thread
bk commit into 5.1 tree (jonas:1.1995) BUG#16158jonas10 Jan