List:Commits« Previous MessageNext Message »
From:Magnus Svensson Date:August 4 2008 7:02pm
Subject:bzr commit into mysql-5.1-telco-6.4 branch (msvensson:2693)
View as plain text  
#At file:///data/msvensson/mysql/6.4/

 2693 Magnus Svensson	2008-08-04
      Silently ignore dropTable error if No such table existed
modified:
  storage/ndb/test/src/NDBT_Test.cpp

=== modified file 'storage/ndb/test/src/NDBT_Test.cpp'
--- a/storage/ndb/test/src/NDBT_Test.cpp	2008-08-04 17:29:07 +0000
+++ b/storage/ndb/test/src/NDBT_Test.cpp	2008-08-04 19:02:08 +0000
@@ -1049,15 +1049,16 @@ NDBT_TestSuite::createTables(Ndb_cluster
   for(unsigned i = 0; i<m_tables_in_test.size(); i++)
   {
     const char *tab_name=  m_tables_in_test[i].c_str();
-    if (pDict->dropTable(tab_name) != 0)
+    if (pDict->dropTable(tab_name) != 0 &&
+        pDict->getNdbError().code != 723) // No such table
     {
-      g_err << "runCreateTables: Failed to drop table " << tab_name
+      g_err << "runCreateTables: Failed to drop table " << tab_name << endl
             << pDict->getNdbError() << endl;
       return NDBT_FAILED;
     }
     if(NDBT_Tables::createTable(&ndb, tab_name, !getLogging()) != 0)
     {
-      g_err << "runCreateTables: Failed to create table " << tab_name
+      g_err << "runCreateTables: Failed to create table " << tab_name << endl
             << pDict->getNdbError() << endl;
       return NDBT_FAILED;
     }
@@ -1091,9 +1092,10 @@ runCreateTable(NDBT_Context* ctx, NDBT_S
   NdbDictionary::Dictionary* pDict = ndb.getDictionary();
   const NdbDictionary::Table* pTab = ctx->getTab();
   const char *tab_name=  pTab->getName();
-  if (pDict->dropTable(tab_name) > 0)
+  if (pDict->dropTable(tab_name) != 0 &&
+      pDict->getNdbError().code != 723) // No such table
   {
-    g_err << "runCreateTable: Failed to drop table " << tab_name
+    g_err << "runCreateTable: Failed to drop table " << tab_name << endl
           << pDict->getNdbError() << endl;
     return NDBT_FAILED;
   }

Thread
bzr commit into mysql-5.1-telco-6.4 branch (msvensson:2693) Magnus Svensson4 Aug