List:Commits« Previous MessageNext Message »
From:magnus.blaudd Date:October 11 2012 11:14am
Subject:bzr push into mysql-5.1-telco-7.0 branch (magnus.blaudd:4996 to 4997)
View as plain text  
 4997 magnus.blaudd@stripped	2012-10-11 [merge]
      Merge

    modified:
      storage/ndb/tools/delete_all.cpp
      storage/ndb/tools/desc.cpp
      storage/ndb/tools/drop_index.cpp
      storage/ndb/tools/drop_tab.cpp
      storage/ndb/tools/listTables.cpp
      storage/ndb/tools/ndb_config.cpp
      storage/ndb/tools/ndbinfo_select_all.cpp
      storage/ndb/tools/restore/restore_main.cpp
      storage/ndb/tools/select_all.cpp
      storage/ndb/tools/select_count.cpp
      storage/ndb/tools/waiter.cpp
 4996 Ole John Aske	2012-10-04
      Refactor ERROR_INSERT code in SPJ block such that actions taken
      in composite ERROR_INSERT conditions can be recognized as unused
      code and removed by compiler when -DERROR_INSERT was not defined.
      
      Generally the ERROR_INSERT(nn) should be checked *first* in a
      '||' term in the if-conditions, else anything preceding the 
      ERROR_INSERT(n) has to be evaluated:
      
      in the condition:
      
            if (ERROR_INSERTED_CLEAR(17060) ||
                ((rand() % 7) == 0 && ERROR_INSERTED_CLEAR(17061)) ||
                ((treeNodePtr.p->isLeaf() && ERROR_INSERTED_CLEAR(17062))) ||
                ((treeNodePtr.p->m_parentPtrI != RNIL && ERROR_INSERTED_CLEAR(17063))))
      
      Both the function 'rand()' and 'isLeaf()' was called even when
      compiled wo/ -DERROR_INSERT!
      
      So the pattern in this fix is to rewrite such construct to:
      
            if (ERROR_INSERTED(17060) ||
               (ERROR_INSERTED(17061) && (treeNodePtr.p->isLeaf())) ||
               (ERROR_INSERTED(17062) && (treeNodePtr.p->m_parentPtrI != RNIL)) ||
               (ERROR_INSERTED(17063) && (rand() % 7) == 0))
            {
              jam();
              CLEAR_ERROR_INSERT_VALUE;
      
      Which could then be entirely removed when compiled wo / DERROR_INSERT.

    modified:
      storage/ndb/src/kernel/blocks/dbspj/DbspjMain.cpp
=== modified file 'storage/ndb/tools/delete_all.cpp'
--- a/storage/ndb/tools/delete_all.cpp	2011-06-30 15:59:25 +0000
+++ b/storage/ndb/tools/delete_all.cpp	2012-07-10 08:48:58 +0000
@@ -64,7 +64,7 @@ static void usage()
 int main(int argc, char** argv){
   NDB_INIT(argv[0]);
   ndb_opt_set_usage_funcs(short_usage_sub, usage);
-  load_defaults("my",load_default_groups,&argc,&argv);
+  ndb_load_defaults(NULL,load_default_groups,&argc,&argv);
   int ho_error;
 #ifndef DBUG_OFF
   opt_debug= "d:t:O,/tmp/ndb_delete_all.trace";

=== modified file 'storage/ndb/tools/desc.cpp'
--- a/storage/ndb/tools/desc.cpp	2012-09-21 12:25:04 +0000
+++ b/storage/ndb/tools/desc.cpp	2012-10-11 10:32:22 +0000
@@ -84,7 +84,7 @@ int main(int argc, char** argv){
   NDB_INIT(argv[0]);
 
   ndb_opt_set_usage_funcs(short_usage_sub, usage);
-  load_defaults("my",load_default_groups,&argc,&argv);
+  ndb_load_defaults(NULL,load_default_groups,&argc,&argv);
   int ho_error;
 #ifndef DBUG_OFF
   opt_debug= "d:t:O,/tmp/ndb_desc.trace";

=== modified file 'storage/ndb/tools/drop_index.cpp'
--- a/storage/ndb/tools/drop_index.cpp	2011-06-30 15:59:25 +0000
+++ b/storage/ndb/tools/drop_index.cpp	2012-07-10 08:48:58 +0000
@@ -48,7 +48,7 @@ static void usage()
 int main(int argc, char** argv){
   NDB_INIT(argv[0]);
   ndb_opt_set_usage_funcs(short_usage_sub, usage);
-  load_defaults("my",load_default_groups,&argc,&argv);
+  ndb_load_defaults(NULL,load_default_groups,&argc,&argv);
   int ho_error;
   if ((ho_error=handle_options(&argc, &argv, my_long_options,
 			       ndb_std_get_one_option)))

=== modified file 'storage/ndb/tools/drop_tab.cpp'
--- a/storage/ndb/tools/drop_tab.cpp	2011-06-30 15:59:25 +0000
+++ b/storage/ndb/tools/drop_tab.cpp	2012-07-10 08:48:58 +0000
@@ -48,7 +48,7 @@ static void usage()
 int main(int argc, char** argv){
   NDB_INIT(argv[0]);
   ndb_opt_set_usage_funcs(short_usage_sub, usage);
-  load_defaults("my",load_default_groups,&argc,&argv);
+  ndb_load_defaults(NULL,load_default_groups,&argc,&argv);
   int ho_error;
   if ((ho_error=handle_options(&argc, &argv, my_long_options,
 			       ndb_std_get_one_option)))

=== modified file 'storage/ndb/tools/listTables.cpp'
--- a/storage/ndb/tools/listTables.cpp	2011-06-30 15:59:25 +0000
+++ b/storage/ndb/tools/listTables.cpp	2012-07-10 08:48:58 +0000
@@ -293,7 +293,7 @@ int main(int argc, char** argv){
   NDB_INIT(argv[0]);
   const char* _tabname;
   ndb_opt_set_usage_funcs(short_usage_sub, usage);
-  load_defaults("my",load_default_groups,&argc,&argv);
+  ndb_load_defaults(NULL,load_default_groups,&argc,&argv);
   int ho_error;
 #ifndef DBUG_OFF
   opt_debug= "d:t:O,/tmp/ndb_show_tables.trace";

=== modified file 'storage/ndb/tools/ndb_config.cpp'
--- a/storage/ndb/tools/ndb_config.cpp	2011-09-01 16:04:16 +0000
+++ b/storage/ndb/tools/ndb_config.cpp	2012-07-10 08:48:58 +0000
@@ -64,10 +64,6 @@
 #include <ndb_global.h>
 #include <ndb_opts.h>
 
-#include <my_sys.h>
-#include <my_getopt.h>
-#include <mysql_version.h>
-
 #include <NdbOut.hpp>
 #include <mgmapi.h>
 #include "../src/mgmapi/mgmapi_configuration.hpp"
@@ -211,7 +207,7 @@ int
 main(int argc, char** argv){
   NDB_INIT(argv[0]);
   ndb_opt_set_usage_funcs(short_usage_sub, usage);
-  load_defaults("my",load_default_groups,&argc,&argv);
+  ndb_load_defaults(NULL,load_default_groups,&argc,&argv);
   int ho_error;
   if ((ho_error=handle_options(&argc, &argv, my_long_options,
 			       ndb_std_get_one_option)))

=== modified file 'storage/ndb/tools/ndbinfo_select_all.cpp'
--- a/storage/ndb/tools/ndbinfo_select_all.cpp	2011-10-07 09:17:10 +0000
+++ b/storage/ndb/tools/ndbinfo_select_all.cpp	2012-07-10 08:48:58 +0000
@@ -55,7 +55,7 @@ main(int argc, char** argv)
 {
   NDB_INIT(argv[0]);
   ndb_opt_set_usage_funcs(short_usage_sub, usage);
-  load_defaults("my",load_default_groups,&argc,&argv);
+  ndb_load_defaults(NULL,load_default_groups,&argc,&argv);
   int ho_error;
 #ifndef DBUG_OFF
   opt_debug= "d:t:O,/tmp/ndbinfo_select_all.trace";

=== modified file 'storage/ndb/tools/restore/restore_main.cpp'
--- a/storage/ndb/tools/restore/restore_main.cpp	2011-06-30 15:59:25 +0000
+++ b/storage/ndb/tools/restore/restore_main.cpp	2012-07-10 08:48:58 +0000
@@ -533,7 +533,7 @@ readArguments(int *pargc, char*** pargv)
   const char *load_default_groups[]= { "mysql_cluster","ndb_restore",0 };
 
   init_nodegroup_map();
-  load_defaults("my",load_default_groups,pargc,pargv);
+  ndb_load_defaults(NULL,load_default_groups,pargc,pargv);
   debug << "handle_options" << endl;
 
   ndb_opt_set_usage_funcs(short_usage_sub, usage);

=== modified file 'storage/ndb/tools/select_all.cpp'
--- a/storage/ndb/tools/select_all.cpp	2011-06-30 15:59:25 +0000
+++ b/storage/ndb/tools/select_all.cpp	2012-07-10 08:48:58 +0000
@@ -117,7 +117,7 @@ static void usage()
 int main(int argc, char** argv){
   NDB_INIT(argv[0]);
   ndb_opt_set_usage_funcs(short_usage_sub, usage);
-  load_defaults("my",load_default_groups,&argc,&argv);
+  ndb_load_defaults(NULL, load_default_groups,&argc,&argv);
   const char* _tabname;
   int ho_error;
 #ifndef DBUG_OFF

=== modified file 'storage/ndb/tools/select_count.cpp'
--- a/storage/ndb/tools/select_count.cpp	2011-06-30 15:59:25 +0000
+++ b/storage/ndb/tools/select_count.cpp	2012-07-10 08:48:58 +0000
@@ -67,7 +67,7 @@ static void usage()
 int main(int argc, char** argv){
   NDB_INIT(argv[0]);
   ndb_opt_set_usage_funcs(short_usage_sub, usage);
-  load_defaults("my",load_default_groups,&argc,&argv);
+  ndb_load_defaults(NULL,load_default_groups,&argc,&argv);
   int ho_error;
 #ifndef DBUG_OFF
   opt_debug= "d:t:O,/tmp/ndb_select_count.trace";

=== modified file 'storage/ndb/tools/waiter.cpp'
--- a/storage/ndb/tools/waiter.cpp	2011-10-21 08:59:23 +0000
+++ b/storage/ndb/tools/waiter.cpp	2012-07-10 08:48:58 +0000
@@ -88,7 +88,7 @@ void catch_signal(int signum)
 int main(int argc, char** argv){
   NDB_INIT(argv[0]);
   ndb_opt_set_usage_funcs(short_usage_sub, usage);
-  load_defaults("my",load_default_groups,&argc,&argv);
+  ndb_load_defaults(NULL,load_default_groups,&argc,&argv);
 
 #ifndef DBUG_OFF
   opt_debug= "d:t:O,/tmp/ndb_waiter.trace";

No bundle (reason: useless for push emails).
Thread
bzr push into mysql-5.1-telco-7.0 branch (magnus.blaudd:4996 to 4997) magnus.blaudd12 Oct