Loading ndb/include/Makefile.am +1 −0 Original line number Diff line number Diff line Loading @@ -8,6 +8,7 @@ ndb_version.h ndbapiinclude_HEADERS = \ ndbapi/ndbapi_limits.h \ ndbapi/ndb_opt_defaults.h \ ndbapi/Ndb.hpp \ ndbapi/NdbApi.hpp \ ndbapi/NdbConnection.hpp \ Loading ndb/include/mgmapi/mgmapi_config_parameters.h +1 −0 Original line number Diff line number Diff line Loading @@ -121,6 +121,7 @@ #define CFG_SHM_CHECKSUM 501 #define CFG_SHM_KEY 502 #define CFG_SHM_BUFFER_MEM 503 #define CFG_SHM_SIGNUM 504 #define CFG_SCI_HOST1_ID_0 550 #define CFG_SCI_HOST1_ID_1 551 Loading ndb/include/ndbapi/ndb_opt_defaults.h 0 → 100644 +27 −0 Original line number Diff line number Diff line /* Copyright (C) 2003 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ #ifndef NDB_OPT_DEFAULTS_H #define NDB_OPT_DEFAULTS_H #ifdef SIGRTMIN #define OPT_NDB_SHM_SIGNUM_DEFAULT SIGRTMIN+2 #else #define OPT_NDB_SHM_SIGNUM_DEFAULT 0 #endif #define OPT_NDB_SHM_DEFAULT 0 #endif ndb/include/transporter/TransporterDefinitions.hpp +1 −0 Original line number Diff line number Diff line Loading @@ -77,6 +77,7 @@ struct SHM_TransporterConfiguration { Uint32 shmKey; Uint32 shmSize; int signum; }; /** Loading ndb/include/util/ndb_opts.h +49 −10 Original line number Diff line number Diff line Loading @@ -22,24 +22,16 @@ #include <my_getopt.h> #include <mysql_version.h> #include <ndb_version.h> #include <ndb_opt_defaults.h> #define NDB_STD_OPTS_VARS \ const char *opt_connect_str= 0;\ my_bool opt_ndb_shm;\ my_bool opt_ndb_optimized_node_selection #define NDB_STD_OPTS_OPTIONS \ OPT_NDB_SHM= 256,\ OPT_NDB_OPTIMIZED_NODE_SELECTION my_bool opt_ndb_shm; #define OPT_NDB_CONNECTSTRING 'c' #if defined(NDB_SHM_TRANSPORTER) && MYSQL_VERSION_ID >= 50000 #define OPT_NDB_SHM_DEFAULT 1 #else #define OPT_NDB_SHM_DEFAULT 0 #endif #define NDB_STD_OPTS_COMMON \ { "usage", '?', "Display this help and exit.", \ 0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0 }, \ Loading Loading @@ -75,4 +67,51 @@ OPT_NDB_OPTIMIZED_NODE_SELECTION #define NDB_STD_OPTS(prog_name) NDB_STD_OPTS_COMMON #endif static void ndb_std_print_version() { printf("MySQL distrib %s, for %s (%s)\n", MYSQL_SERVER_VERSION,SYSTEM_TYPE,MACHINE_TYPE); } static void usage(); enum ndb_std_options { OPT_NDB_SHM= 256, OPT_NDB_SHM_SIGNUM, OPT_NDB_OPTIMIZED_NODE_SELECTION, NDB_STD_OPTIONS_LAST /* should always be last in this enum */ }; static my_bool ndb_std_get_one_option(int optid, const struct my_option *opt __attribute__((unused)), const char *argument) { switch (optid) { case '#': if (argument) { DBUG_PUSH(argument); } break; case 'V': ndb_std_print_version(); exit(0); case '?': usage(); exit(0); case OPT_NDB_SHM: if (opt_ndb_shm) { #ifndef NDB_SHM_TRANSPORTER printf("Warning: binary not compiled with shared memory support,\n" "Tcp connections will now be used instead\n"); opt_ndb_shm= 0; #endif } break; } return 0; } #endif /*_NDB_OPTS_H */ Loading
ndb/include/Makefile.am +1 −0 Original line number Diff line number Diff line Loading @@ -8,6 +8,7 @@ ndb_version.h ndbapiinclude_HEADERS = \ ndbapi/ndbapi_limits.h \ ndbapi/ndb_opt_defaults.h \ ndbapi/Ndb.hpp \ ndbapi/NdbApi.hpp \ ndbapi/NdbConnection.hpp \ Loading
ndb/include/mgmapi/mgmapi_config_parameters.h +1 −0 Original line number Diff line number Diff line Loading @@ -121,6 +121,7 @@ #define CFG_SHM_CHECKSUM 501 #define CFG_SHM_KEY 502 #define CFG_SHM_BUFFER_MEM 503 #define CFG_SHM_SIGNUM 504 #define CFG_SCI_HOST1_ID_0 550 #define CFG_SCI_HOST1_ID_1 551 Loading
ndb/include/ndbapi/ndb_opt_defaults.h 0 → 100644 +27 −0 Original line number Diff line number Diff line /* Copyright (C) 2003 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ #ifndef NDB_OPT_DEFAULTS_H #define NDB_OPT_DEFAULTS_H #ifdef SIGRTMIN #define OPT_NDB_SHM_SIGNUM_DEFAULT SIGRTMIN+2 #else #define OPT_NDB_SHM_SIGNUM_DEFAULT 0 #endif #define OPT_NDB_SHM_DEFAULT 0 #endif
ndb/include/transporter/TransporterDefinitions.hpp +1 −0 Original line number Diff line number Diff line Loading @@ -77,6 +77,7 @@ struct SHM_TransporterConfiguration { Uint32 shmKey; Uint32 shmSize; int signum; }; /** Loading
ndb/include/util/ndb_opts.h +49 −10 Original line number Diff line number Diff line Loading @@ -22,24 +22,16 @@ #include <my_getopt.h> #include <mysql_version.h> #include <ndb_version.h> #include <ndb_opt_defaults.h> #define NDB_STD_OPTS_VARS \ const char *opt_connect_str= 0;\ my_bool opt_ndb_shm;\ my_bool opt_ndb_optimized_node_selection #define NDB_STD_OPTS_OPTIONS \ OPT_NDB_SHM= 256,\ OPT_NDB_OPTIMIZED_NODE_SELECTION my_bool opt_ndb_shm; #define OPT_NDB_CONNECTSTRING 'c' #if defined(NDB_SHM_TRANSPORTER) && MYSQL_VERSION_ID >= 50000 #define OPT_NDB_SHM_DEFAULT 1 #else #define OPT_NDB_SHM_DEFAULT 0 #endif #define NDB_STD_OPTS_COMMON \ { "usage", '?', "Display this help and exit.", \ 0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0 }, \ Loading Loading @@ -75,4 +67,51 @@ OPT_NDB_OPTIMIZED_NODE_SELECTION #define NDB_STD_OPTS(prog_name) NDB_STD_OPTS_COMMON #endif static void ndb_std_print_version() { printf("MySQL distrib %s, for %s (%s)\n", MYSQL_SERVER_VERSION,SYSTEM_TYPE,MACHINE_TYPE); } static void usage(); enum ndb_std_options { OPT_NDB_SHM= 256, OPT_NDB_SHM_SIGNUM, OPT_NDB_OPTIMIZED_NODE_SELECTION, NDB_STD_OPTIONS_LAST /* should always be last in this enum */ }; static my_bool ndb_std_get_one_option(int optid, const struct my_option *opt __attribute__((unused)), const char *argument) { switch (optid) { case '#': if (argument) { DBUG_PUSH(argument); } break; case 'V': ndb_std_print_version(); exit(0); case '?': usage(); exit(0); case OPT_NDB_SHM: if (opt_ndb_shm) { #ifndef NDB_SHM_TRANSPORTER printf("Warning: binary not compiled with shared memory support,\n" "Tcp connections will now be used instead\n"); opt_ndb_shm= 0; #endif } break; } return 0; } #endif /*_NDB_OPTS_H */