List:Commits« Previous MessageNext Message »
From:Pekka Nousiainen Date:June 14 2011 10:49am
Subject:bzr push into mysql-5.1-telco-7.0-wl4124-new0 branch (pekka.nousiainen:4396
to 4397) WL#4124
View as plain text  
 4397 Pekka Nousiainen	2011-06-14
      wl#4124 x07_fix.diff
      build fixes

    modified:
      storage/ndb/src/ndbapi/CMakeLists.txt
      storage/ndb/src/ndbapi/NdbIndexStatImpl.cpp
      storage/ndb/tools/CMakeLists.txt
      storage/ndb/tools/ndb_dump_frm_data.cpp
      storage/ndb/tools/ndb_index_stat.cpp
 4396 Pekka Nousiainen	2011-06-12
      wl#4124 d05_systab.diff
      change to mysql names and add FRM

    added:
      storage/ndb/src/ndbapi/NdbIndexStatFrmData.cpp
      storage/ndb/tools/ndb_dump_frm_data.cpp
    modified:
      storage/ndb/include/kernel/ndb_limits.h
      storage/ndb/include/ndb_constants.h
      storage/ndb/src/kernel/blocks/trix/Trix.cpp
      storage/ndb/src/ndbapi/Makefile.am
      storage/ndb/src/ndbapi/NdbIndexStatImpl.cpp
      storage/ndb/src/ndbapi/NdbIndexStatImpl.hpp
      storage/ndb/tools/Makefile.am
      storage/ndb/tools/ndb_index_stat.cpp
=== modified file 'storage/ndb/src/ndbapi/CMakeLists.txt'
--- a/storage/ndb/src/ndbapi/CMakeLists.txt	2011-06-06 12:18:27 +0000
+++ b/storage/ndb/src/ndbapi/CMakeLists.txt	2011-06-14 10:42:04 +0000
@@ -21,7 +21,8 @@ ADD_LIBRARY(ndbapi STATIC
             NdbEventOperation.cpp
             NdbEventOperationImpl.cpp
             NdbIndexStat.cpp
-	    NdbIndexStatImpl.cpp
+            NdbIndexStatImpl.cpp
+            NdbIndexStatFrmData.cpp
             NdbInterpretedCode.cpp
             TransporterFacade.cpp
             ClusterMgr.cpp

=== modified file 'storage/ndb/src/ndbapi/NdbIndexStatImpl.cpp'
--- a/storage/ndb/src/ndbapi/NdbIndexStatImpl.cpp	2011-06-12 16:54:32 +0000
+++ b/storage/ndb/src/ndbapi/NdbIndexStatImpl.cpp	2011-06-14 10:42:04 +0000
@@ -2282,7 +2282,7 @@ NdbIndexStatImpl::MemDefault::mem_free(v
   {
     Item* item = (Item*)ptr - 1;
     assert(item->m_magic == MemMagic);
-    Uint32 size = item->m_size;
+    size_t size = item->m_size;
     item->m_magic = 0;
     my_free(item, MYF(0));
     assert(m_used >= size);

=== modified file 'storage/ndb/tools/CMakeLists.txt'
--- a/storage/ndb/tools/CMakeLists.txt	2011-05-24 11:51:39 +0000
+++ b/storage/ndb/tools/CMakeLists.txt	2011-06-14 10:42:04 +0000
@@ -82,6 +82,14 @@ ADD_CUSTOM_COMMAND(OUTPUT ${PROJECT_SOUR
 ADD_CUSTOM_TARGET(ndbinfo_sql_run ALL
 				  DEPENDS ${PROJECT_SOURCE_DIR}/storage/ndb/tools/ndbinfo.sql)
 
+MYSQL_ADD_EXECUTABLE(ndb_index_stat
+  ndb_index_stat.cpp
+  COMPONENT ClusterTools)
+TARGET_LINK_LIBRARIES(ndb_index_stat ndbNDBT ndbgeneral)
+
+ADD_EXECUTABLE(ndb_dump_frm_data
+  ndb_dump_frm_data.cpp)
+TARGET_LINK_LIBRARIES(ndb_dump_frm_data ndbNDBT ndbgeneral)
 
 IF (MYSQL_VERSION_ID LESS "50501")
   # Don't build or install this program anymore in 5.5+

=== modified file 'storage/ndb/tools/ndb_dump_frm_data.cpp'
--- a/storage/ndb/tools/ndb_dump_frm_data.cpp	2011-06-12 16:54:32 +0000
+++ b/storage/ndb/tools/ndb_dump_frm_data.cpp	2011-06-14 10:42:04 +0000
@@ -20,7 +20,7 @@
 #include <NdbApi.hpp>
 #include <NDBT.hpp>
 
-static int oi = 1000;
+// UNUSED static int oi = 1000;
 static struct my_option
 my_long_options[] =
 {

=== modified file 'storage/ndb/tools/ndb_index_stat.cpp'
--- a/storage/ndb/tools/ndb_index_stat.cpp	2011-06-12 16:54:32 +0000
+++ b/storage/ndb/tools/ndb_index_stat.cpp	2011-06-14 10:42:04 +0000
@@ -20,6 +20,7 @@
 #include <NdbApi.hpp>
 #include <NDBT.hpp>
 #include <NdbIndexStatImpl.hpp>
+#include <ndb_rand.h>
 
 // stats options
 static const char* _dbname = 0;
@@ -207,18 +208,18 @@ doquery()
         NdbIndexStat::Bound& b = (i == 0 ? b_lo : b_hi);
 
         bool strict = false;
-        if (random() % 3 != 0)
+        if (ndb_rand() % 3 != 0)
         {
-          if (random() % 3 != 0)
+          if (ndb_rand() % 3 != 0)
           {
-            Uint32 x = random();
+            Uint32 x = ndb_rand();
             CHK2(g_is->add_bound(b, &x) == 0, g_is->getNdbError());
           }
           else
           {
             CHK2(g_is->add_bound_null(b) == 0, g_is->getNdbError());
           }
-          bool strict = (random() % 2 == 0);
+          bool strict = (ndb_rand() % 2 == 0);
           g_is->set_bound_strict(b, strict);
         }
       }
@@ -251,7 +252,7 @@ dostats(int i)
     if (_delete)
     {
       g_info << g_indname << ": delete stats" << endl;
-      if (random() % 2 == 0)
+      if (ndb_rand() % 2 == 0)
       {
         CHK2(g_dic->deleteIndexStat(*g_ind, *g_tab) == 0, g_dic->getNdbError());
       }
@@ -264,7 +265,7 @@ dostats(int i)
     if (_update)
     {
       g_info << g_indname << ": update stats" << endl;
-      if (random() % 2 == 0)
+      if (ndb_rand() % 2 == 0)
       {
         CHK2(g_dic->updateIndexStat(*g_ind, *g_tab) == 0, g_dic->getNdbError());
       }
@@ -615,8 +616,6 @@ main(int argc, char** argv)
   my_progname = "ndb_index_stat";
   int ret;
 
-  srandom((unsigned)time(0));
-
   ndb_init();
   ndb_opt_set_usage_funcs(short_usage_sub, usage);
   ret = handle_options(&argc, &argv, my_long_options, ndb_std_get_one_option);
@@ -625,6 +624,10 @@ main(int argc, char** argv)
 
   setOutputLevel(_verbose ? 2 : 0);
 
+  unsigned seed = (unsigned)time(0);
+  g_info << "random seed " << seed << endl;
+  ndb_srand(seed);
+
   ret = doall();
   if (ret == -1)
     return NDBT_ProgramExit(NDBT_FAILED);

No bundle (reason: useless for push emails).
Thread
bzr push into mysql-5.1-telco-7.0-wl4124-new0 branch (pekka.nousiainen:4396to 4397) WL#4124Pekka Nousiainen14 Jun