List:Commits« Previous MessageNext Message »
From:pekka Date:February 17 2006 9:33pm
Subject:bk commit into 5.1 tree (pekka:1.2128)
View as plain text  
Below is the list of changes that have just been committed into a local
5.1 repository of pekka. When pekka 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.2128 06/02/17 22:33:31 pekka@stripped +5 -0
  ndb - rbr blobs: fixes (not final)

  mysql-test/t/disabled.def
    1.76 06/02/17 22:31:50 pekka@stripped +1 -1
    rpl_ndb_blob passes again

  sql/ha_ndbcluster.cc
    1.272 06/02/17 22:30:46 pekka@stripped +2 -2
    avoid discovering NDB$BLOB tables

  storage/ndb/src/ndbapi/DictCache.cpp
    1.20 06/02/17 22:29:24 pekka@stripped +14 -2
    DBUG_PRINT

  storage/ndb/src/ndbapi/NdbDictionaryImpl.hpp
    1.50 06/02/17 22:28:44 pekka@stripped +1 -1
    invalidate table=>invalidate blob tables

  storage/ndb/src/ndbapi/NdbDictionaryImpl.cpp
    1.108 06/02/17 22:28:44 pekka@stripped +18 -4
    invalidate table=>invalidate blob tables

# 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:	pekka
# Host:	orca.ndb.mysql.com
# Root:	/space/pekka/ndb/version/my51

--- 1.75/mysql-test/t/disabled.def	2006-02-17 09:02:04 +01:00
+++ 1.76/mysql-test/t/disabled.def	2006-02-17 22:31:50 +01:00
@@ -43,6 +43,6 @@
 rpl_until               : Unstable test case, bug#15886
 sp-goto                 : GOTO is currently is disabled - will be fixed in the future
 subselect               : Bug#15706 (ps mode) [PATCH PENDING]
-rpl_ndb_blob            : Bug #17505
+#rpl_ndb_blob            : Bug #17505
 rpl_ndb_blob2           : Bug #17505
 rpl_ndb_log             : results are not deterministic

--- 1.19/storage/ndb/src/ndbapi/DictCache.cpp	2006-02-14 22:35:56 +01:00
+++ 1.20/storage/ndb/src/ndbapi/DictCache.cpp	2006-02-17 22:29:24 +01:00
@@ -159,11 +159,16 @@
     switch(ver->m_status){
     case OK:
       ver->m_refCount++;
+      DBUG_PRINT("info", ("Table OK version=%x.%x refCount=%u",
+                           ver->m_impl->m_version & 0xFFFFFF,
+                           ver->m_impl->m_version >> 24,
+                           ver->m_refCount));
       DBUG_RETURN(ver->m_impl);
     case DROPPED:
       retreive = true; // Break loop
       break;
     case RETREIVING:
+      DBUG_PRINT("info", ("Wait for retrieving thread"));
       NdbCondition_WaitTimeout(m_waitForTableCondition, m_mutex, waitTime);
       continue;
     }
@@ -178,6 +183,7 @@
   tmp.m_status = RETREIVING;
   tmp.m_refCount = 1; // The one retreiving it
   versions->push_back(tmp);
+  DBUG_PRINT("info", ("No table found"));
   DBUG_RETURN(0);
 }
 
@@ -185,8 +191,11 @@
 GlobalDictCache::put(const char * name, NdbTableImpl * tab)
 {
   DBUG_ENTER("GlobalDictCache::put");
-  DBUG_PRINT("enter", ("name: %s, internal_name: %s",
-                       name, tab ? tab->m_internalName.c_str() : "tab NULL"));
+  DBUG_PRINT("enter", ("name: %s, internal_name: %s version: %x.%x",
+                       name,
+                       tab ? tab->m_internalName.c_str() : "tab NULL",
+                       tab ? tab->m_version & 0xFFFFFF : 0,
+                       tab ? tab->m_version >> 24 : 0));
 
   const Uint32 len = strlen(name);
   Vector<TableVersion> * vers = m_tableHash.getData(name, len);
@@ -218,12 +227,14 @@
     vers->erase(sz - 1);
   } 
   else if (ver.m_impl == 0) {
+    DBUG_PRINT("info", ("Table OK"));
     ver.m_impl = tab;
     ver.m_version = tab->m_version;
     ver.m_status = OK;
   } 
   else if (ver.m_impl == &f_invalid_table) 
   {
+    DBUG_PRINT("info", ("Table DROPPED invalid"));
     ver.m_impl = tab;
     ver.m_version = tab->m_version;
     ver.m_status = DROPPED;
@@ -231,6 +242,7 @@
   }
   else if(ver.m_impl == &f_altered_table)
   {
+    DBUG_PRINT("info", ("Table DROPPED altered"));
     ver.m_impl = tab;
     ver.m_version = tab->m_version;
     ver.m_status = DROPPED;

--- 1.107/storage/ndb/src/ndbapi/NdbDictionaryImpl.cpp	2006-02-17 11:50:19 +01:00
+++ 1.108/storage/ndb/src/ndbapi/NdbDictionaryImpl.cpp	2006-02-17 22:28:44 +01:00
@@ -2767,16 +2767,28 @@
 }
 
 int
-NdbDictionaryImpl::invalidateObject(NdbTableImpl & impl)
+NdbDictionaryImpl::invalidateObject(NdbTableImpl & impl, bool lock)
 {
   const char * internalTableName = impl.m_internalName.c_str();
   DBUG_ENTER("NdbDictionaryImpl::invalidateObject");
   DBUG_PRINT("enter", ("internal_name: %s", internalTableName));
+
+  if (lock)
+    m_globalHash->lock();
+  if (impl.m_noOfBlobs != 0) {
+    for (uint i = 0; i < impl.m_columns.size(); i++) {
+      NdbColumnImpl& c = *impl.m_columns[i];
+      if (! c.getBlobType() || c.getPartSize() == 0)
+        continue;
+      assert(c.m_blobTable != NULL);
+      invalidateObject(*c.m_blobTable, false);
+    }
+  }
   m_localHash.drop(internalTableName);
-  m_globalHash->lock();
   impl.m_status = NdbDictionary::Object::Invalid;
   m_globalHash->drop(&impl);
-  m_globalHash->unlock();
+  if (lock)
+    m_globalHash->unlock();
   DBUG_RETURN(0);
 }
 
@@ -2784,6 +2796,8 @@
 NdbDictionaryImpl::removeCachedObject(NdbTableImpl & impl, bool lock)
 {
   const char * internalTableName = impl.m_internalName.c_str();
+  DBUG_ENTER("NdbDictionaryImpl::removeCachedObject");
+  DBUG_PRINT("enter", ("internal_name: %s", internalTableName));
 
   if (lock)
     m_globalHash->lock();
@@ -2800,7 +2814,7 @@
   m_globalHash->release(&impl);
   if (lock)
     m_globalHash->unlock();
-  return 0;
+  DBUG_RETURN(0);
 }
 
 /*****************************************************************

--- 1.49/storage/ndb/src/ndbapi/NdbDictionaryImpl.hpp	2006-02-17 11:50:19 +01:00
+++ 1.50/storage/ndb/src/ndbapi/NdbDictionaryImpl.hpp	2006-02-17 22:28:44 +01:00
@@ -546,7 +546,7 @@
   int dropTable(const char * name);
   int dropTable(NdbTableImpl &);
   int dropBlobTables(NdbTableImpl &);
-  int invalidateObject(NdbTableImpl &);
+  int invalidateObject(NdbTableImpl &, bool lock = true);
   int removeCachedObject(NdbTableImpl &, bool lock = true);
 
   int createIndex(NdbIndexImpl &ix);

--- 1.271/sql/ha_ndbcluster.cc	2006-02-16 17:25:20 +01:00
+++ 1.272/sql/ha_ndbcluster.cc	2006-02-17 22:30:46 +01:00
@@ -5525,7 +5525,7 @@
     {
       NDBDICT::List::Element& elmt= list.elements[i];
       int do_handle_table= 0;
-      if (IS_TMP_PREFIX(elmt.name))
+      if (IS_TMP_PREFIX(elmt.name) || IS_NDB_BLOB_PREFIX(elmt.name))
       {
         DBUG_PRINT("info", ("Skipping %s.%s in NDB", elmt.database, elmt.name));
         continue;
@@ -5662,7 +5662,7 @@
   for (i= 0 ; i < list.count ; i++)
   {
     NDBDICT::List::Element& elmt= list.elements[i];
-    if (IS_TMP_PREFIX(elmt.name))
+    if (IS_TMP_PREFIX(elmt.name) || IS_NDB_BLOB_PREFIX(elmt.name))
     {
       DBUG_PRINT("info", ("Skipping %s.%s in NDB", elmt.database, elmt.name));
       continue;
Thread
bk commit into 5.1 tree (pekka:1.2128)pekka17 Feb