MySQL Lists are EOL. Please join:

List:Commits« Previous MessageNext Message »
From:tomas Date:June 14 2006 10:54am
Subject:bk commit into 4.1 tree (tomas:1.2480) BUG#18595
View as plain text  
Below is the list of changes that have just been committed into a local
4.1 repository of tomas. When tomas 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.2480 06/06/14 12:54:28 tomas@stripped +1 -0
   Bug #18595 repeated create, insert, drop can cause MySQL table definition cache to
  corrupt
    - add infinite retry on drop table temporary error

  sql/ha_ndbcluster.cc
    1.181 06/06/14 12:54:22 tomas@stripped +27 -7
     Bug #18595 repeated create, insert, drop can cause MySQL table definition cache to
    corrupt
      - add infinite retry on drop table temporary error

# 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:	tomas
# Host:	poseidon.ndb.mysql.com
# Root:	/home/tomas/mysql-4.1

--- 1.180/sql/ha_ndbcluster.cc	2006-05-15 16:23:54 +02:00
+++ 1.181/sql/ha_ndbcluster.cc	2006-06-14 12:54:22 +02:00
@@ -4036,20 +4036,30 @@
 
 int ha_ndbcluster::drop_table()
 {
+  THD *thd= current_thd;
   Ndb *ndb= get_ndb();
   NdbDictionary::Dictionary *dict= ndb->getDictionary();
   
   DBUG_ENTER("drop_table");
   DBUG_PRINT("enter", ("Deleting %s", m_tabname));
   
-  if (dict->dropTable(m_tabname)) 
+  while (dict->dropTable(m_tabname)) 
   {
     const NdbError err= dict->getNdbError();
-    if (err.code == 709)
-      ; // 709: No such table existed
-    else 
+    switch (err.status)
+    {
+      case NdbError::TemporaryError:
+        if (!thd->killed)
+          continue; // retry indefinitly
+        break;
+      default:
+        break;
+    }
+    if (err.code != 709) // 709: No such table existed
       ERR_RETURN(dict->getNdbError());
-  }  
+    break;
+  }
+
   release_metadata();
   DBUG_RETURN(0);
 }
@@ -4453,14 +4463,24 @@
   List_iterator_fast<char> it(drop_list);
   while ((tabname=it++))
   {
-    if (dict->dropTable(tabname))
+    while (dict->dropTable(tabname))
     {
       const NdbError err= dict->getNdbError();
-      if (err.code != 709)
+      switch (err.status)
+      {
+        case NdbError::TemporaryError:
+          if (!thd->killed)
+            continue; // retry indefinitly
+          break;
+        default:
+          break;
+      }
+      if (err.code != 709) // 709: No such table existed
       {
         ERR_PRINT(err);
         ret= ndb_to_mysql_error(&err);
       }
+      break;
     }
   }
   DBUG_RETURN(ret);      
Thread
bk commit into 4.1 tree (tomas:1.2480) BUG#18595tomas14 Jun