List:Commits« Previous MessageNext Message »
From:Jonas Oreland Date:March 2 2009 9:28am
Subject:bzr commit into mysql-5.1-telco-6.4 branch (jonas:2900) Bug#43226
View as plain text  
#At file:///home/jonas/src/telco-6.4/

 2900 Jonas Oreland	2009-03-02
      ndb - bug#43226 - extra cleanup for 6.4
modified:
  storage/ndb/src/kernel/blocks/dbtc/Dbtc.hpp
  storage/ndb/src/kernel/blocks/dbtc/DbtcMain.cpp

=== modified file 'storage/ndb/src/kernel/blocks/dbtc/Dbtc.hpp'
--- a/storage/ndb/src/kernel/blocks/dbtc/Dbtc.hpp	2008-12-09 17:15:12 +0000
+++ b/storage/ndb/src/kernel/blocks/dbtc/Dbtc.hpp	2009-03-02 09:28:26 +0000
@@ -1002,16 +1002,18 @@ public:
     Uint8 hasVarKeys;
 
     bool checkTable(Uint32 schemaVersion) const {
-      return get_enabled() && !get_dropping() && 
-	(table_version_major(schemaVersion) == table_version_major(currentSchemaVersion));
+      return !get_dropping() &&
+	((/** normal transaction path */
+          get_enabled() && table_version_major(schemaVersion) == table_version_major(currentSchemaVersion)) 
+         ||
+         (/** 
+           * unique index is relaxed for DbUtil and transactions ongoing
+           * while index is created
+           */
+          get_prepared() && schemaVersion == currentSchemaVersion &&
+          DictTabInfo::isUniqueIndex(tableType)));
     }
-
-    bool checkTablePrepared(Uint32 schemaVersion, Uint32 transId1) const {
-      return get_prepared() && !get_dropping() && 
-	(table_version_major(schemaVersion) == table_version_major(currentSchemaVersion)) &&
-        (transId1 >> 20) == DBUTIL; // wl3600_todo use schema trans id instead
-    }
-
+    
     Uint32 getErrorCode(Uint32 schemaVersion) const;
   };
   typedef Ptr<TableRecord> TableRecordPtr;

=== modified file 'storage/ndb/src/kernel/blocks/dbtc/DbtcMain.cpp'
--- a/storage/ndb/src/kernel/blocks/dbtc/DbtcMain.cpp	2009-02-11 10:27:14 +0000
+++ b/storage/ndb/src/kernel/blocks/dbtc/DbtcMain.cpp	2009-03-02 09:28:26 +0000
@@ -2543,18 +2543,13 @@ void Dbtc::execTCKEYREQ(Signal* signal) 
   if (localTabptr.p->checkTable(tcKeyReq->tableSchemaVersion)) {
     ;
   } else {
-    if (localTabptr.p->checkTablePrepared(tcKeyReq->tableSchemaVersion,
-                                          tcKeyReq->transId1)) {
-      jam();
-    } else {
     /*-----------------------------------------------------------------------*/
     /* THE API IS WORKING WITH AN OLD SCHEMA VERSION. IT NEEDS REPLACEMENT.  */
     /* COULD ALSO BE THAT THE TABLE IS NOT DEFINED.                          */
     /*-----------------------------------------------------------------------*/
-      releaseSections(handle);
-      TCKEY_abort(signal, 8);
-      return;
-    }
+    releaseSections(handle);
+    TCKEY_abort(signal, 8);
+    return;
   }//if
   
   //-------------------------------------------------------------------------
@@ -3002,14 +2997,9 @@ void Dbtc::tckeyreq050Lab(Signal* signal
   if(localTabptr.p->checkTable(schemaVersion)){
     ;
   } else {
-    if (localTabptr.p->checkTablePrepared(schemaVersion,
-                                          regApiPtr->transid[0])) {
-      jam();
-    } else {
-      terrorCode = localTabptr.p->getErrorCode(schemaVersion);
-      TCKEY_abort(signal, 58);
-      return;
-    }
+    terrorCode = localTabptr.p->getErrorCode(schemaVersion);
+    TCKEY_abort(signal, 58);
+    return;
   }
   
   setApiConTimer(apiConnectptr.i, TtcTimer, __LINE__);
@@ -3213,14 +3203,9 @@ void Dbtc::attrinfoDihReceivedLab(Signal
   if(localTabptr.p->checkTable(regCachePtr->schemaVersion)){
     ;
   } else {
-    if (localTabptr.p->checkTablePrepared(regCachePtr->schemaVersion,
-                                          regApiPtr->transid[0])) {
-      jam();
-    } else {
-      terrorCode = localTabptr.p->getErrorCode(regCachePtr->schemaVersion);
-      TCKEY_abort(signal, 58);
-      return;
-    }
+    terrorCode = localTabptr.p->getErrorCode(regCachePtr->schemaVersion);
+    TCKEY_abort(signal, 58);
+    return;
   }
   if (Tnode != 0)
   {

Thread
bzr commit into mysql-5.1-telco-6.4 branch (jonas:2900) Bug#43226Jonas Oreland2 Mar