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-02-20 23:30:52+11:00, stewart@stripped +9 -0
[PATCH] Fix NDB compiler warnings introduced into 5.0-ndbwin32
(slight change from Jack's patch)
ndb/src/common/portlib/NdbConfig.c@stripped, 2008-02-15 00:27:41+11:00, stewart@stripped +1 -0
Fix NDB compiler warnings introduced into 5.0-ndbwin32
ndb/src/common/portlib/NdbDaemon.c@stripped, 2008-02-15 00:27:41+11:00, stewart@stripped +6 -1
Fix NDB compiler warnings introduced into 5.0-ndbwin32
ndb/src/mgmclient/main.cpp@stripped, 2008-02-15 00:27:41+11:00, stewart@stripped +4 -1
Fix NDB compiler warnings introduced into 5.0-ndbwin32
ndb/tools/delete_all.cpp@stripped, 2008-02-15 00:27:41+11:00, stewart@stripped +3 -13
Fix NDB compiler warnings introduced into 5.0-ndbwin32
ndb/tools/desc.cpp@stripped, 2008-02-15 00:27:41+11:00, stewart@stripped +0 -14
Fix NDB compiler warnings introduced into 5.0-ndbwin32
ndb/tools/listTables.cpp@stripped, 2008-02-15 00:27:41+11:00, stewart@stripped +0 -17
Fix NDB compiler warnings introduced into 5.0-ndbwin32
ndb/tools/ndb_config.cpp@stripped, 2008-02-15 00:27:41+11:00, stewart@stripped +2 -12
Fix NDB compiler warnings introduced into 5.0-ndbwin32
ndb/tools/restore/restore_main.cpp@stripped, 2008-02-15 00:27:41+11:00, stewart@stripped +2 -13
Fix NDB compiler warnings introduced into 5.0-ndbwin32
ndb/tools/waiter.cpp@stripped, 2008-02-15 00:27:41+11:00, stewart@stripped +0 -8
Fix NDB compiler warnings introduced into 5.0-ndbwin32
diff -Nrup a/ndb/src/common/portlib/NdbConfig.c b/ndb/src/common/portlib/NdbConfig.c
--- a/ndb/src/common/portlib/NdbConfig.c 2008-01-30 15:01:19 +11:00
+++ b/ndb/src/common/portlib/NdbConfig.c 2008-02-15 00:27:41 +11:00
@@ -17,6 +17,7 @@
#include <NdbConfig.h>
#include <NdbEnv.h>
#include <NdbMem.h>
+#include <NdbHost.h>
#include <basestring_vsnprintf.h>
static const char *datadir_path= 0;
diff -Nrup a/ndb/src/common/portlib/NdbDaemon.c b/ndb/src/common/portlib/NdbDaemon.c
--- a/ndb/src/common/portlib/NdbDaemon.c 2008-01-30 15:01:19 +11:00
+++ b/ndb/src/common/portlib/NdbDaemon.c 2008-02-15 00:27:41 +11:00
@@ -14,6 +14,8 @@
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
#include <ndb_global.h>
+#include <basestring_vsnprintf.h>
+#include <NdbHost.h>
#include "NdbDaemon.h"
#define NdbDaemon_ErrorSize 500
@@ -35,7 +37,8 @@ struct Dstate
NdbDaemonMain restofmain;
} dstate;
-int nothing(void*p){return 0; }
+int nothing(void *p)
+{ (void)p; return 0; }
int
NdbDaemon_Make(const char* lockfile, const char* logfile, unsigned flags)
@@ -49,7 +52,9 @@ NdbDaemon_c(const char*argv0,const char*
dstate.lockfd = -1, dstate.logfd = -1;
dstate.lockfile=lockfile, dstate.logfile=logfile;
dstate.restofmain=restofmain;
+
(void)flags; /* remove warning for unused parameter */
+ (void)argv0;
/* Check that we have write access to lock file */
assert(dstate.lockfile != NULL);
diff -Nrup a/ndb/src/mgmclient/main.cpp b/ndb/src/mgmclient/main.cpp
--- a/ndb/src/mgmclient/main.cpp 2008-02-11 16:23:38 +11:00
+++ b/ndb/src/mgmclient/main.cpp 2008-02-15 00:27:41 +11:00
@@ -66,7 +66,8 @@ static unsigned _try_reconnect;
static const char *prompt= default_prompt;
static char *opt_execute_str= 0;
-extern "C" struct my_option my_long_options[] =
+extern "C" {
+struct my_option my_long_options[] =
{
NDB_STD_OPTS("ndb_mgm"),
{ "execute", 'e',
@@ -79,6 +80,8 @@ extern "C" struct my_option my_long_opti
GET_UINT, REQUIRED_ARG, 3, 0, 0, 0, 0, 0 },
{ 0, 0, 0, 0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0}
};
+} // extern C
+
static void short_usage_sub(void)
{
printf("Usage: %s [OPTIONS] [hostname [port]]\n", my_progname);
diff -Nrup a/ndb/tools/delete_all.cpp b/ndb/tools/delete_all.cpp
--- a/ndb/tools/delete_all.cpp 2008-02-11 16:23:38 +11:00
+++ b/ndb/tools/delete_all.cpp 2008-02-15 00:27:41 +11:00
@@ -28,6 +28,8 @@ const char *load_default_groups[]= { "my
static const char* _dbname = "TEST_DB";
static my_bool _transactional = false;
+
+extern "C" {
struct my_option my_long_options[] =
{
NDB_STD_OPTS("ndb_desc"),
@@ -39,19 +41,7 @@ struct my_option my_long_options[] =
GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0 },
{ 0, 0, 0, 0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0}
};
-static void usage()
-{
-#ifdef NOT_USED
- char desc[] =
- "tabname\n"\
- "This program will delete all records in the specified table using scan delete.\n";
-#endif
- ndb_std_print_version();
- print_defaults(MYSQL_CONFIG_NAME,load_default_groups);
- puts("");
- my_print_help(my_long_options);
- my_print_variables(my_long_options);
-}
+} // extern C
int main(int argc, char** argv){
NDB_INIT(argv[0]);
diff -Nrup a/ndb/tools/desc.cpp b/ndb/tools/desc.cpp
--- a/ndb/tools/desc.cpp 2008-02-11 16:23:38 +11:00
+++ b/ndb/tools/desc.cpp 2008-02-15 00:27:41 +11:00
@@ -38,20 +38,6 @@ struct my_option my_long_options[] =
GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0 },
{ 0, 0, 0, 0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0}
};
-static void usage()
-{
-#ifdef NOT_USED
- char desc[] =
- "tabname\n"\
- "This program list all properties of table(s) in NDB Cluster.\n"\
- " ex: desc T1 T2 T4\n";
-#endif
- ndb_std_print_version();
- print_defaults(MYSQL_CONFIG_NAME,load_default_groups);
- puts("");
- my_print_help(my_long_options);
- my_print_variables(my_long_options);
-}
static void print_part_info(Ndb* pNdb, NDBT_Table* pTab);
diff -Nrup a/ndb/tools/listTables.cpp b/ndb/tools/listTables.cpp
--- a/ndb/tools/listTables.cpp 2008-02-11 16:23:38 +11:00
+++ b/ndb/tools/listTables.cpp 2008-02-15 00:27:41 +11:00
@@ -185,23 +185,6 @@ struct my_option my_long_options[] =
GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0 },
{ 0, 0, 0, 0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0}
};
-static void usage()
-{
-#ifdef NOT_USED
- char desc[] =
- "tabname\n"\
- "This program list all system objects in NDB Cluster.\n"\
- "Type of objects to display can be limited with -t option\n"\
- " ex: ndb_show_tables -t 2 would show all UserTables\n"\
- "To show all indexes for a table write table name as final argument\n"\
- " ex: ndb_show_tables T1\n";
-#endif
- ndb_std_print_version();
- print_defaults(MYSQL_CONFIG_NAME,load_default_groups);
- puts("");
- my_print_help(my_long_options);
- my_print_variables(my_long_options);
-}
int main(int argc, char** argv){
NDB_INIT(argv[0]);
diff -Nrup a/ndb/tools/ndb_config.cpp b/ndb/tools/ndb_config.cpp
--- a/ndb/tools/ndb_config.cpp 2008-02-11 16:23:38 +11:00
+++ b/ndb/tools/ndb_config.cpp 2008-02-15 00:27:41 +11:00
@@ -52,6 +52,7 @@ int g_print_full_config;
typedef ndb_mgm_configuration_iterator Iter;
+extern "C" {
struct my_option my_long_options[] =
{
NDB_STD_OPTS("ndb_config"),
@@ -90,18 +91,7 @@ struct my_option my_long_options[] =
0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
{ 0, 0, 0, 0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0}
};
-
-static void usage()
-{
- char desc[] =
- "This program will retreive config options for a ndb cluster\n";
- puts(desc);
- ndb_std_print_version();
- print_defaults(MYSQL_CONFIG_NAME,load_default_groups);
- puts("");
- my_print_help(my_long_options);
- my_print_variables(my_long_options);
-}
+} // extern C
/**
* Match/Apply framework
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-11 16:23:38 +11:00
+++ b/ndb/tools/restore/restore_main.cpp 2008-02-15 00:27:41 +11:00
@@ -85,6 +85,7 @@ static const char *opt_lines_terminated_
static const char *tab_path= NULL;
static int opt_append;
+extern "C" {
struct my_option my_long_options[] =
{
NDB_STD_OPTS("ndb_restore"),
@@ -162,20 +163,8 @@ struct my_option my_long_options[] =
GET_INT, REQUIRED_ARG, 1, 0, 255, 0, 0, 0 },
{ 0, 0, 0, 0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0}
};
+} // extern C
-static void short_usage_sub(void)
-{
- printf("Usage: %s [OPTIONS] [<path to backup files>]\n", my_progname);
-}
-static void usage()
-{
- short_usage_sub();
- ndb_std_print_version();
- print_defaults(MYSQL_CONFIG_NAME,load_default_groups);
- puts("");
- my_print_help(my_long_options);
- my_print_variables(my_long_options);
-}
static my_bool
get_one_option(int optid, const struct my_option *opt __attribute__((unused)),
char *argument)
diff -Nrup a/ndb/tools/waiter.cpp b/ndb/tools/waiter.cpp
--- a/ndb/tools/waiter.cpp 2008-02-11 16:23:38 +11:00
+++ b/ndb/tools/waiter.cpp 2008-02-15 00:27:41 +11:00
@@ -61,14 +61,6 @@ struct my_option my_long_options[] =
{ 0, 0, 0, 0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0}
};
}
-static void usage()
-{
- ndb_std_print_version();
- print_defaults(MYSQL_CONFIG_NAME,load_default_groups);
- puts("");
- my_print_help(my_long_options);
- my_print_variables(my_long_options);
-}
int main(int argc, char** argv){
NDB_INIT(argv[0]);
| Thread |
|---|
| • bk commit into 5.0 tree (stewart:1.2523) | Stewart Smith | 20 Feb |