List:Commits« Previous MessageNext Message »
From:Stewart Smith Date:March 12 2008 7:45am
Subject:bk commit into 5.0 tree (stewart:1.2537)
View as plain text  
Below is the list of changes that have just been committed into a local
5.0 repository of stewart. When stewart does a push these changes will
be propagated to the main repository and, within 24 hours after the
push, to the public repository.
For information on how to access the public repository
see http://dev.mysql.com/doc/mysql/en/installing-source-tree.html

ChangeSet@stripped, 2008-03-12 18:45:06+11:00, stewart@willster.(none) +16 -0
  WL4012 ndb_mgmd on win32: build fixes

  ndb/src/CMakeLists.txt@stripped, 2008-03-12 18:45:02+11:00, stewart@willster.(none) +1 -0
    add win32portlib to build for ndbclient

  ndb/src/kernel/CMakeLists.txt@stripped, 2008-03-12 18:45:02+11:00, stewart@willster.(none) +1 -1
    on WIN32, we need win32 portlib

  ndb/src/mgmclient/CMakeLists.txt@stripped, 2008-03-12 18:45:02+11:00, stewart@willster.(none) +1 -1
    add win32 portlib on win32

  ndb/src/mgmclient/main.cpp@stripped, 2008-03-12 18:45:02+11:00, stewart@willster.(none) +1 -1
    fix build: load_defaults_group shouldbe extern C

  ndb/test/src/HugoAsynchTransactions.cpp@stripped, 2008-03-12 18:45:03+11:00, stewart@willster.(none) +1 -0
    add missing #include

  ndb/tools/delete_all.cpp@stripped, 2008-03-12 18:45:03+11:00, stewart@willster.(none) +1 -1
    fix build: load_defaults_group shouldbe extern C

  ndb/tools/desc.cpp@stripped, 2008-03-12 18:45:03+11:00, stewart@willster.(none) +2 -2
    fix build: load_defaults_group shouldbe extern C

  ndb/tools/drop_index.cpp@stripped, 2008-03-12 18:45:03+11:00, stewart@willster.(none) +2 -2
    fix build: load_defaults_group shouldbe extern C

  ndb/tools/drop_tab.cpp@stripped, 2008-03-12 18:45:03+11:00, stewart@willster.(none) +2 -2
    fix build: load_defaults_group shouldbe extern C

  ndb/tools/listTables.cpp@stripped, 2008-03-12 18:45:03+11:00, stewart@willster.(none) +3 -2
    fix build: load_defaults_group shouldbe extern C

  ndb/tools/ndb_config.cpp@stripped, 2008-03-12 18:45:04+11:00, stewart@willster.(none) +6 -4
    use portable my_get_hostbyname_r instead of non-portable gehostbyname

  ndb/tools/restore/consumer_restore.cpp@stripped, 2008-03-12 18:45:05+11:00, stewart@willster.(none) +1 -6
    opt_core is something else now... not around (should be fixed)

  ndb/tools/restore/restore_main.cpp@stripped, 2008-03-12 18:45:05+11:00, stewart@willster.(none) +1 -1
    fix build: load_defaults_group shouldbe extern C

  ndb/tools/select_all.cpp@stripped, 2008-03-12 18:45:04+11:00, stewart@willster.(none) +2 -2
    fix build: load_defaults_group shouldbe extern C

  ndb/tools/select_count.cpp@stripped, 2008-03-12 18:45:04+11:00, stewart@willster.(none) +2 -2
    fix build: load_defaults_group shouldbe extern C

  ndb/tools/waiter.cpp@stripped, 2008-03-12 18:45:04+11:00, stewart@willster.(none) +1 -1
    fix build: load_defaults_group shouldbe extern C

diff -Nrup a/ndb/src/CMakeLists.txt b/ndb/src/CMakeLists.txt
--- a/ndb/src/CMakeLists.txt	2008-03-12 17:06:30 +11:00
+++ b/ndb/src/CMakeLists.txt	2008-03-12 18:45:02 +11:00
@@ -51,6 +51,7 @@ ADD_DEPENDENCIES(ndbclient
                  ndbmgmsrv
                  ndblogger
                  ndbportlib
+		 ndbwin32portlib
                  ndbgeneral)
 
 ELSE(WIN32)
diff -Nrup a/ndb/src/kernel/CMakeLists.txt b/ndb/src/kernel/CMakeLists.txt
--- a/ndb/src/kernel/CMakeLists.txt	2007-12-13 23:56:05 +11:00
+++ b/ndb/src/kernel/CMakeLists.txt	2008-03-12 18:45:02 +11:00
@@ -67,7 +67,7 @@ LINK_LIBRARIES(ndbcmvmi
                strings
                ${NDB_SCI_LIBS})
 IF(WIN32)
-LINK_LIBRARIES(wsock32)
+LINK_LIBRARIES(wsock32 ndbwin32portlib)
 ENDIF(WIN32)
 
 ADD_EXECUTABLE(ndbd
diff -Nrup a/ndb/src/mgmclient/CMakeLists.txt b/ndb/src/mgmclient/CMakeLists.txt
--- a/ndb/src/mgmclient/CMakeLists.txt	2007-12-13 23:56:06 +11:00
+++ b/ndb/src/mgmclient/CMakeLists.txt	2008-03-12 18:45:02 +11:00
@@ -30,7 +30,7 @@ LINK_LIBRARIES(ndbmgmclient
                mysys
                strings)
 IF(WIN32)
-LINK_LIBRARIES(wsock32)
+LINK_LIBRARIES(wsock32 ndbwin32portlib)
 ENDIF(WIN32)
 
 
diff -Nrup a/ndb/src/mgmclient/main.cpp b/ndb/src/mgmclient/main.cpp
--- a/ndb/src/mgmclient/main.cpp	2008-02-15 00:27:41 +11:00
+++ b/ndb/src/mgmclient/main.cpp	2008-03-12 18:45:02 +11:00
@@ -37,7 +37,7 @@ extern "C" int add_history(const char *c
 #include "ndb_mgmclient.hpp"
 
 const char *progname = "ndb_mgm";
-const char *load_default_groups[]= { "mysql_cluster","ndb_mgm",0 };
+extern "C" const char *load_default_groups[]= { "mysql_cluster","ndb_mgm",0 };
 
 
 static Ndb_mgmclient* com;
diff -Nrup a/ndb/test/src/HugoAsynchTransactions.cpp b/ndb/test/src/HugoAsynchTransactions.cpp
--- a/ndb/test/src/HugoAsynchTransactions.cpp	2006-12-24 06:04:22 +11:00
+++ b/ndb/test/src/HugoAsynchTransactions.cpp	2008-03-12 18:45:03 +11:00
@@ -13,6 +13,7 @@
    along with this program; if not, write to the Free Software
    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA */
 
+#include <ndb_global.h>
 #include <NdbSleep.h>
 #include <HugoAsynchTransactions.hpp>
 
diff -Nrup a/ndb/tools/delete_all.cpp b/ndb/tools/delete_all.cpp
--- a/ndb/tools/delete_all.cpp	2008-02-15 00:27:41 +11:00
+++ b/ndb/tools/delete_all.cpp	2008-03-12 18:45:03 +11:00
@@ -24,7 +24,7 @@
 static int clear_table(Ndb* pNdb, const NdbDictionary::Table* pTab,
                        bool fetch_across_commit, int parallelism=240);
 
-const char *load_default_groups[]= { "mysql_cluster",0 };
+extern "C" const char *load_default_groups[]= { "mysql_cluster",0 };
 
 static const char* _dbname = "TEST_DB";
 static my_bool _transactional = false;
diff -Nrup a/ndb/tools/desc.cpp b/ndb/tools/desc.cpp
--- a/ndb/tools/desc.cpp	2008-02-15 00:27:41 +11:00
+++ b/ndb/tools/desc.cpp	2008-03-12 18:45:03 +11:00
@@ -22,9 +22,9 @@ static const char* _dbname = "TEST_DB";
 static int _unqualified = 0;
 static int _partinfo = 0;
 
-const char *load_default_groups[]= { "mysql_cluster",0 };
+extern "C" const char *load_default_groups[]= { "mysql_cluster",0 };
 
-struct my_option my_long_options[] =
+extern "C" struct my_option my_long_options[] =
 {
   NDB_STD_OPTS("ndb_desc"),
   { "database", 'd', "Name of database table is in",
diff -Nrup a/ndb/tools/drop_index.cpp b/ndb/tools/drop_index.cpp
--- a/ndb/tools/drop_index.cpp	2008-02-11 16:23:38 +11:00
+++ b/ndb/tools/drop_index.cpp	2008-03-12 18:45:03 +11:00
@@ -22,9 +22,9 @@
 
 static const char* _dbname = "TEST_DB";
 
-const char *load_default_groups[]= { "mysql_cluster",0 };
+extern "C" const char *load_default_groups[]= { "mysql_cluster",0 };
 
-struct my_option my_long_options[] =
+extern "C" struct my_option my_long_options[] =
 {
   NDB_STD_OPTS("ndb_desc"),
   { "database", 'd', "Name of database table is in",
diff -Nrup a/ndb/tools/drop_tab.cpp b/ndb/tools/drop_tab.cpp
--- a/ndb/tools/drop_tab.cpp	2008-02-11 16:23:38 +11:00
+++ b/ndb/tools/drop_tab.cpp	2008-03-12 18:45:03 +11:00
@@ -22,9 +22,9 @@
 
 static const char* _dbname = "TEST_DB";
 
-const char *load_default_groups[]= { "mysql_cluster",0 };
+extern "C" const char *load_default_groups[]= { "mysql_cluster",0 };
 
-struct my_option my_long_options[] =
+extern "C" struct my_option my_long_options[] =
 {
   NDB_STD_OPTS("ndb_desc"),
   { "database", 'd', "Name of database table is in",
diff -Nrup a/ndb/tools/listTables.cpp b/ndb/tools/listTables.cpp
--- a/ndb/tools/listTables.cpp	2008-02-15 00:27:41 +11:00
+++ b/ndb/tools/listTables.cpp	2008-03-12 18:45:03 +11:00
@@ -31,7 +31,7 @@ static Ndb* ndb = 0;
 static const NdbDictionary::Dictionary * dic = 0;
 static int _unqualified = 0;
 
-const char *load_default_groups[]= { "mysql_cluster",0 };
+extern "C" const char *load_default_groups[]= { "mysql_cluster",0 };
 
 static void
 fatal(char const* fmt, ...)
@@ -168,7 +168,8 @@ list(const char * tabname, 
 static const char* _dbname = "TEST_DB";
 static int _loops;
 static int _type;
-struct my_option my_long_options[] =
+
+extern "C" struct my_option my_long_options[] =
 {
   NDB_STD_OPTS("ndb_show_tables"),
   { "database", 'd', "Name of database table is in",
diff -Nrup a/ndb/tools/ndb_config.cpp b/ndb/tools/ndb_config.cpp
--- a/ndb/tools/ndb_config.cpp	2008-02-15 00:27:41 +11:00
+++ b/ndb/tools/ndb_config.cpp	2008-03-12 18:45:04 +11:00
@@ -22,10 +22,9 @@
 
 #include <my_sys.h>
 #include <my_getopt.h>
+#include <my_net.h>
 #include <mysql_version.h>
 
-#include <netdb.h>
-
 #include <NdbOut.hpp>
 #include <mgmapi.h>
 #include <mgmapi_configuration.hpp>
@@ -373,10 +372,13 @@ HostMatch::eval(const Iter& iter)
   
   if(iter.get(m_key, &valc) == 0)
   {
-	  struct hostent *h1, *h2, copy1;
+	  struct hostent *h1, *h2, tmp_hostent, copy1;
 	  char *addr1;
+      char buff[GETHOSTBYNAME_BUFF_SIZE];
+      int tmp_errno;
 
-	  h1 = gethostbyname(m_value.c_str());
+      h1 = my_gethostbyname_r(m_value.c_str(),&tmp_hostent,buff,sizeof(buff),
+			    &tmp_errno);
 	  if (h1 == NULL) {
 		  return 0;
 	  }
diff -Nrup a/ndb/tools/restore/consumer_restore.cpp b/ndb/tools/restore/consumer_restore.cpp
--- a/ndb/tools/restore/consumer_restore.cpp	2007-04-13 09:37:22 +10:00
+++ b/ndb/tools/restore/consumer_restore.cpp	2008-03-12 18:45:05 +11:00
@@ -17,8 +17,6 @@
 #include "consumer_restore.hpp"
 #include <NdbSleep.h>
 
-extern my_bool opt_core;
-
 extern FilteredNdbOut err;
 extern FilteredNdbOut info;
 extern FilteredNdbOut debug;
@@ -521,10 +519,7 @@ void BackupRestore::exitHandler() 
 {
   release();
   NDBT_ProgramExit(NDBT_FAILED);
-  if (opt_core)
-    abort();
-  else
-    exit(NDBT_FAILED);
+  exit(NDBT_FAILED);
 }
 
 
diff -Nrup a/ndb/tools/restore/restore_main.cpp b/ndb/tools/restore/restore_main.cpp
--- a/ndb/tools/restore/restore_main.cpp	2008-02-15 00:27:41 +11:00
+++ b/ndb/tools/restore/restore_main.cpp	2008-03-12 18:45:05 +11:00
@@ -61,7 +61,7 @@ static int _restore_data = 0;
 static int _restore_meta = 0;
 BaseString g_options("ndb_restore");
 
-const char *load_default_groups[]= { "mysql_cluster","ndb_restore",0 };
+extern "C" const char *load_default_groups[]= { "mysql_cluster","ndb_restore",0 };
 
 enum ndb_restore_options {
   OPT_PRINT= NDB_STD_OPTIONS_LAST,
diff -Nrup a/ndb/tools/select_all.cpp b/ndb/tools/select_all.cpp
--- a/ndb/tools/select_all.cpp	2008-02-11 16:23:38 +11:00
+++ b/ndb/tools/select_all.cpp	2008-03-12 18:45:04 +11:00
@@ -40,9 +40,9 @@ static const char* _delimiter = "\t";
 static int _header, _parallelism, _useHexFormat, _lock,
   _order, _descending;
 
-const char *load_default_groups[]= { "mysql_cluster",0 };
+extern "C" const char *load_default_groups[]= { "mysql_cluster",0 };
 
-struct my_option my_long_options[] =
+extern "C" struct my_option my_long_options[] =
 {
   NDB_STD_OPTS("ndb_desc"),
   { "database", 'd', "Name of database table is in",
diff -Nrup a/ndb/tools/select_count.cpp b/ndb/tools/select_count.cpp
--- a/ndb/tools/select_count.cpp	2008-02-11 16:23:38 +11:00
+++ b/ndb/tools/select_count.cpp	2008-03-12 18:45:04 +11:00
@@ -35,9 +35,9 @@ static const char* _dbname = "TEST_DB";
 static int _parallelism = 240;
 static int _lock = 0;
 
-const char *load_default_groups[]= { "mysql_cluster",0 };
+extern "C" const char *load_default_groups[]= { "mysql_cluster",0 };
 
-struct my_option my_long_options[] =
+extern "C" struct my_option my_long_options[] =
 {
   NDB_STD_OPTS("ndb_desc"),
   { "database", 'd', "Name of database table is in",
diff -Nrup a/ndb/tools/waiter.cpp b/ndb/tools/waiter.cpp
--- a/ndb/tools/waiter.cpp	2008-02-15 00:27:41 +11:00
+++ b/ndb/tools/waiter.cpp	2008-03-12 18:45:04 +11:00
@@ -39,7 +39,7 @@ static int _not_started = 0;
 static int _single_user = 0;
 static int _timeout = 120;
 
-const char *load_default_groups[]= { "mysql_cluster",0 };
+extern "C" const char *load_default_groups[]= { "mysql_cluster",0 };
 
 extern "C" {
 struct my_option my_long_options[] =
Thread
bk commit into 5.0 tree (stewart:1.2537)Stewart Smith12 Mar