MySQL Lists are EOL. Please join:

List:Commits« Previous MessageNext Message »
From:Stewart Smith Date:September 17 2008 12:32pm
Subject:bzr commit into mysql-5.1 branch (stewart:2841)
View as plain text  
#At file:///home/stewart/mysql/ndbwin32/

 2841 Stewart Smith	2008-09-17 [merge]
      merge win work tree
modified:
  storage/ndb/test/ndbapi/CMakeLists.txt
  storage/ndb/test/ndbapi/testBlobs.cpp*
  storage/ndb/test/ndbapi/test_event_merge.cpp*
  storage/ndb/test/ndbapi/test_event_multi_table.cpp*

=== modified file 'storage/ndb/test/ndbapi/CMakeLists.txt'
--- a/storage/ndb/test/ndbapi/CMakeLists.txt	2008-08-20 13:22:09 +0000
+++ b/storage/ndb/test/ndbapi/CMakeLists.txt	2008-09-17 12:12:28 +0000
@@ -30,7 +30,7 @@ ADD_EXECUTABLE(flexTT flexTT.cpp)
 ADD_EXECUTABLE(testBackup testBackup.cpp)
 ADD_EXECUTABLE(testBasic testBasic.cpp)
 ADD_EXECUTABLE(testBasicAsynch testBasicAsynch.cpp)
-#ADD_EXECUTABLE(testBlobs testBlobs.cpp)
+ADD_EXECUTABLE(testBlobs testBlobs.cpp)
 ADD_EXECUTABLE(testDataBuffers testDataBuffers.cpp)
 ADD_EXECUTABLE(testDict testDict.cpp)
 ADD_EXECUTABLE(testIndex testIndex.cpp)
@@ -51,7 +51,7 @@ ADD_EXECUTABLE(testSystemRestart testSys
 ADD_EXECUTABLE(testTimeout testTimeout.cpp)
 ADD_EXECUTABLE(testTransactions testTransactions.cpp)
 ADD_EXECUTABLE(testDeadlock testDeadlock.cpp)
-#ADD_EXECUTABLE(test_event test_event.cpp)
+ADD_EXECUTABLE(test_event test_event.cpp)
 ADD_EXECUTABLE(ndbapi_slow_select slow_select.cpp)
 ADD_EXECUTABLE(testReadPerf testReadPerf.cpp)
 ADD_EXECUTABLE(testLcp testLcp.cpp)
@@ -61,7 +61,7 @@ ADD_EXECUTABLE(DbCreate bench/mainPopula
 ADD_EXECUTABLE(DbAsyncGenerator bench/mainAsyncGenerator.cpp bench/asyncGenerator.cpp bench/ndb_async2.cpp bench/dbGenerator.h bench/macros.h bench/userInterface.h bench/testData.h bench/testDefinitions.h bench/ndb_schema.hpp bench/ndb_error.hpp)
 #ADD_EXECUTABLE(test_event_multi_table test_event_multi_table.cpp)
 ADD_EXECUTABLE(testSRBank testSRBank.cpp)
-#ADD_EXECUTABLE(test_event_merge test_event_merge.cpp)
+ADD_EXECUTABLE(test_event_merge test_event_merge.cpp)
 
 ##testDict_INCLUDES = $(INCLUDES) -I$(top_srcdir)/ndb/include/kernel
 ##testIndex_INCLUDES = $(INCLUDES) -I$(top_srcdir)/ndb/include/kernel

=== modified file 'storage/ndb/test/ndbapi/testBlobs.cpp' (properties changed: -x to +x)
--- a/storage/ndb/test/ndbapi/testBlobs.cpp	2008-05-23 10:20:10 +0000
+++ b/storage/ndb/test/ndbapi/testBlobs.cpp	2008-09-17 12:12:28 +0000
@@ -25,6 +25,8 @@
 #include <NdbTick.h>
 #include <my_sys.h>
 
+#include <ndb_rand.h>
+
 struct Chr {
   NdbDictionary::Column::Type m_type;
   bool m_fixed;
@@ -618,7 +620,7 @@ createTable(int storageType)
 static unsigned
 urandom(unsigned n)
 {
-  return n == 0 ? 0 : random() % n;
+  return n == 0 ? 0 : ndb_rand() % n;
 }
 
 struct Bval {
@@ -2543,7 +2545,7 @@ testmain()
     g_opt.m_seed = getpid();
   if (g_opt.m_seed != 0) {
     DBG("random seed = " << g_opt.m_seed);
-    srandom(g_opt.m_seed);
+    ndb_srand(g_opt.m_seed);
   }
   for (g_loop = 0; g_opt.m_loop == 0 || g_loop < g_opt.m_loop; g_loop++) {
         for (int storage= 0; storage < 2; storage++) {
@@ -2594,7 +2596,7 @@ testmain()
       int api;
       DBG("=== loop " << g_loop << " ===");
       if (g_opt.m_seed == 0)
-        srandom(g_loop);
+        ndb_srand(g_loop);
       if (g_opt.m_bugtest != 0) {
         // test some bug# instead
         CHK((*g_opt.m_bugtest)() == 0);

=== modified file 'storage/ndb/test/ndbapi/test_event_merge.cpp' (properties changed: -x to +x)
--- a/storage/ndb/test/ndbapi/test_event_merge.cpp	2008-08-26 13:14:52 +0000
+++ b/storage/ndb/test/ndbapi/test_event_merge.cpp	2008-09-17 12:12:28 +0000
@@ -20,6 +20,8 @@
 #include <my_sys.h>
 #include <ndb_version.h>
 
+#include <ndb_rand.h>
+
 // version >= 5.1 required
 
 #if !defined(min) || !defined(max)
@@ -113,7 +115,7 @@ static NdbBlob* g_bh = 0;
 static uint
 urandom()
 {
-  uint r = (uint)random();
+  uint r = (uint)ndb_rand();
   return r;
 }
 
@@ -2193,7 +2195,7 @@ setseed(int n)
     seed = n;
   }
   ll0("seed=" << seed);
-  srandom(seed);
+  ndb_srand(seed);
 }
 
 static int

=== modified file 'storage/ndb/test/ndbapi/test_event_multi_table.cpp' (properties changed: -x to +x)
--- a/storage/ndb/test/ndbapi/test_event_multi_table.cpp	2008-08-21 05:06:43 +0000
+++ b/storage/ndb/test/ndbapi/test_event_multi_table.cpp	2008-09-17 12:12:28 +0000
@@ -73,7 +73,7 @@ static int copy_events(Ndb *ndb)
     }
     int error= 0;
     NdbEventOperation *pOp;
-    while ((pOp= ndb->nextEvent(&error)))
+    while ((pOp= ndb->nextEvent()))
     {
       char buf[1024];
       sprintf(buf, "%s_SHADOW", pOp->getTable()->getName());
@@ -251,14 +251,12 @@ static int verify_copy(Ndb *ndb,
   return 0;
 }
 
-NDB_STD_OPTS_VARS;
-
 static const char* _dbname = "TEST_DB";
 struct my_option my_long_options[] =
 {
   NDB_STD_OPTS(""),
   { "database", 'd', "Name of database table is in",
-    (gptr*) &_dbname, (gptr*) &_dbname, 0,
+    (uchar**) &_dbname, (uchar**) &_dbname, 0,
     GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0 },
   { 0, 0, 0, 0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0}
 };

Thread
bzr commit into mysql-5.1 branch (stewart:2841) Stewart Smith17 Sep