List:Commits« Previous MessageNext Message »
From:Jonas Oreland Date:August 9 2010 8:57am
Subject:bzr commit into mysql-5.1-telco-6.2 branch (jonas:3120)
View as plain text  
#At file:///home/jonas/src/telco-6.2/ based on revid:jonas@stripped

 3120 Jonas Oreland	2010-08-09
      ndb - drop table at end of tests (flexBench)

    modified:
      storage/ndb/test/ndbapi/flexBench.cpp
=== modified file 'storage/ndb/test/ndbapi/flexBench.cpp'
--- a/storage/ndb/test/ndbapi/flexBench.cpp	2009-05-26 18:53:34 +0000
+++ b/storage/ndb/test/ndbapi/flexBench.cpp	2010-08-09 08:57:30 +0000
@@ -72,6 +72,7 @@ Arguments:
 extern "C" { static void* flexBenchThread(void*); }
 static int readArguments(int argc, const char** argv);
 static int createTables(Ndb*);
+static int dropTables(Ndb*);
 static void sleepBeforeStartingTest(int seconds);
 static void input_error();
 
@@ -557,6 +558,8 @@ NDB_COMMAND(flexBench, "flexBench", "fle
     free(longKeyAttrName);
   } // if
 
+  dropTables(pNdb);
+
   delete [] pThreadsData;
   delete pNdb;
   theErrorData.printErrorCounters();
@@ -1256,6 +1259,21 @@ createTables(Ndb* pMyNdb){
   return 0;
 }
 
+static int
+dropTables(Ndb* pMyNdb){
+  int i;
+
+  // Note! Uses only uppercase letters in table name's
+  // so that we can look at the tables with SQL
+  for(i = 0; i < tNoOfTables; i++){
+    ndbout << "Dropping " << tableName[i] << "... ";
+    pMyNdb->getDictionary()->dropTable(tableName[i]);
+    ndbout << "done" << endl;
+  }
+  
+  return 0;
+}
+
       
 static void input_error(){
   ndbout << endl << "Invalid argument!" << endl;


Attachment: [text/bzr-bundle] bzr/jonas@mysql.com-20100809085730-5ekibu3fdvf0gb45.bundle
Thread
bzr commit into mysql-5.1-telco-6.2 branch (jonas:3120) Jonas Oreland9 Aug