#include <ndb_global.h>#include <my_sys.h>#include <my_getopt.h>#include <mysql_version.h>#include <ndb_version.h>#include <ndb_opt_defaults.h>Include dependency graph for ndb_opts.h:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.
Defines | |
| #define | NDB_STD_OPTS_VARS my_bool opt_ndb_optimized_node_selection |
| #define | OPT_NDB_CONNECTSTRING 'c' |
| #define | OPT_WANT_CORE_DEFAULT 0 |
| #define | NDB_STD_OPTS_COMMON |
| #define | NDB_STD_OPTS(prog_name) |
Enumerations | |
| enum | ndb_std_options { OPT_NDB_SHM = 256, OPT_NDB_SHM_SIGNUM, OPT_NDB_OPTIMIZED_NODE_SELECTION, OPT_WANT_CORE, OPT_NDB_MGMD, OPT_NDB_NODEID, OPT_CHARSETS_DIR, NDB_STD_OPTIONS_LAST } |
Functions | |
| static void | ndb_std_print_version () |
| static void | usage () |
| static my_bool | ndb_std_get_one_option (int optid, const struct my_option *opt __attribute__((unused)), char *argument) |
Variables | |
| int | opt_ndb_nodeid |
| bool | opt_endinfo = 0 |
| my_bool | opt_ndb_shm |
| my_bool | opt_core |
| const char * | opt_ndb_connectstring = 0 |
| const char * | opt_connect_str = 0 |
| const char * | opt_ndb_mgmd = 0 |
| char | opt_ndb_constrbuf [1024] |
| unsigned | opt_ndb_constrbuf_len = 0 |
| const char * | opt_debug = 0 |
| #define NDB_STD_OPTS | ( | prog_name | ) |
Value:
{ "debug", '#', "Output debug log. Often this is 'd:t:o,filename'.", \
(gptr*) &opt_debug, (gptr*) &opt_debug, \
0, GET_STR, OPT_ARG, 0, 0, 0, 0, 0, 0 }, \
NDB_STD_OPTS_COMMON
Definition at line 93 of file ndb_opts.h.
| #define NDB_STD_OPTS_COMMON |
Definition at line 51 of file ndb_opts.h.
| #define NDB_STD_OPTS_VARS my_bool opt_ndb_optimized_node_selection |
Definition at line 27 of file ndb_opts.h.
| #define OPT_NDB_CONNECTSTRING 'c' |
Definition at line 44 of file ndb_opts.h.
Referenced by get_one_option(), and ndb_std_get_one_option().
| #define OPT_WANT_CORE_DEFAULT 0 |
Definition at line 48 of file ndb_opts.h.
| enum ndb_std_options |
| OPT_NDB_SHM | |
| OPT_NDB_SHM_SIGNUM | |
| OPT_NDB_OPTIMIZED_NODE_SELECTION | |
| OPT_WANT_CORE | |
| OPT_NDB_MGMD | |
| OPT_NDB_NODEID | |
| OPT_CHARSETS_DIR | |
| NDB_STD_OPTIONS_LAST |
Definition at line 110 of file ndb_opts.h.
00110 { 00111 OPT_NDB_SHM= 256, 00112 OPT_NDB_SHM_SIGNUM, 00113 OPT_NDB_OPTIMIZED_NODE_SELECTION, 00114 OPT_WANT_CORE, 00115 OPT_NDB_MGMD, 00116 OPT_NDB_NODEID, 00117 OPT_CHARSETS_DIR, 00118 NDB_STD_OPTIONS_LAST /* should always be last in this enum */ 00119 };
| static my_bool ndb_std_get_one_option | ( | int | optid, | |
| const struct my_option *opt | __attribute__((unused)), | |||
| char * | argument | |||
| ) | [static] |
Definition at line 122 of file ndb_opts.h.
References DBUG_PUSH, exit, my_snprintf(), ndb_std_print_version(), opt_connect_str, opt_debug, opt_endinfo, opt_ndb_connectstring, OPT_NDB_CONNECTSTRING, opt_ndb_constrbuf, opt_ndb_constrbuf_len, OPT_NDB_MGMD, OPT_NDB_NODEID, opt_ndb_shm, OPT_NDB_SHM, and usage().
Referenced by get_one_option(), Configuration::init(), and main().
00125 { 00126 switch (optid) { 00127 #ifndef DBUG_OFF 00128 case '#': 00129 if (opt_debug) 00130 { 00131 DBUG_PUSH(opt_debug); 00132 } 00133 else 00134 { 00135 DBUG_PUSH("d:t"); 00136 } 00137 opt_endinfo= 1; 00138 break; 00139 #endif 00140 case 'V': 00141 ndb_std_print_version(); 00142 exit(0); 00143 case '?': 00144 usage(); 00145 exit(0); 00146 case OPT_NDB_SHM: 00147 if (opt_ndb_shm) 00148 { 00149 #ifndef NDB_SHM_TRANSPORTER 00150 printf("Warning: binary not compiled with shared memory support,\n" 00151 "Tcp connections will now be used instead\n"); 00152 opt_ndb_shm= 0; 00153 #endif 00154 } 00155 break; 00156 case OPT_NDB_MGMD: 00157 case OPT_NDB_NODEID: 00158 { 00159 int len= my_snprintf(opt_ndb_constrbuf+opt_ndb_constrbuf_len, 00160 sizeof(opt_ndb_constrbuf)-opt_ndb_constrbuf_len, 00161 "%s%s%s",opt_ndb_constrbuf_len > 0 ? ",":"", 00162 optid == OPT_NDB_NODEID ? "nodeid=" : "", 00163 argument); 00164 opt_ndb_constrbuf_len+= len; 00165 } 00166 /* fall through to add the connectstring to the end 00167 * and set opt_ndbcluster_connectstring 00168 */ 00169 case OPT_NDB_CONNECTSTRING: 00170 if (opt_ndb_connectstring && opt_ndb_connectstring[0]) 00171 my_snprintf(opt_ndb_constrbuf+opt_ndb_constrbuf_len, 00172 sizeof(opt_ndb_constrbuf)-opt_ndb_constrbuf_len, 00173 "%s%s", opt_ndb_constrbuf_len > 0 ? ",":"", 00174 opt_ndb_connectstring); 00175 else 00176 opt_ndb_constrbuf[opt_ndb_constrbuf_len]= 0; 00177 opt_connect_str= opt_ndb_constrbuf; 00178 break; 00179 } 00180 return 0; 00181 }
Here is the call graph for this function:

Here is the caller graph for this function:

| static void ndb_std_print_version | ( | ) | [static] |
Definition at line 102 of file ndb_opts.h.
References MACHINE_TYPE, MYSQL_SERVER_VERSION, and SYSTEM_TYPE.
Referenced by ndb_std_get_one_option(), and usage().
00103 { 00104 printf("MySQL distrib %s, for %s (%s)\n", 00105 MYSQL_SERVER_VERSION,SYSTEM_TYPE,MACHINE_TYPE); 00106 }
Here is the caller graph for this function:

| static void usage | ( | ) | [static] |
Definition at line 3308 of file mysqltest.c.
References my_long_options, my_print_help(), my_print_variables(), my_progname, and print_version().
03309 { 03310 print_version(); 03311 printf("MySQL AB, by Sasha, Matt, Monty & Jani\n"); 03312 printf("This software comes with ABSOLUTELY NO WARRANTY\n\n"); 03313 printf("Runs a test against the mysql server and compares output with a results file.\n\n"); 03314 printf("Usage: %s [OPTIONS] [database] < test_file\n", my_progname); 03315 my_print_help(my_long_options); 03316 printf(" --no-defaults Don't read default options from any options file.\n"); 03317 my_print_variables(my_long_options); 03318 }
Here is the call graph for this function:

| const char* opt_connect_str = 0 |
Definition at line 35 of file ndb_opts.h.
Referenced by Configuration::init(), main(), ndb_std_get_one_option(), and Configuration::~Configuration().
Definition at line 33 of file ndb_opts.h.
Referenced by exitHandler(), BackupRestore::exitHandler(), NdbShutdown(), and require().
| const char* opt_debug = 0 |
Definition at line 41 of file ndb_opts.h.
Referenced by get_one_option(), Configuration::init(), main(), and ndb_std_get_one_option().
| bool opt_endinfo = 0 |
Definition at line 31 of file ndb_opts.h.
| const char* opt_ndb_connectstring = 0 |
Definition at line 34 of file ndb_opts.h.
Referenced by execute_commands(), and ndb_std_get_one_option().
| char opt_ndb_constrbuf[1024] |
| unsigned opt_ndb_constrbuf_len = 0 |
| const char* opt_ndb_mgmd = 0 |
Definition at line 36 of file ndb_opts.h.
| int opt_ndb_nodeid |
Definition at line 30 of file ndb_opts.h.
Definition at line 32 of file ndb_opts.h.
Referenced by add_node_connections(), and ndb_std_get_one_option().
1.4.7

