List:Commits« Previous MessageNext Message »
From:Martin Skold Date:May 27 2008 9:45am
Subject:bk commit into 5.1 tree (mskold:1.2603) BUG#37000
View as plain text  
Below is the list of changes that have just been committed into a local
5.1 repository of mskold.  When mskold 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@stripped, 2008-05-27 11:45:26+02:00, mskold@stripped +1 -0
  bug#37000 Dropping table when ndb is in single user mode incorrectly deletes .ndb file: Only call handler::delete_table if no error

  sql/ha_ndbcluster.cc@stripped, 2008-05-27 11:45:18+02:00, mskold@stripped +15 -5
    bug#37000 Dropping table when ndb is in single user mode incorrectly deletes .ndb file: Only call handler::delete_table if no error

diff -Nrup a/sql/ha_ndbcluster.cc b/sql/ha_ndbcluster.cc
--- a/sql/ha_ndbcluster.cc	2008-04-09 17:29:39 +02:00
+++ b/sql/ha_ndbcluster.cc	2008-05-27 11:45:18 +02:00
@@ -6324,6 +6324,7 @@ retry_temporary_error1:
 int ha_ndbcluster::delete_table(const char *name)
 {
   THD *thd= current_thd;
+  int error= 0;
   DBUG_ENTER("ha_ndbcluster::delete_table");
   DBUG_PRINT("enter", ("name: %s", name));
   set_dbname(name);
@@ -6338,17 +6339,26 @@ int ha_ndbcluster::delete_table(const ch
   {
     DBUG_PRINT("info", ("Schema distribution table not setup"));
     DBUG_ASSERT(ndb_schema_share);
-    DBUG_RETURN(HA_ERR_NO_CONNECTION);
+    error= HA_ERR_NO_CONNECTION;
+    goto err;
   }
 #endif
 
   if (check_ndb_connection(thd))
-    DBUG_RETURN(HA_ERR_NO_CONNECTION);
+  {
+    error= HA_ERR_NO_CONNECTION;
+    goto err;
+  }
 
-  /* Call ancestor function to delete .ndb file */
-  handler::delete_table(name);
+  if (!(error= delete_table(thd, this, get_ndb(thd), name,
+                            m_dbname, m_tabname)))
+  {
+    /* Call ancestor function to delete .ndb file */
+    error= handler::delete_table(name);
+  }
 
-  DBUG_RETURN(delete_table(thd, this, get_ndb(thd), name, m_dbname, m_tabname));
+err:
+  DBUG_RETURN(error);
 }
 
 
Thread
bk commit into 5.1 tree (mskold:1.2603) BUG#37000Martin Skold27 May