~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to server/drizzled.cc

  • Committer: Monty Taylor
  • Date: 2008-07-11 15:49:04 UTC
  • mto: (77.6.1 glibclient-merge)
  • mto: This revision was merged to the branch mainline in revision 134.
  • Revision ID: monty@inaugust.com-20080711154904-nrtkef3bo1jvzrds
A crapton more warning cleanups (I turned on more warnings) 

Show diffs side-by-side

added added

removed removed

Lines of Context:
3143
3143
struct my_option my_long_options[] =
3144
3144
{
3145
3145
  {"help", '?', "Display this help and exit.", 
3146
 
   (uchar**) &opt_help, (uchar**) &opt_help, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0,
 
3146
   (char**) &opt_help, (char**) &opt_help, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0,
3147
3147
   0, 0},
3148
3148
  {"abort-slave-event-count", OPT_ABORT_SLAVE_EVENT_COUNT,
3149
3149
   "Option used by mysql-test for debugging and testing of replication.",
3150
 
   (uchar**) &abort_slave_event_count,  (uchar**) &abort_slave_event_count,
 
3150
   (char**) &abort_slave_event_count,  (char**) &abort_slave_event_count,
3151
3151
   0, GET_INT, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
3152
3152
  {"ansi", 'a', "Use ANSI SQL syntax instead of MySQL syntax. This mode will also set transaction isolation level 'serializable'.", 0, 0, 0,
3153
3153
   GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0},
3154
3154
  {"auto-increment-increment", OPT_AUTO_INCREMENT,
3155
3155
   "Auto-increment columns are incremented by this",
3156
 
   (uchar**) &global_system_variables.auto_increment_increment,
3157
 
   (uchar**) &max_system_variables.auto_increment_increment, 0, GET_ULONG,
 
3156
   (char**) &global_system_variables.auto_increment_increment,
 
3157
   (char**) &max_system_variables.auto_increment_increment, 0, GET_ULONG,
3158
3158
   OPT_ARG, 1, 1, 65535, 0, 1, 0 },
3159
3159
  {"auto-increment-offset", OPT_AUTO_INCREMENT_OFFSET,
3160
3160
   "Offset added to Auto-increment columns. Used when auto-increment-increment != 1",
3161
 
   (uchar**) &global_system_variables.auto_increment_offset,
3162
 
   (uchar**) &max_system_variables.auto_increment_offset, 0, GET_ULONG, OPT_ARG,
 
3161
   (char**) &global_system_variables.auto_increment_offset,
 
3162
   (char**) &max_system_variables.auto_increment_offset, 0, GET_ULONG, OPT_ARG,
3163
3163
   1, 1, 65535, 0, 1, 0 },
3164
3164
  {"basedir", 'b',
3165
3165
   "Path to installation directory. All paths are usually resolved relative to this.",
3166
 
   (uchar**) &mysql_home_ptr, (uchar**) &mysql_home_ptr, 0, GET_STR, REQUIRED_ARG,
 
3166
   (char**) &mysql_home_ptr, (char**) &mysql_home_ptr, 0, GET_STR, REQUIRED_ARG,
3167
3167
   0, 0, 0, 0, 0, 0},
3168
3168
  {"big-tables", OPT_BIG_TABLES,
3169
3169
   "Allow big result sets by saving all temporary sets on file (Solves most 'table full' errors).",
3170
3170
   0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0},
3171
3171
  {"bind-address", OPT_BIND_ADDRESS, "IP address to bind to.",
3172
 
   (uchar**) &my_bind_addr_str, (uchar**) &my_bind_addr_str, 0, GET_STR,
 
3172
   (char**) &my_bind_addr_str, (char**) &my_bind_addr_str, 0, GET_STR,
3173
3173
   REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
3174
3174
  {"binlog_format", OPT_BINLOG_FORMAT,
3175
3175
   "Does not have any effect without '--log-bin'. "
3179
3179
   "for those statements where only row-based is correct: those which "
3180
3180
   "involve user-defined functions (i.e. UDFs) or the UUID() function; for "
3181
3181
   "those, row-based binary logging is automatically used. "
3182
 
   ,(uchar**) &opt_binlog_format, (uchar**) &opt_binlog_format,
 
3182
   ,(char**) &opt_binlog_format, (char**) &opt_binlog_format,
3183
3183
   0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
3184
3184
  {"binlog-do-db", OPT_BINLOG_DO_DB,
3185
3185
   "Tells the master it should log updates for the specified database, and exclude all others not explicitly mentioned.",
3191
3191
   "The maximum size of a row-based binary log event in bytes. Rows will be "
3192
3192
   "grouped into events smaller than this size if possible. "
3193
3193
   "The value has to be a multiple of 256.",
3194
 
   (uchar**) &opt_binlog_rows_event_max_size, 
3195
 
   (uchar**) &opt_binlog_rows_event_max_size, 0, 
 
3194
   (char**) &opt_binlog_rows_event_max_size, 
 
3195
   (char**) &opt_binlog_rows_event_max_size, 0, 
3196
3196
   GET_ULONG, REQUIRED_ARG, 
3197
3197
   /* def_value */ 1024, /* min_value */  256, /* max_value */ ULONG_MAX, 
3198
3198
   /* sub_size */     0, /* block_size */ 256, 
3204
3204
#endif
3205
3205
  {"character-set-client-handshake", OPT_CHARACTER_SET_CLIENT_HANDSHAKE,
3206
3206
   "Don't ignore client side character set value sent during handshake.",
3207
 
   (uchar**) &opt_character_set_client_handshake,
3208
 
   (uchar**) &opt_character_set_client_handshake,
 
3207
   (char**) &opt_character_set_client_handshake,
 
3208
   (char**) &opt_character_set_client_handshake,
3209
3209
    0, GET_BOOL, NO_ARG, 1, 0, 0, 0, 0, 0},
3210
3210
  {"character-set-filesystem", OPT_CHARACTER_SET_FILESYSTEM,
3211
3211
   "Set the filesystem character set.",
3212
 
   (uchar**) &character_set_filesystem_name,
3213
 
   (uchar**) &character_set_filesystem_name,
 
3212
   (char**) &character_set_filesystem_name,
 
3213
   (char**) &character_set_filesystem_name,
3214
3214
   0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0 },
3215
3215
  {"character-set-server", 'C', "Set the default character set.",
3216
 
   (uchar**) &default_character_set_name, (uchar**) &default_character_set_name,
 
3216
   (char**) &default_character_set_name, (char**) &default_character_set_name,
3217
3217
   0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0 },
3218
3218
  {"character-sets-dir", OPT_CHARSETS_DIR,
3219
 
   "Directory where character sets are.", (uchar**) &charsets_dir,
3220
 
   (uchar**) &charsets_dir, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
 
3219
   "Directory where character sets are.", (char**) &charsets_dir,
 
3220
   (char**) &charsets_dir, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
3221
3221
  {"chroot", 'r', "Chroot mysqld daemon during startup.",
3222
 
   (uchar**) &mysqld_chroot, (uchar**) &mysqld_chroot, 0, GET_STR, REQUIRED_ARG,
 
3222
   (char**) &mysqld_chroot, (char**) &mysqld_chroot, 0, GET_STR, REQUIRED_ARG,
3223
3223
   0, 0, 0, 0, 0, 0},
3224
3224
  {"collation-server", OPT_DEFAULT_COLLATION, "Set the default collation.",
3225
 
   (uchar**) &default_collation_name, (uchar**) &default_collation_name,
 
3225
   (char**) &default_collation_name, (char**) &default_collation_name,
3226
3226
   0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0 },
3227
3227
  {"completion-type", OPT_COMPLETION_TYPE, "Default completion type.",
3228
 
   (uchar**) &global_system_variables.completion_type,
3229
 
   (uchar**) &max_system_variables.completion_type, 0, GET_ULONG,
 
3228
   (char**) &global_system_variables.completion_type,
 
3229
   (char**) &max_system_variables.completion_type, 0, GET_ULONG,
3230
3230
   REQUIRED_ARG, 0, 0, 2, 0, 1, 0},
3231
3231
  {"console", OPT_CONSOLE, "Write error output on screen; Don't remove the console window on windows.",
3232
 
   (uchar**) &opt_console, (uchar**) &opt_console, 0, GET_BOOL, NO_ARG, 0, 0, 0,
 
3232
   (char**) &opt_console, (char**) &opt_console, 0, GET_BOOL, NO_ARG, 0, 0, 0,
3233
3233
   0, 0, 0},
3234
3234
  {"core-file", OPT_WANT_CORE, "Write core on errors.", 0, 0, 0, GET_NO_ARG,
3235
3235
   NO_ARG, 0, 0, 0, 0, 0, 0},
3236
 
  {"datadir", 'h', "Path to the database root.", (uchar**) &mysql_data_home,
3237
 
   (uchar**) &mysql_data_home, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
 
3236
  {"datadir", 'h', "Path to the database root.", (char**) &mysql_data_home,
 
3237
   (char**) &mysql_data_home, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
3238
3238
  {"default-character-set", 'C', "Set the default character set (deprecated option, use --character-set-server instead).",
3239
 
   (uchar**) &default_character_set_name, (uchar**) &default_character_set_name,
 
3239
   (char**) &default_character_set_name, (char**) &default_character_set_name,
3240
3240
   0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0 },
3241
3241
  {"default-collation", OPT_DEFAULT_COLLATION, "Set the default collation (deprecated option, use --collation-server instead).",
3242
 
   (uchar**) &default_collation_name, (uchar**) &default_collation_name,
 
3242
   (char**) &default_collation_name, (char**) &default_collation_name,
3243
3243
   0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0 },
3244
3244
  {"default-storage-engine", OPT_STORAGE_ENGINE,
3245
3245
   "Set the default storage engine (table type) for tables.",
3246
 
   (uchar**)&default_storage_engine_str, (uchar**)&default_storage_engine_str,
 
3246
   (char**)&default_storage_engine_str, (char**)&default_storage_engine_str,
3247
3247
   0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
3248
3248
  {"default-table-type", OPT_STORAGE_ENGINE,
3249
3249
   "(deprecated) Use --default-storage-engine.",
3250
 
   (uchar**)&default_storage_engine_str, (uchar**)&default_storage_engine_str,
 
3250
   (char**)&default_storage_engine_str, (char**)&default_storage_engine_str,
3251
3251
   0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
3252
3252
  {"default-time-zone", OPT_DEFAULT_TIME_ZONE, "Set the default time zone.",
3253
 
   (uchar**) &default_tz_name, (uchar**) &default_tz_name,
 
3253
   (char**) &default_tz_name, (char**) &default_tz_name,
3254
3254
   0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0 },
3255
3255
  {"delay-key-write", OPT_DELAY_KEY_WRITE, "Type of DELAY_KEY_WRITE.",
3256
3256
   0,0,0, GET_STR, OPT_ARG, 0, 0, 0, 0, 0, 0},
3259
3259
   0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0},
3260
3260
  {"disconnect-slave-event-count", OPT_DISCONNECT_SLAVE_EVENT_COUNT,
3261
3261
   "Option used by mysql-test for debugging and testing of replication.",
3262
 
   (uchar**) &disconnect_slave_event_count,
3263
 
   (uchar**) &disconnect_slave_event_count, 0, GET_INT, REQUIRED_ARG, 0, 0, 0,
 
3262
   (char**) &disconnect_slave_event_count,
 
3263
   (char**) &disconnect_slave_event_count, 0, GET_INT, REQUIRED_ARG, 0, 0, 0,
3264
3264
   0, 0, 0},
3265
3265
#ifdef HAVE_STACK_TRACE_ON_SEGV
3266
3266
  {"enable-pstack", OPT_DO_PSTACK, "Print a symbolic stack trace on failure.",
3267
 
   (uchar**) &opt_do_pstack, (uchar**) &opt_do_pstack, 0, GET_BOOL, NO_ARG, 0, 0,
 
3267
   (char**) &opt_do_pstack, (char**) &opt_do_pstack, 0, GET_BOOL, NO_ARG, 0, 0,
3268
3268
   0, 0, 0, 0},
3269
3269
#endif /* HAVE_STACK_TRACE_ON_SEGV */
3270
3270
  {"engine-condition-pushdown",
3271
3271
   OPT_ENGINE_CONDITION_PUSHDOWN,
3272
3272
   "Push supported query conditions to the storage engine.",
3273
 
   (uchar**) &global_system_variables.engine_condition_pushdown,
3274
 
   (uchar**) &global_system_variables.engine_condition_pushdown,
 
3273
   (char**) &global_system_variables.engine_condition_pushdown,
 
3274
   (char**) &global_system_variables.engine_condition_pushdown,
3275
3275
   0, GET_BOOL, NO_ARG, 1, 0, 0, 0, 0, 0},
3276
3276
  /* See how it's handled in get_one_option() */
3277
3277
  {"exit-info", 'T', "Used for debugging;  Use at your own risk!", 0, 0, 0,
3282
3282
     easier to do */
3283
3283
  {"gdb", OPT_DEBUGGING,
3284
3284
   "Set up signals usable for debugging",
3285
 
   (uchar**) &opt_debugging, (uchar**) &opt_debugging,
 
3285
   (char**) &opt_debugging, (char**) &opt_debugging,
3286
3286
   0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
3287
3287
  {"general-log", OPT_GENERAL_LOG,
3288
 
   "Enable|disable general log", (uchar**) &opt_log,
3289
 
   (uchar**) &opt_log, 0, GET_BOOL, OPT_ARG, 0, 0, 0, 0, 0, 0},
 
3288
   "Enable|disable general log", (char**) &opt_log,
 
3289
   (char**) &opt_log, 0, GET_BOOL, OPT_ARG, 0, 0, 0, 0, 0, 0},
3290
3290
  {"init-connect", OPT_INIT_CONNECT, "Command(s) that are executed for each new connection",
3291
 
   (uchar**) &opt_init_connect, (uchar**) &opt_init_connect, 0, GET_STR_ALLOC,
 
3291
   (char**) &opt_init_connect, (char**) &opt_init_connect, 0, GET_STR_ALLOC,
3292
3292
   REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
3293
3293
  {"init-file", OPT_INIT_FILE, "Read SQL commands from this file at startup.",
3294
 
   (uchar**) &opt_init_file, (uchar**) &opt_init_file, 0, GET_STR, REQUIRED_ARG,
 
3294
   (char**) &opt_init_file, (char**) &opt_init_file, 0, GET_STR, REQUIRED_ARG,
3295
3295
   0, 0, 0, 0, 0, 0},
3296
3296
  {"init-slave", OPT_INIT_SLAVE, "Command(s) that are executed when a slave connects to this master",
3297
 
   (uchar**) &opt_init_slave, (uchar**) &opt_init_slave, 0, GET_STR_ALLOC,
 
3297
   (char**) &opt_init_slave, (char**) &opt_init_slave, 0, GET_STR_ALLOC,
3298
3298
   REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
3299
3299
  {"language", 'L',
3300
3300
   "Client error messages in given language. May be given as a full path.",
3301
 
   (uchar**) &language_ptr, (uchar**) &language_ptr, 0, GET_STR, REQUIRED_ARG,
 
3301
   (char**) &language_ptr, (char**) &language_ptr, 0, GET_STR, REQUIRED_ARG,
3302
3302
   0, 0, 0, 0, 0, 0},
3303
3303
  {"lc-time-names", OPT_LC_TIME_NAMES,
3304
3304
   "Set the language used for the month names and the days of the week.",
3305
 
   (uchar**) &lc_time_names_name,
3306
 
   (uchar**) &lc_time_names_name,
 
3305
   (char**) &lc_time_names_name,
 
3306
   (char**) &lc_time_names_name,
3307
3307
   0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0 },
3308
3308
  {"local-infile", OPT_LOCAL_INFILE,
3309
3309
   "Enable/disable LOAD DATA LOCAL INFILE (takes values 1|0).",
3310
 
   (uchar**) &opt_local_infile,
3311
 
   (uchar**) &opt_local_infile, 0, GET_BOOL, OPT_ARG,
 
3310
   (char**) &opt_local_infile,
 
3311
   (char**) &opt_local_infile, 0, GET_BOOL, OPT_ARG,
3312
3312
   1, 0, 0, 0, 0, 0},
3313
 
  {"log", 'l', "Log connections and queries to file.", (uchar**) &opt_logname,
3314
 
   (uchar**) &opt_logname, 0, GET_STR, OPT_ARG, 0, 0, 0, 0, 0, 0},
 
3313
  {"log", 'l', "Log connections and queries to file.", (char**) &opt_logname,
 
3314
   (char**) &opt_logname, 0, GET_STR, OPT_ARG, 0, 0, 0, 0, 0, 0},
3315
3315
  {"log-bin", OPT_BIN_LOG,
3316
3316
   "Log update queries in binary format. Optional (but strongly recommended "
3317
3317
   "to avoid replication problems if server's hostname changes) argument "
3318
3318
   "should be the chosen location for the binary log files.",
3319
 
   (uchar**) &opt_bin_logname, (uchar**) &opt_bin_logname, 0, GET_STR_ALLOC,
 
3319
   (char**) &opt_bin_logname, (char**) &opt_bin_logname, 0, GET_STR_ALLOC,
3320
3320
   OPT_ARG, 0, 0, 0, 0, 0, 0},
3321
3321
  {"log-bin-index", OPT_BIN_LOG_INDEX,
3322
3322
   "File that holds the names for last binary log files.",
3323
 
   (uchar**) &opt_binlog_index_name, (uchar**) &opt_binlog_index_name, 0, GET_STR,
 
3323
   (char**) &opt_binlog_index_name, (char**) &opt_binlog_index_name, 0, GET_STR,
3324
3324
   REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
3325
3325
  /*
3326
3326
    This option starts with "log-bin" to emphasize that it is specific of
3333
3333
   "Note that if ALL connections to this server ALWAYS use row-based binary "
3334
3334
   "logging, the security issues do not exist and the binary logging cannot "
3335
3335
   "break, so you can safely set this to 1."
3336
 
   ,(uchar**) &trust_function_creators, (uchar**) &trust_function_creators, 0,
 
3336
   ,(char**) &trust_function_creators, (char**) &trust_function_creators, 0,
3337
3337
   GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
3338
3338
  {"log-error", OPT_ERROR_LOG_FILE, "Error log file.",
3339
 
   (uchar**) &log_error_file_ptr, (uchar**) &log_error_file_ptr, 0, GET_STR,
 
3339
   (char**) &log_error_file_ptr, (char**) &log_error_file_ptr, 0, GET_STR,
3340
3340
   OPT_ARG, 0, 0, 0, 0, 0, 0},
3341
3341
  {"log-isam", OPT_ISAM_LOG, "Log all MyISAM changes to file.",
3342
 
   (uchar**) &myisam_log_filename, (uchar**) &myisam_log_filename, 0, GET_STR,
 
3342
   (char**) &myisam_log_filename, (char**) &myisam_log_filename, 0, GET_STR,
3343
3343
   OPT_ARG, 0, 0, 0, 0, 0, 0},
3344
3344
  {"log-long-format", '0',
3345
3345
   "Log some extra information to update log. Please note that this option is deprecated; see --log-short-format option.", 
3348
3348
  {"log-output", OPT_LOG_OUTPUT,
3349
3349
   "Syntax: log-output[=value[,value...]], where \"value\" could be TABLE, "
3350
3350
   "FILE or NONE.",
3351
 
   (uchar**) &log_output_str, (uchar**) &log_output_str, 0,
 
3351
   (char**) &log_output_str, (char**) &log_output_str, 0,
3352
3352
   GET_STR, OPT_ARG, 0, 0, 0, 0, 0, 0},
3353
3353
#endif
3354
3354
  {"log-queries-not-using-indexes", OPT_LOG_QUERIES_NOT_USING_INDEXES,
3355
3355
   "Log queries that are executed without benefit of any index to the slow log if it is open.",
3356
 
   (uchar**) &opt_log_queries_not_using_indexes, (uchar**) &opt_log_queries_not_using_indexes,
 
3356
   (char**) &opt_log_queries_not_using_indexes, (char**) &opt_log_queries_not_using_indexes,
3357
3357
   0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
3358
3358
  {"log-short-format", OPT_SHORT_LOG_FORMAT,
3359
3359
   "Don't log extra information to update and slow-query logs.",
3360
 
   (uchar**) &opt_short_log_format, (uchar**) &opt_short_log_format,
 
3360
   (char**) &opt_short_log_format, (char**) &opt_short_log_format,
3361
3361
   0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
3362
3362
  {"log-slave-updates", OPT_LOG_SLAVE_UPDATES,
3363
3363
   "Tells the slave to log the updates from the slave thread to the binary log. You will need to turn it on if you plan to daisy-chain the slaves.",
3364
 
   (uchar**) &opt_log_slave_updates, (uchar**) &opt_log_slave_updates, 0, GET_BOOL,
 
3364
   (char**) &opt_log_slave_updates, (char**) &opt_log_slave_updates, 0, GET_BOOL,
3365
3365
   NO_ARG, 0, 0, 0, 0, 0, 0},
3366
3366
  {"log-slow-admin-statements", OPT_LOG_SLOW_ADMIN_STATEMENTS,
3367
3367
   "Log slow OPTIMIZE, ANALYZE, ALTER and other administrative statements to the slow log if it is open.",
3368
 
   (uchar**) &opt_log_slow_admin_statements,
3369
 
   (uchar**) &opt_log_slow_admin_statements,
 
3368
   (char**) &opt_log_slow_admin_statements,
 
3369
   (char**) &opt_log_slow_admin_statements,
3370
3370
   0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
3371
3371
 {"log-slow-slave-statements", OPT_LOG_SLOW_SLAVE_STATEMENTS,
3372
3372
  "Log slow statements executed by slave thread to the slow log if it is open.",
3373
 
  (uchar**) &opt_log_slow_slave_statements,
3374
 
  (uchar**) &opt_log_slow_slave_statements,
 
3373
  (char**) &opt_log_slow_slave_statements,
 
3374
  (char**) &opt_log_slow_slave_statements,
3375
3375
  0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
3376
3376
  {"log-slow-queries", OPT_SLOW_QUERY_LOG,
3377
3377
    "Log slow queries to a table or log file. Defaults logging to table mysql.slow_log or hostname-slow.log if --log-output=file is used. Must be enabled to activate other slow log options.",
3378
 
   (uchar**) &opt_slow_logname, (uchar**) &opt_slow_logname, 0, GET_STR, OPT_ARG,
 
3378
   (char**) &opt_slow_logname, (char**) &opt_slow_logname, 0, GET_STR, OPT_ARG,
3379
3379
   0, 0, 0, 0, 0, 0},
3380
3380
  {"log-tc", OPT_LOG_TC,
3381
3381
   "Path to transaction coordinator log (used for transactions that affect "
3382
3382
   "more than one storage engine, when binary log is disabled)",
3383
 
   (uchar**) &opt_tc_log_file, (uchar**) &opt_tc_log_file, 0, GET_STR,
 
3383
   (char**) &opt_tc_log_file, (char**) &opt_tc_log_file, 0, GET_STR,
3384
3384
   REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
3385
3385
#ifdef HAVE_MMAP
3386
3386
  {"log-tc-size", OPT_LOG_TC_SIZE, "Size of transaction coordinator log.",
3387
 
   (uchar**) &opt_tc_log_size, (uchar**) &opt_tc_log_size, 0, GET_ULONG,
 
3387
   (char**) &opt_tc_log_size, (char**) &opt_tc_log_size, 0, GET_ULONG,
3388
3388
   REQUIRED_ARG, TC_LOG_MIN_SIZE, TC_LOG_MIN_SIZE, ULONG_MAX, 0,
3389
3389
   TC_LOG_PAGE_SIZE, 0},
3390
3390
#endif
3391
3391
  {"log-warnings", 'W', "Log some not critical warnings to the log file.",
3392
 
   (uchar**) &global_system_variables.log_warnings,
3393
 
   (uchar**) &max_system_variables.log_warnings, 0, GET_ULONG, OPT_ARG, 1, 0, 0,
 
3392
   (char**) &global_system_variables.log_warnings,
 
3393
   (char**) &max_system_variables.log_warnings, 0, GET_ULONG, OPT_ARG, 1, 0, 0,
3394
3394
   0, 0, 0},
3395
3395
  {"low-priority-updates", OPT_LOW_PRIORITY_UPDATES,
3396
3396
   "INSERT/DELETE/UPDATE has lower priority than selects.",
3397
 
   (uchar**) &global_system_variables.low_priority_updates,
3398
 
   (uchar**) &max_system_variables.low_priority_updates,
 
3397
   (char**) &global_system_variables.low_priority_updates,
 
3398
   (char**) &max_system_variables.low_priority_updates,
3399
3399
   0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
3400
3400
  {"master-info-file", OPT_MASTER_INFO_FILE,
3401
3401
   "The location and name of the file that remembers the master and where the I/O replication \
3402
3402
thread is in the master's binlogs.",
3403
 
   (uchar**) &master_info_file, (uchar**) &master_info_file, 0, GET_STR,
 
3403
   (char**) &master_info_file, (char**) &master_info_file, 0, GET_STR,
3404
3404
   REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
3405
3405
  {"master-retry-count", OPT_MASTER_RETRY_COUNT,
3406
3406
   "The number of tries the slave will make to connect to the master before giving up.",
3407
 
   (uchar**) &master_retry_count, (uchar**) &master_retry_count, 0, GET_ULONG,
 
3407
   (char**) &master_retry_count, (char**) &master_retry_count, 0, GET_ULONG,
3408
3408
   REQUIRED_ARG, 3600*24, 0, 0, 0, 0, 0},
3409
3409
  {"max-binlog-dump-events", OPT_MAX_BINLOG_DUMP_EVENTS,
3410
3410
   "Option used by mysql-test for debugging and testing of replication.",
3411
 
   (uchar**) &max_binlog_dump_events, (uchar**) &max_binlog_dump_events, 0,
 
3411
   (char**) &max_binlog_dump_events, (char**) &max_binlog_dump_events, 0,
3412
3412
   GET_INT, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
3413
 
  {"memlock", OPT_MEMLOCK, "Lock mysqld in memory.", (uchar**) &locked_in_memory,
3414
 
   (uchar**) &locked_in_memory, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
 
3413
  {"memlock", OPT_MEMLOCK, "Lock mysqld in memory.", (char**) &locked_in_memory,
 
3414
   (char**) &locked_in_memory, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
3415
3415
  {"myisam-recover", OPT_MYISAM_RECOVER,
3416
3416
   "Syntax: myisam-recover[=option[,option...]], where option can be DEFAULT, BACKUP, FORCE or QUICK.",
3417
 
   (uchar**) &myisam_recover_options_str, (uchar**) &myisam_recover_options_str, 0,
 
3417
   (char**) &myisam_recover_options_str, (char**) &myisam_recover_options_str, 0,
3418
3418
   GET_STR, OPT_ARG, 0, 0, 0, 0, 0, 0},
3419
3419
  {"new", 'n', "Use very new possible 'unsafe' functions.",
3420
 
   (uchar**) &global_system_variables.new_mode,
3421
 
   (uchar**) &max_system_variables.new_mode,
 
3420
   (char**) &global_system_variables.new_mode,
 
3421
   (char**) &max_system_variables.new_mode,
3422
3422
   0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
3423
3423
  {"old-alter-table", OPT_OLD_ALTER_TABLE,
3424
3424
   "Use old, non-optimized alter table.",
3425
 
   (uchar**) &global_system_variables.old_alter_table,
3426
 
   (uchar**) &max_system_variables.old_alter_table, 0, GET_BOOL, NO_ARG,
 
3425
   (char**) &global_system_variables.old_alter_table,
 
3426
   (char**) &max_system_variables.old_alter_table, 0, GET_BOOL, NO_ARG,
3427
3427
   0, 0, 0, 0, 0, 0},
3428
3428
  {"old-style-user-limits", OPT_OLD_STYLE_USER_LIMITS,
3429
3429
   "Enable old-style user limits (before 5.0.3 user resources were counted per each user+host vs. per account)",
3430
 
   (uchar**) &opt_old_style_user_limits, (uchar**) &opt_old_style_user_limits,
 
3430
   (char**) &opt_old_style_user_limits, (char**) &opt_old_style_user_limits,
3431
3431
   0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
3432
3432
  {"pid-file", OPT_PID_FILE, "Pid file used by safe_mysqld.",
3433
 
   (uchar**) &pidfile_name_ptr, (uchar**) &pidfile_name_ptr, 0, GET_STR,
 
3433
   (char**) &pidfile_name_ptr, (char**) &pidfile_name_ptr, 0, GET_STR,
3434
3434
   REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
3435
3435
  {"port", 'P', "Port number to use for connection or 0 for default to, in "
3436
3436
   "order of preference, my.cnf, $MYSQL_TCP_PORT, "
3438
3438
   "/etc/services, "
3439
3439
#endif
3440
3440
   "built-in default (" STRINGIFY_ARG(MYSQL_PORT) ").",
3441
 
   (uchar**) &mysqld_port,
3442
 
   (uchar**) &mysqld_port, 0, GET_UINT, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
 
3441
   (char**) &mysqld_port,
 
3442
   (char**) &mysqld_port, 0, GET_UINT, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
3443
3443
  {"port-open-timeout", OPT_PORT_OPEN_TIMEOUT,
3444
3444
   "Maximum time in seconds to wait for the port to become free. "
3445
 
   "(Default: no wait)", (uchar**) &mysqld_port_timeout,
3446
 
   (uchar**) &mysqld_port_timeout, 0, GET_UINT, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
 
3445
   "(Default: no wait)", (char**) &mysqld_port_timeout,
 
3446
   (char**) &mysqld_port_timeout, 0, GET_UINT, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
3447
3447
  {"relay-log", OPT_RELAY_LOG,
3448
3448
   "The location and name to use for relay logs.",
3449
 
   (uchar**) &opt_relay_logname, (uchar**) &opt_relay_logname, 0,
 
3449
   (char**) &opt_relay_logname, (char**) &opt_relay_logname, 0,
3450
3450
   GET_STR_ALLOC, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
3451
3451
  {"relay-log-index", OPT_RELAY_LOG_INDEX,
3452
3452
   "The location and name to use for the file that keeps a list of the last \
3453
3453
relay logs.",
3454
 
   (uchar**) &opt_relaylog_index_name, (uchar**) &opt_relaylog_index_name, 0,
 
3454
   (char**) &opt_relaylog_index_name, (char**) &opt_relaylog_index_name, 0,
3455
3455
   GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
3456
3456
  {"relay-log-info-file", OPT_RELAY_LOG_INFO_FILE,
3457
3457
   "The location and name of the file that remembers where the SQL replication \
3458
3458
thread is in the relay logs.",
3459
 
   (uchar**) &relay_log_info_file, (uchar**) &relay_log_info_file, 0, GET_STR,
 
3459
   (char**) &relay_log_info_file, (char**) &relay_log_info_file, 0, GET_STR,
3460
3460
   REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
3461
3461
  {"replicate-do-db", OPT_REPLICATE_DO_DB,
3462
3462
   "Tells the slave thread to restrict replication to the specified database. To specify more than one database, use the directive multiple times, once for each database. Note that this will only work if you do not use cross-database queries such as UPDATE some_db.some_table SET foo='bar' while having selected a different or no database. If you need cross database updates to work, make sure you have 3.23.28 or later, and use replicate-wild-do-table=db_name.%.",
3477
3477
   "In replication, if set to 1, do not skip events having our server id. \
3478
3478
Default value is 0 (to break infinite loops in circular replication). \
3479
3479
Can't be set to 1 if --log-slave-updates is used.",
3480
 
   (uchar**) &replicate_same_server_id,
3481
 
   (uchar**) &replicate_same_server_id,
 
3480
   (char**) &replicate_same_server_id,
 
3481
   (char**) &replicate_same_server_id,
3482
3482
   0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
3483
3483
  {"replicate-wild-do-table", OPT_REPLICATE_WILD_DO_TABLE,
3484
3484
   "Tells the slave thread to restrict replication to the tables that match the specified wildcard pattern. To specify more than one table, use the directive multiple times, once for each table. This will work for cross-database updates. Example: replicate-wild-do-table=foo%.bar% will replicate only updates to tables in all databases that start with foo and whose table names start with bar.",
3489
3489
  // In replication, we may need to tell the other servers how to connect
3490
3490
  {"report-host", OPT_REPORT_HOST,
3491
3491
   "Hostname or IP of the slave to be reported to to the master during slave registration. Will appear in the output of SHOW SLAVE HOSTS. Leave unset if you do not want the slave to register itself with the master. Note that it is not sufficient for the master to simply read the IP of the slave off the socket once the slave connects. Due to NAT and other routing issues, that IP may not be valid for connecting to the slave from the master or other hosts.",
3492
 
   (uchar**) &report_host, (uchar**) &report_host, 0, GET_STR, REQUIRED_ARG, 0, 0,
 
3492
   (char**) &report_host, (char**) &report_host, 0, GET_STR, REQUIRED_ARG, 0, 0,
3493
3493
   0, 0, 0, 0},
3494
3494
  {"report-password", OPT_REPORT_PASSWORD, "Undocumented.",
3495
 
   (uchar**) &report_password, (uchar**) &report_password, 0, GET_STR,
 
3495
   (char**) &report_password, (char**) &report_password, 0, GET_STR,
3496
3496
   REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
3497
3497
  {"report-port", OPT_REPORT_PORT,
3498
3498
   "Port for connecting to slave reported to the master during slave registration. Set it only if the slave is listening on a non-default port or if you have a special tunnel from the master or other clients to the slave. If not sure, leave this option unset.",
3499
 
   (uchar**) &report_port, (uchar**) &report_port, 0, GET_UINT, REQUIRED_ARG,
 
3499
   (char**) &report_port, (char**) &report_port, 0, GET_UINT, REQUIRED_ARG,
3500
3500
   MYSQL_PORT, 0, 0, 0, 0, 0},
3501
3501
  {"safe-mode", OPT_SAFE, "Skip some optimize stages (for testing).",
3502
3502
   0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0},
3503
3503
  {"secure-file-priv", OPT_SECURE_FILE_PRIV,
3504
3504
   "Limit LOAD DATA, SELECT ... OUTFILE, and LOAD_FILE() to files within specified directory",
3505
 
   (uchar**) &opt_secure_file_priv, (uchar**) &opt_secure_file_priv, 0,
 
3505
   (char**) &opt_secure_file_priv, (char**) &opt_secure_file_priv, 0,
3506
3506
   GET_STR_ALLOC, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
3507
3507
  {"server-id", OPT_SERVER_ID,
3508
3508
   "Uniquely identifies the server instance in the community of replication partners.",
3509
 
   (uchar**) &server_id, (uchar**) &server_id, 0, GET_ULONG, REQUIRED_ARG, 0, 0, 0,
 
3509
   (char**) &server_id, (char**) &server_id, 0, GET_ULONG, REQUIRED_ARG, 0, 0, 0,
3510
3510
   0, 0, 0},
3511
3511
  {"set-variable", 'O',
3512
3512
   "Change the value of a variable. Please note that this option is deprecated;you can set variables directly with --variable-name=value.",
3514
3514
  {"skip-new", OPT_SKIP_NEW, "Don't use new, possible wrong routines.",
3515
3515
   0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0},
3516
3516
  {"skip-slave-start", OPT_SKIP_SLAVE_START,
3517
 
   "If set, slave is not autostarted.", (uchar**) &opt_skip_slave_start,
3518
 
   (uchar**) &opt_skip_slave_start, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
 
3517
   "If set, slave is not autostarted.", (char**) &opt_skip_slave_start,
 
3518
   (char**) &opt_skip_slave_start, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
3519
3519
  {"skip-stack-trace", OPT_SKIP_STACK_TRACE,
3520
3520
   "Don't print a stack trace on failure.", 0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0,
3521
3521
   0, 0, 0, 0},
3527
3527
  {"slave-load-tmpdir", OPT_SLAVE_LOAD_TMPDIR,
3528
3528
   "The location where the slave should put its temporary files when \
3529
3529
replicating a LOAD DATA INFILE command.",
3530
 
   (uchar**) &slave_load_tmpdir, (uchar**) &slave_load_tmpdir, 0, GET_STR_ALLOC,
 
3530
   (char**) &slave_load_tmpdir, (char**) &slave_load_tmpdir, 0, GET_STR_ALLOC,
3531
3531
   REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
3532
3532
  {"slave-skip-errors", OPT_SLAVE_SKIP_ERRORS,
3533
3533
   "Tells the slave thread to continue replication when a query event returns an error from the provided list.",
3534
3534
   0, 0, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
3535
3535
  {"slave-exec-mode", OPT_SLAVE_EXEC_MODE,
3536
3536
   "Modes for how replication events should be executed.  Legal values are STRICT (default) and IDEMPOTENT. In IDEMPOTENT mode, replication will not stop for operations that are idempotent. In STRICT mode, replication will stop on any unexpected difference between the master and the slave.",
3537
 
   (uchar**) &slave_exec_mode_str, (uchar**) &slave_exec_mode_str, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
 
3537
   (char**) &slave_exec_mode_str, (char**) &slave_exec_mode_str, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
3538
3538
  {"slow-query-log", OPT_SLOW_LOG,
3539
 
   "Enable|disable slow query log", (uchar**) &opt_slow_log,
3540
 
   (uchar**) &opt_slow_log, 0, GET_BOOL, OPT_ARG, 0, 0, 0, 0, 0, 0},
 
3539
   "Enable|disable slow query log", (char**) &opt_slow_log,
 
3540
   (char**) &opt_slow_log, 0, GET_BOOL, OPT_ARG, 0, 0, 0, 0, 0, 0},
3541
3541
  {"sql-bin-update-same", OPT_SQL_BIN_UPDATE_SAME,
3542
3542
   "The update log is deprecated since version 5.0, is replaced by the binary \
3543
3543
log and this option does nothing anymore.",
3544
3544
   0, 0, 0, GET_DISABLED, NO_ARG, 0, 0, 0, 0, 0, 0},
3545
3545
  {"symbolic-links", 's', "Enable symbolic link support.",
3546
 
   (uchar**) &my_use_symdir, (uchar**) &my_use_symdir, 0, GET_BOOL, NO_ARG,
 
3546
   (char**) &my_use_symdir, (char**) &my_use_symdir, 0, GET_BOOL, NO_ARG,
3547
3547
   /*
3548
3548
     The system call realpath() produces warnings under valgrind and
3549
3549
     purify. These are not suppressed: instead we disable symlinks
3552
3552
   IF_PURIFY(0,1), 0, 0, 0, 0, 0},
3553
3553
  {"sysdate-is-now", OPT_SYSDATE_IS_NOW,
3554
3554
   "Non-default option to alias SYSDATE() to NOW() to make it safe-replicable. Since 5.0, SYSDATE() returns a `dynamic' value different for different invocations, even within the same statement.",
3555
 
   (uchar**) &global_system_variables.sysdate_is_now,
 
3555
   (char**) &global_system_variables.sysdate_is_now,
3556
3556
   0, 0, GET_BOOL, NO_ARG, 0, 0, 1, 0, 1, 0},
3557
3557
  {"tc-heuristic-recover", OPT_TC_HEURISTIC_RECOVER,
3558
3558
   "Decision to use in heuristic recover process. Possible values are COMMIT or ROLLBACK.",
3559
 
   (uchar**) &opt_tc_heuristic_recover, (uchar**) &opt_tc_heuristic_recover,
 
3559
   (char**) &opt_tc_heuristic_recover, (char**) &opt_tc_heuristic_recover,
3560
3560
   0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
3561
3561
  {"temp-pool", OPT_TEMP_POOL,
3562
3562
   "Using this option will cause most temporary files created to use a small set of names, rather than a unique name for each new file.",
3563
 
   (uchar**) &use_temp_pool, (uchar**) &use_temp_pool, 0, GET_BOOL, NO_ARG, 1,
 
3563
   (char**) &use_temp_pool, (char**) &use_temp_pool, 0, GET_BOOL, NO_ARG, 1,
3564
3564
   0, 0, 0, 0, 0},
3565
3565
  {"timed_mutexes", OPT_TIMED_MUTEXES,
3566
3566
   "Specify whether to time mutexes (only InnoDB mutexes are currently supported)",
3567
 
   (uchar**) &timed_mutexes, (uchar**) &timed_mutexes, 0, GET_BOOL, NO_ARG, 0, 
 
3567
   (char**) &timed_mutexes, (char**) &timed_mutexes, 0, GET_BOOL, NO_ARG, 0, 
3568
3568
    0, 0, 0, 0, 0},
3569
3569
  {"tmpdir", 't',
3570
3570
   "Path for temporary files. Several paths may be specified, separated by a "
3571
3571
   "colon (:)"
3572
3572
   ", in this case they are used in a round-robin fashion.",
3573
 
   (uchar**) &opt_mysql_tmpdir,
3574
 
   (uchar**) &opt_mysql_tmpdir, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
 
3573
   (char**) &opt_mysql_tmpdir,
 
3574
   (char**) &opt_mysql_tmpdir, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
3575
3575
  {"transaction-isolation", OPT_TX_ISOLATION,
3576
3576
   "Default transaction isolation level.", 0, 0, 0, GET_STR, REQUIRED_ARG, 0,
3577
3577
   0, 0, 0, 0, 0},
3578
3578
  {"use-symbolic-links", 's', "Enable symbolic link support. Deprecated option; use --symbolic-links instead.",
3579
 
   (uchar**) &my_use_symdir, (uchar**) &my_use_symdir, 0, GET_BOOL, NO_ARG,
 
3579
   (char**) &my_use_symdir, (char**) &my_use_symdir, 0, GET_BOOL, NO_ARG,
3580
3580
   IF_PURIFY(0,1), 0, 0, 0, 0, 0},
3581
3581
  {"user", 'u', "Run mysqld daemon as user.", 0, 0, 0, GET_STR, REQUIRED_ARG,
3582
3582
   0, 0, 0, 0, 0, 0},
3583
3583
  {"verbose", 'v', "Used with --help option for detailed help",
3584
 
   (uchar**) &opt_verbose, (uchar**) &opt_verbose, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0,
 
3584
   (char**) &opt_verbose, (char**) &opt_verbose, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0,
3585
3585
   0, 0},
3586
3586
  {"version", 'V', "Output version information and exit.", 0, 0, 0, GET_NO_ARG,
3587
3587
   NO_ARG, 0, 0, 0, 0, 0, 0},
3588
3588
  {"warnings", 'W', "Deprecated; use --log-warnings instead.",
3589
 
   (uchar**) &global_system_variables.log_warnings,
3590
 
   (uchar**) &max_system_variables.log_warnings, 0, GET_ULONG, OPT_ARG,
 
3589
   (char**) &global_system_variables.log_warnings,
 
3590
   (char**) &max_system_variables.log_warnings, 0, GET_ULONG, OPT_ARG,
3591
3591
   1, 0, ULONG_MAX, 0, 0, 0},
3592
3592
  { "back_log", OPT_BACK_LOG,
3593
3593
    "The number of outstanding connection requests MySQL can have. This comes into play when the main MySQL thread gets very many connection requests in a very short time.",
3594
 
    (uchar**) &back_log, (uchar**) &back_log, 0, GET_ULONG,
 
3594
    (char**) &back_log, (char**) &back_log, 0, GET_ULONG,
3595
3595
    REQUIRED_ARG, 50, 1, 65535, 0, 1, 0 },
3596
3596
  {"binlog_cache_size", OPT_BINLOG_CACHE_SIZE,
3597
3597
   "The size of the cache to hold the SQL statements for the binary log during a transaction. If you often use big, multi-statement transactions you can increase this to get more performance.",
3598
 
   (uchar**) &binlog_cache_size, (uchar**) &binlog_cache_size, 0, GET_ULONG,
 
3598
   (char**) &binlog_cache_size, (char**) &binlog_cache_size, 0, GET_ULONG,
3599
3599
   REQUIRED_ARG, 32*1024L, IO_SIZE, ULONG_MAX, 0, IO_SIZE, 0},
3600
3600
  {"bulk_insert_buffer_size", OPT_BULK_INSERT_BUFFER_SIZE,
3601
3601
   "Size of tree cache used in bulk insert optimisation. Note that this is a limit per thread!",
3602
 
   (uchar**) &global_system_variables.bulk_insert_buff_size,
3603
 
   (uchar**) &max_system_variables.bulk_insert_buff_size,
 
3602
   (char**) &global_system_variables.bulk_insert_buff_size,
 
3603
   (char**) &max_system_variables.bulk_insert_buff_size,
3604
3604
   0, GET_ULONG, REQUIRED_ARG, 8192*1024, 0, ULONG_MAX, 0, 1, 0},
3605
3605
  {"connect_timeout", OPT_CONNECT_TIMEOUT,
3606
3606
   "The number of seconds the mysqld server is waiting for a connect packet before responding with 'Bad handshake'.",
3607
 
    (uchar**) &connect_timeout, (uchar**) &connect_timeout,
 
3607
    (char**) &connect_timeout, (char**) &connect_timeout,
3608
3608
   0, GET_ULONG, REQUIRED_ARG, CONNECT_TIMEOUT, 2, LONG_TIMEOUT, 0, 1, 0 },
3609
3609
  { "date_format", OPT_DATE_FORMAT,
3610
3610
    "The DATE format (For future).",
3611
 
    (uchar**) &opt_date_time_formats[MYSQL_TIMESTAMP_DATE],
3612
 
    (uchar**) &opt_date_time_formats[MYSQL_TIMESTAMP_DATE],
 
3611
    (char**) &opt_date_time_formats[MYSQL_TIMESTAMP_DATE],
 
3612
    (char**) &opt_date_time_formats[MYSQL_TIMESTAMP_DATE],
3613
3613
    0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
3614
3614
  { "datetime_format", OPT_DATETIME_FORMAT,
3615
3615
    "The DATETIME/TIMESTAMP format (for future).",
3616
 
    (uchar**) &opt_date_time_formats[MYSQL_TIMESTAMP_DATETIME],
3617
 
    (uchar**) &opt_date_time_formats[MYSQL_TIMESTAMP_DATETIME],
 
3616
    (char**) &opt_date_time_formats[MYSQL_TIMESTAMP_DATETIME],
 
3617
    (char**) &opt_date_time_formats[MYSQL_TIMESTAMP_DATETIME],
3618
3618
    0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
3619
3619
  { "default_week_format", OPT_DEFAULT_WEEK_FORMAT,
3620
3620
    "The default week format used by WEEK() functions.",
3621
 
    (uchar**) &global_system_variables.default_week_format,
3622
 
    (uchar**) &max_system_variables.default_week_format,
 
3621
    (char**) &global_system_variables.default_week_format,
 
3622
    (char**) &max_system_variables.default_week_format,
3623
3623
    0, GET_ULONG, REQUIRED_ARG, 0, 0, 7L, 0, 1, 0},
3624
3624
  {"div_precision_increment", OPT_DIV_PRECINCREMENT,
3625
3625
   "Precision of the result of '/' operator will be increased on that value.",
3626
 
   (uchar**) &global_system_variables.div_precincrement,
3627
 
   (uchar**) &max_system_variables.div_precincrement, 0, GET_ULONG,
 
3626
   (char**) &global_system_variables.div_precincrement,
 
3627
   (char**) &max_system_variables.div_precincrement, 0, GET_ULONG,
3628
3628
   REQUIRED_ARG, 4, 0, DECIMAL_MAX_SCALE, 0, 0, 0},
3629
3629
  {"expire_logs_days", OPT_EXPIRE_LOGS_DAYS,
3630
3630
   "If non-zero, binary logs will be purged after expire_logs_days "
3631
3631
   "days; possible purges happen at startup and at binary log rotation.",
3632
 
   (uchar**) &expire_logs_days,
3633
 
   (uchar**) &expire_logs_days, 0, GET_ULONG,
 
3632
   (char**) &expire_logs_days,
 
3633
   (char**) &expire_logs_days, 0, GET_ULONG,
3634
3634
   REQUIRED_ARG, 0, 0, 99, 0, 1, 0},
3635
3635
  { "flush_time", OPT_FLUSH_TIME,
3636
3636
    "A dedicated thread is created to flush all tables at the given interval.",
3637
 
    (uchar**) &flush_time, (uchar**) &flush_time, 0, GET_ULONG, REQUIRED_ARG,
 
3637
    (char**) &flush_time, (char**) &flush_time, 0, GET_ULONG, REQUIRED_ARG,
3638
3638
    FLUSH_TIME, 0, LONG_TIMEOUT, 0, 1, 0},
3639
3639
  { "group_concat_max_len", OPT_GROUP_CONCAT_MAX_LEN,
3640
3640
    "The maximum length of the result of function  group_concat.",
3641
 
    (uchar**) &global_system_variables.group_concat_max_len,
3642
 
    (uchar**) &max_system_variables.group_concat_max_len, 0, GET_ULONG,
 
3641
    (char**) &global_system_variables.group_concat_max_len,
 
3642
    (char**) &max_system_variables.group_concat_max_len, 0, GET_ULONG,
3643
3643
    REQUIRED_ARG, 1024, 4, ULONG_MAX, 0, 1, 0},
3644
3644
  {"interactive_timeout", OPT_INTERACTIVE_TIMEOUT,
3645
3645
   "The number of seconds the server waits for activity on an interactive connection before closing it.",
3646
 
   (uchar**) &global_system_variables.net_interactive_timeout,
3647
 
   (uchar**) &max_system_variables.net_interactive_timeout, 0,
 
3646
   (char**) &global_system_variables.net_interactive_timeout,
 
3647
   (char**) &max_system_variables.net_interactive_timeout, 0,
3648
3648
   GET_ULONG, REQUIRED_ARG, NET_WAIT_TIMEOUT, 1, LONG_TIMEOUT, 0, 1, 0},
3649
3649
  {"join_buffer_size", OPT_JOIN_BUFF_SIZE,
3650
3650
   "The size of the buffer that is used for full joins.",
3651
 
   (uchar**) &global_system_variables.join_buff_size,
3652
 
   (uchar**) &max_system_variables.join_buff_size, 0, GET_ULONG,
 
3651
   (char**) &global_system_variables.join_buff_size,
 
3652
   (char**) &max_system_variables.join_buff_size, 0, GET_ULONG,
3653
3653
   REQUIRED_ARG, 128*1024L, IO_SIZE*2+MALLOC_OVERHEAD, ULONG_MAX,
3654
3654
   MALLOC_OVERHEAD, IO_SIZE, 0},
3655
3655
  {"keep_files_on_create", OPT_KEEP_FILES_ON_CREATE,
3656
3656
   "Don't overwrite stale .MYD and .MYI even if no directory is specified.",
3657
 
   (uchar**) &global_system_variables.keep_files_on_create,
3658
 
   (uchar**) &max_system_variables.keep_files_on_create,
 
3657
   (char**) &global_system_variables.keep_files_on_create,
 
3658
   (char**) &max_system_variables.keep_files_on_create,
3659
3659
   0, GET_BOOL, OPT_ARG, 0, 0, 0, 0, 0, 0},
3660
3660
  {"key_buffer_size", OPT_KEY_BUFFER_SIZE,
3661
3661
   "The size of the buffer used for index blocks for MyISAM tables. Increase this to get better index handling (for all reads and multiple writes) to as much as you can afford; 64M on a 256M machine that mainly runs MySQL is quite common.",
3662
 
   (uchar**) &dflt_key_cache_var.param_buff_size,
3663
 
   (uchar**) 0,
 
3662
   (char**) &dflt_key_cache_var.param_buff_size,
 
3663
   (char**) 0,
3664
3664
   0, (GET_ULL | GET_ASK_ADDR),
3665
3665
   REQUIRED_ARG, KEY_CACHE_SIZE, MALLOC_OVERHEAD, SIZE_T_MAX, MALLOC_OVERHEAD,
3666
3666
   IO_SIZE, 0},
3667
3667
  {"key_cache_age_threshold", OPT_KEY_CACHE_AGE_THRESHOLD,
3668
3668
   "This characterizes the number of hits a hot block has to be untouched until it is considered aged enough to be downgraded to a warm block. This specifies the percentage ratio of that number of hits to the total number of blocks in key cache",
3669
 
   (uchar**) &dflt_key_cache_var.param_age_threshold,
3670
 
   (uchar**) 0,
 
3669
   (char**) &dflt_key_cache_var.param_age_threshold,
 
3670
   (char**) 0,
3671
3671
   0, (GET_ULONG | GET_ASK_ADDR), REQUIRED_ARG, 
3672
3672
   300, 100, ULONG_MAX, 0, 100, 0},
3673
3673
  {"key_cache_block_size", OPT_KEY_CACHE_BLOCK_SIZE,
3674
3674
   "The default size of key cache blocks",
3675
 
   (uchar**) &dflt_key_cache_var.param_block_size,
3676
 
   (uchar**) 0,
 
3675
   (char**) &dflt_key_cache_var.param_block_size,
 
3676
   (char**) 0,
3677
3677
   0, (GET_ULONG | GET_ASK_ADDR), REQUIRED_ARG,
3678
3678
   KEY_CACHE_BLOCK_SIZE, 512, 1024 * 16, 0, 512, 0},
3679
3679
  {"key_cache_division_limit", OPT_KEY_CACHE_DIVISION_LIMIT,
3680
3680
   "The minimum percentage of warm blocks in key cache",
3681
 
   (uchar**) &dflt_key_cache_var.param_division_limit,
3682
 
   (uchar**) 0,
 
3681
   (char**) &dflt_key_cache_var.param_division_limit,
 
3682
   (char**) 0,
3683
3683
   0, (GET_ULONG | GET_ASK_ADDR) , REQUIRED_ARG, 100,
3684
3684
   1, 100, 0, 1, 0},
3685
3685
  {"long_query_time", OPT_LONG_QUERY_TIME,
3686
3686
   "Log all queries that have taken more than long_query_time seconds to execute to file. "
3687
3687
   "The argument will be treated as a decimal value with microsecond precission.",
3688
 
   (uchar**) &long_query_time, (uchar**) &long_query_time, 0, GET_DOUBLE,
 
3688
   (char**) &long_query_time, (char**) &long_query_time, 0, GET_DOUBLE,
3689
3689
   REQUIRED_ARG, 10, 0, LONG_TIMEOUT, 0, 0, 0},
3690
3690
  {"lower_case_table_names", OPT_LOWER_CASE_TABLE_NAMES,
3691
3691
   "If set to 1 table names are stored in lowercase on disk and table names will be case-insensitive.  Should be set to 2 if you are using a case insensitive file system",
3692
 
   (uchar**) &lower_case_table_names,
3693
 
   (uchar**) &lower_case_table_names, 0, GET_UINT, OPT_ARG,
 
3692
   (char**) &lower_case_table_names,
 
3693
   (char**) &lower_case_table_names, 0, GET_UINT, OPT_ARG,
3694
3694
#ifdef FN_NO_CASE_SENCE
3695
3695
    1
3696
3696
#else
3699
3699
   , 0, 2, 0, 1, 0},
3700
3700
  {"max_allowed_packet", OPT_MAX_ALLOWED_PACKET,
3701
3701
   "Max packetlength to send/receive from to server.",
3702
 
   (uchar**) &global_system_variables.max_allowed_packet,
3703
 
   (uchar**) &max_system_variables.max_allowed_packet, 0, GET_ULONG,
 
3702
   (char**) &global_system_variables.max_allowed_packet,
 
3703
   (char**) &max_system_variables.max_allowed_packet, 0, GET_ULONG,
3704
3704
   REQUIRED_ARG, 1024*1024L, 1024, 1024L*1024L*1024L, MALLOC_OVERHEAD, 1024, 0},
3705
3705
  {"max_binlog_cache_size", OPT_MAX_BINLOG_CACHE_SIZE,
3706
3706
   "Can be used to restrict the total size used to cache a multi-transaction query.",
3707
 
   (uchar**) &max_binlog_cache_size, (uchar**) &max_binlog_cache_size, 0,
 
3707
   (char**) &max_binlog_cache_size, (char**) &max_binlog_cache_size, 0,
3708
3708
   GET_ULONG, REQUIRED_ARG, ULONG_MAX, IO_SIZE, ULONG_MAX, 0, IO_SIZE, 0},
3709
3709
  {"max_binlog_size", OPT_MAX_BINLOG_SIZE,
3710
3710
   "Binary log will be rotated automatically when the size exceeds this \
3711
3711
value. Will also apply to relay logs if max_relay_log_size is 0. \
3712
3712
The minimum value for this variable is 4096.",
3713
 
   (uchar**) &max_binlog_size, (uchar**) &max_binlog_size, 0, GET_ULONG,
 
3713
   (char**) &max_binlog_size, (char**) &max_binlog_size, 0, GET_ULONG,
3714
3714
   REQUIRED_ARG, 1024*1024L*1024L, IO_SIZE, 1024*1024L*1024L, 0, IO_SIZE, 0},
3715
3715
  {"max_connect_errors", OPT_MAX_CONNECT_ERRORS,
3716
3716
   "If there is more than this number of interrupted connections from a host this host will be blocked from further connections.",
3717
 
   (uchar**) &max_connect_errors, (uchar**) &max_connect_errors, 0, GET_ULONG,
 
3717
   (char**) &max_connect_errors, (char**) &max_connect_errors, 0, GET_ULONG,
3718
3718
    REQUIRED_ARG, MAX_CONNECT_ERRORS, 1, ULONG_MAX, 0, 1, 0},
3719
3719
  // Default max_connections of 151 is larger than Apache's default max
3720
3720
  // children, to avoid "too many connections" error in a common setup
3721
3721
  {"max_connections", OPT_MAX_CONNECTIONS,
3722
 
   "The number of simultaneous clients allowed.", (uchar**) &max_connections,
3723
 
   (uchar**) &max_connections, 0, GET_ULONG, REQUIRED_ARG, 151, 1, 100000, 0, 1,
 
3722
   "The number of simultaneous clients allowed.", (char**) &max_connections,
 
3723
   (char**) &max_connections, 0, GET_ULONG, REQUIRED_ARG, 151, 1, 100000, 0, 1,
3724
3724
   0},
3725
3725
  {"max_error_count", OPT_MAX_ERROR_COUNT,
3726
3726
   "Max number of errors/warnings to store for a statement.",
3727
 
   (uchar**) &global_system_variables.max_error_count,
3728
 
   (uchar**) &max_system_variables.max_error_count,
 
3727
   (char**) &global_system_variables.max_error_count,
 
3728
   (char**) &max_system_variables.max_error_count,
3729
3729
   0, GET_ULONG, REQUIRED_ARG, DEFAULT_ERROR_COUNT, 0, 65535, 0, 1, 0},
3730
3730
  {"max_heap_table_size", OPT_MAX_HEP_TABLE_SIZE,
3731
3731
   "Don't allow creation of heap tables bigger than this.",
3732
 
   (uchar**) &global_system_variables.max_heap_table_size,
3733
 
   (uchar**) &max_system_variables.max_heap_table_size, 0, GET_ULL,
 
3732
   (char**) &global_system_variables.max_heap_table_size,
 
3733
   (char**) &max_system_variables.max_heap_table_size, 0, GET_ULL,
3734
3734
   REQUIRED_ARG, 16*1024*1024L, 16384, MAX_MEM_TABLE_SIZE,
3735
3735
   MALLOC_OVERHEAD, 1024, 0},
3736
3736
  {"max_join_size", OPT_MAX_JOIN_SIZE,
3737
3737
   "Joins that are probably going to read more than max_join_size records return an error.",
3738
 
   (uchar**) &global_system_variables.max_join_size,
3739
 
   (uchar**) &max_system_variables.max_join_size, 0, GET_HA_ROWS, REQUIRED_ARG,
 
3738
   (char**) &global_system_variables.max_join_size,
 
3739
   (char**) &max_system_variables.max_join_size, 0, GET_HA_ROWS, REQUIRED_ARG,
3740
3740
   ~0L, 1, ~0L, 0, 1, 0},
3741
3741
   {"max_length_for_sort_data", OPT_MAX_LENGTH_FOR_SORT_DATA,
3742
3742
    "Max number of bytes in sorted records.",
3743
 
    (uchar**) &global_system_variables.max_length_for_sort_data,
3744
 
    (uchar**) &max_system_variables.max_length_for_sort_data, 0, GET_ULONG,
 
3743
    (char**) &global_system_variables.max_length_for_sort_data,
 
3744
    (char**) &max_system_variables.max_length_for_sort_data, 0, GET_ULONG,
3745
3745
    REQUIRED_ARG, 1024, 4, 8192*1024L, 0, 1, 0},
3746
3746
  {"max_relay_log_size", OPT_MAX_RELAY_LOG_SIZE,
3747
3747
   "If non-zero: relay log will be rotated automatically when the size exceeds this value; if zero (the default): when the size exceeds max_binlog_size. 0 excepted, the minimum value for this variable is 4096.",
3748
 
   (uchar**) &max_relay_log_size, (uchar**) &max_relay_log_size, 0, GET_ULONG,
 
3748
   (char**) &max_relay_log_size, (char**) &max_relay_log_size, 0, GET_ULONG,
3749
3749
   REQUIRED_ARG, 0L, 0L, 1024*1024L*1024L, 0, IO_SIZE, 0},
3750
3750
  { "max_seeks_for_key", OPT_MAX_SEEKS_FOR_KEY,
3751
3751
    "Limit assumed max number of seeks when looking up rows based on a key",
3752
 
    (uchar**) &global_system_variables.max_seeks_for_key,
3753
 
    (uchar**) &max_system_variables.max_seeks_for_key, 0, GET_ULONG,
 
3752
    (char**) &global_system_variables.max_seeks_for_key,
 
3753
    (char**) &max_system_variables.max_seeks_for_key, 0, GET_ULONG,
3754
3754
    REQUIRED_ARG, ULONG_MAX, 1, ULONG_MAX, 0, 1, 0 },
3755
3755
  {"max_sort_length", OPT_MAX_SORT_LENGTH,
3756
3756
   "The number of bytes to use when sorting BLOB or TEXT values (only the first max_sort_length bytes of each value are used; the rest are ignored).",
3757
 
   (uchar**) &global_system_variables.max_sort_length,
3758
 
   (uchar**) &max_system_variables.max_sort_length, 0, GET_ULONG,
 
3757
   (char**) &global_system_variables.max_sort_length,
 
3758
   (char**) &max_system_variables.max_sort_length, 0, GET_ULONG,
3759
3759
   REQUIRED_ARG, 1024, 4, 8192*1024L, 0, 1, 0},
3760
3760
  {"max_tmp_tables", OPT_MAX_TMP_TABLES,
3761
3761
   "Maximum number of temporary tables a client can keep open at a time.",
3762
 
   (uchar**) &global_system_variables.max_tmp_tables,
3763
 
   (uchar**) &max_system_variables.max_tmp_tables, 0, GET_ULONG,
 
3762
   (char**) &global_system_variables.max_tmp_tables,
 
3763
   (char**) &max_system_variables.max_tmp_tables, 0, GET_ULONG,
3764
3764
   REQUIRED_ARG, 32, 1, ULONG_MAX, 0, 1, 0},
3765
3765
  {"max_write_lock_count", OPT_MAX_WRITE_LOCK_COUNT,
3766
3766
   "After this many write locks, allow some read locks to run in between.",
3767
 
   (uchar**) &max_write_lock_count, (uchar**) &max_write_lock_count, 0, GET_ULONG,
 
3767
   (char**) &max_write_lock_count, (char**) &max_write_lock_count, 0, GET_ULONG,
3768
3768
   REQUIRED_ARG, ULONG_MAX, 1, ULONG_MAX, 0, 1, 0},
3769
3769
  {"min_examined_row_limit", OPT_MIN_EXAMINED_ROW_LIMIT,
3770
3770
   "Don't log queries which examine less than min_examined_row_limit rows to file.",
3771
 
   (uchar**) &global_system_variables.min_examined_row_limit,
3772
 
   (uchar**) &max_system_variables.min_examined_row_limit, 0, GET_ULONG,
 
3771
   (char**) &global_system_variables.min_examined_row_limit,
 
3772
   (char**) &max_system_variables.min_examined_row_limit, 0, GET_ULONG,
3773
3773
  REQUIRED_ARG, 0, 0, ULONG_MAX, 0, 1L, 0},
3774
3774
  {"myisam_block_size", OPT_MYISAM_BLOCK_SIZE,
3775
3775
   "Block size to be used for MyISAM index pages.",
3776
 
   (uchar**) &opt_myisam_block_size,
3777
 
   (uchar**) &opt_myisam_block_size, 0, GET_ULONG, REQUIRED_ARG,
 
3776
   (char**) &opt_myisam_block_size,
 
3777
   (char**) &opt_myisam_block_size, 0, GET_ULONG, REQUIRED_ARG,
3778
3778
   MI_KEY_BLOCK_LENGTH, MI_MIN_KEY_BLOCK_LENGTH, MI_MAX_KEY_BLOCK_LENGTH,
3779
3779
   0, MI_MIN_KEY_BLOCK_LENGTH, 0},
3780
3780
  {"myisam_data_pointer_size", OPT_MYISAM_DATA_POINTER_SIZE,
3781
3781
   "Default pointer size to be used for MyISAM tables.",
3782
 
   (uchar**) &myisam_data_pointer_size,
3783
 
   (uchar**) &myisam_data_pointer_size, 0, GET_ULONG, REQUIRED_ARG,
 
3782
   (char**) &myisam_data_pointer_size,
 
3783
   (char**) &myisam_data_pointer_size, 0, GET_ULONG, REQUIRED_ARG,
3784
3784
   6, 2, 7, 0, 1, 0},
3785
3785
  {"myisam_max_extra_sort_file_size", OPT_MYISAM_MAX_EXTRA_SORT_FILE_SIZE,
3786
3786
   "Deprecated option",
3787
 
   (uchar**) &global_system_variables.myisam_max_extra_sort_file_size,
3788
 
   (uchar**) &max_system_variables.myisam_max_extra_sort_file_size,
 
3787
   (char**) &global_system_variables.myisam_max_extra_sort_file_size,
 
3788
   (char**) &max_system_variables.myisam_max_extra_sort_file_size,
3789
3789
   0, GET_ULL, REQUIRED_ARG, (ulonglong) MI_MAX_TEMP_LENGTH,
3790
3790
   0, (ulonglong) MAX_FILE_SIZE, 0, 1, 0},
3791
3791
  {"myisam_max_sort_file_size", OPT_MYISAM_MAX_SORT_FILE_SIZE,
3792
3792
   "Don't use the fast sort index method to created index if the temporary file would get bigger than this.",
3793
 
   (uchar**) &global_system_variables.myisam_max_sort_file_size,
3794
 
   (uchar**) &max_system_variables.myisam_max_sort_file_size, 0,
 
3793
   (char**) &global_system_variables.myisam_max_sort_file_size,
 
3794
   (char**) &max_system_variables.myisam_max_sort_file_size, 0,
3795
3795
   GET_ULL, REQUIRED_ARG, (longlong) LONG_MAX, 0, (ulonglong) MAX_FILE_SIZE,
3796
3796
   0, 1024*1024, 0},
3797
3797
  {"myisam_repair_threads", OPT_MYISAM_REPAIR_THREADS,
3798
3798
   "Number of threads to use when repairing MyISAM tables. The value of 1 disables parallel repair.",
3799
 
   (uchar**) &global_system_variables.myisam_repair_threads,
3800
 
   (uchar**) &max_system_variables.myisam_repair_threads, 0,
 
3799
   (char**) &global_system_variables.myisam_repair_threads,
 
3800
   (char**) &max_system_variables.myisam_repair_threads, 0,
3801
3801
   GET_ULONG, REQUIRED_ARG, 1, 1, ULONG_MAX, 0, 1, 0},
3802
3802
  {"myisam_sort_buffer_size", OPT_MYISAM_SORT_BUFFER_SIZE,
3803
3803
   "The buffer that is allocated when sorting the index when doing a REPAIR or when creating indexes with CREATE INDEX or ALTER TABLE.",
3804
 
   (uchar**) &global_system_variables.myisam_sort_buff_size,
3805
 
   (uchar**) &max_system_variables.myisam_sort_buff_size, 0,
 
3804
   (char**) &global_system_variables.myisam_sort_buff_size,
 
3805
   (char**) &max_system_variables.myisam_sort_buff_size, 0,
3806
3806
   GET_ULONG, REQUIRED_ARG, 8192*1024, 4, ~0L, 0, 1, 0},
3807
3807
  {"myisam_stats_method", OPT_MYISAM_STATS_METHOD,
3808
3808
   "Specifies how MyISAM index statistics collection code should threat NULLs. "
3809
3809
   "Possible values of name are \"nulls_unequal\" (default behavior for 4.1/5.0), "
3810
3810
   "\"nulls_equal\" (emulate 4.0 behavior), and \"nulls_ignored\".",
3811
 
   (uchar**) &myisam_stats_method_str, (uchar**) &myisam_stats_method_str, 0,
 
3811
   (char**) &myisam_stats_method_str, (char**) &myisam_stats_method_str, 0,
3812
3812
    GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
3813
3813
  {"net_buffer_length", OPT_NET_BUFFER_LENGTH,
3814
3814
   "Buffer length for TCP/IP and socket communication.",
3815
 
   (uchar**) &global_system_variables.net_buffer_length,
3816
 
   (uchar**) &max_system_variables.net_buffer_length, 0, GET_ULONG,
 
3815
   (char**) &global_system_variables.net_buffer_length,
 
3816
   (char**) &max_system_variables.net_buffer_length, 0, GET_ULONG,
3817
3817
   REQUIRED_ARG, 16384, 1024, 1024*1024L, 0, 1024, 0},
3818
3818
  {"net_read_timeout", OPT_NET_READ_TIMEOUT,
3819
3819
   "Number of seconds to wait for more data from a connection before aborting the read.",
3820
 
   (uchar**) &global_system_variables.net_read_timeout,
3821
 
   (uchar**) &max_system_variables.net_read_timeout, 0, GET_ULONG,
 
3820
   (char**) &global_system_variables.net_read_timeout,
 
3821
   (char**) &max_system_variables.net_read_timeout, 0, GET_ULONG,
3822
3822
   REQUIRED_ARG, NET_READ_TIMEOUT, 1, LONG_TIMEOUT, 0, 1, 0},
3823
3823
  {"net_retry_count", OPT_NET_RETRY_COUNT,
3824
3824
   "If a read on a communication port is interrupted, retry this many times before giving up.",
3825
 
   (uchar**) &global_system_variables.net_retry_count,
3826
 
   (uchar**) &max_system_variables.net_retry_count,0,
 
3825
   (char**) &global_system_variables.net_retry_count,
 
3826
   (char**) &max_system_variables.net_retry_count,0,
3827
3827
   GET_ULONG, REQUIRED_ARG, MYSQLD_NET_RETRY_COUNT, 1, ULONG_MAX, 0, 1, 0},
3828
3828
  {"net_write_timeout", OPT_NET_WRITE_TIMEOUT,
3829
3829
   "Number of seconds to wait for a block to be written to a connection  before aborting the write.",
3830
 
   (uchar**) &global_system_variables.net_write_timeout,
3831
 
   (uchar**) &max_system_variables.net_write_timeout, 0, GET_ULONG,
 
3830
   (char**) &global_system_variables.net_write_timeout,
 
3831
   (char**) &max_system_variables.net_write_timeout, 0, GET_ULONG,
3832
3832
   REQUIRED_ARG, NET_WRITE_TIMEOUT, 1, LONG_TIMEOUT, 0, 1, 0},
3833
3833
  { "old", OPT_OLD_MODE, "Use compatible behavior.", 
3834
 
    (uchar**) &global_system_variables.old_mode,
3835
 
    (uchar**) &max_system_variables.old_mode, 0, GET_BOOL, NO_ARG, 
 
3834
    (char**) &global_system_variables.old_mode,
 
3835
    (char**) &max_system_variables.old_mode, 0, GET_BOOL, NO_ARG, 
3836
3836
    0, 0, 0, 0, 0, 0},
3837
3837
  {"open_files_limit", OPT_OPEN_FILES_LIMIT,
3838
3838
   "If this is not 0, then mysqld will use this value to reserve file descriptors to use with setrlimit(). If this value is 0 then mysqld will reserve max_connections*5 or max_connections + table_cache*2 (whichever is larger) number of files.",
3839
 
   (uchar**) &open_files_limit, (uchar**) &open_files_limit, 0, GET_ULONG,
 
3839
   (char**) &open_files_limit, (char**) &open_files_limit, 0, GET_ULONG,
3840
3840
   REQUIRED_ARG, 0, 0, OS_FILE_LIMIT, 0, 1, 0},
3841
3841
  {"optimizer_prune_level", OPT_OPTIMIZER_PRUNE_LEVEL,
3842
3842
   "Controls the heuristic(s) applied during query optimization to prune less-promising partial plans from the optimizer search space. Meaning: 0 - do not apply any heuristic, thus perform exhaustive search; 1 - prune plans based on number of retrieved rows.",
3843
 
   (uchar**) &global_system_variables.optimizer_prune_level,
3844
 
   (uchar**) &max_system_variables.optimizer_prune_level,
 
3843
   (char**) &global_system_variables.optimizer_prune_level,
 
3844
   (char**) &max_system_variables.optimizer_prune_level,
3845
3845
   0, GET_ULONG, OPT_ARG, 1, 0, 1, 0, 1, 0},
3846
3846
  {"optimizer_search_depth", OPT_OPTIMIZER_SEARCH_DEPTH,
3847
3847
   "Maximum depth of search performed by the query optimizer. Values larger than the number of relations in a query result in better query plans, but take longer to compile a query. Smaller values than the number of tables in a relation result in faster optimization, but may produce very bad query plans. If set to 0, the system will automatically pick a reasonable value; if set to MAX_TABLES+2, the optimizer will switch to the original find_best (used for testing/comparison).",
3848
 
   (uchar**) &global_system_variables.optimizer_search_depth,
3849
 
   (uchar**) &max_system_variables.optimizer_search_depth,
 
3848
   (char**) &global_system_variables.optimizer_search_depth,
 
3849
   (char**) &max_system_variables.optimizer_search_depth,
3850
3850
   0, GET_ULONG, OPT_ARG, MAX_TABLES+1, 0, MAX_TABLES+2, 0, 1, 0},
3851
3851
  {"plugin_dir", OPT_PLUGIN_DIR,
3852
3852
   "Directory for plugins.",
3853
 
   (uchar**) &opt_plugin_dir_ptr, (uchar**) &opt_plugin_dir_ptr, 0,
 
3853
   (char**) &opt_plugin_dir_ptr, (char**) &opt_plugin_dir_ptr, 0,
3854
3854
   GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
3855
3855
  {"plugin_load", OPT_PLUGIN_LOAD,
3856
3856
   "Optional colon separated list of plugins to load, where each plugin is "
3857
3857
   "identified by name and path to library seperated by an equals.",
3858
 
   (uchar**) &opt_plugin_load, (uchar**) &opt_plugin_load, 0,
 
3858
   (char**) &opt_plugin_load, (char**) &opt_plugin_load, 0,
3859
3859
   GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
3860
3860
  {"preload_buffer_size", OPT_PRELOAD_BUFFER_SIZE,
3861
3861
   "The size of the buffer that is allocated when preloading indexes",
3862
 
   (uchar**) &global_system_variables.preload_buff_size,
3863
 
   (uchar**) &max_system_variables.preload_buff_size, 0, GET_ULONG,
 
3862
   (char**) &global_system_variables.preload_buff_size,
 
3863
   (char**) &max_system_variables.preload_buff_size, 0, GET_ULONG,
3864
3864
   REQUIRED_ARG, 32*1024L, 1024, 1024*1024*1024L, 0, 1, 0},
3865
3865
  {"query_alloc_block_size", OPT_QUERY_ALLOC_BLOCK_SIZE,
3866
3866
   "Allocation block size for query parsing and execution",
3867
 
   (uchar**) &global_system_variables.query_alloc_block_size,
3868
 
   (uchar**) &max_system_variables.query_alloc_block_size, 0, GET_ULONG,
 
3867
   (char**) &global_system_variables.query_alloc_block_size,
 
3868
   (char**) &max_system_variables.query_alloc_block_size, 0, GET_ULONG,
3869
3869
   REQUIRED_ARG, QUERY_ALLOC_BLOCK_SIZE, 1024, ULONG_MAX, 0, 1024, 0},
3870
3870
  {"query_prealloc_size", OPT_QUERY_PREALLOC_SIZE,
3871
3871
   "Persistent buffer for query parsing and execution",
3872
 
   (uchar**) &global_system_variables.query_prealloc_size,
3873
 
   (uchar**) &max_system_variables.query_prealloc_size, 0, GET_ULONG,
 
3872
   (char**) &global_system_variables.query_prealloc_size,
 
3873
   (char**) &max_system_variables.query_prealloc_size, 0, GET_ULONG,
3874
3874
   REQUIRED_ARG, QUERY_ALLOC_PREALLOC_SIZE, QUERY_ALLOC_PREALLOC_SIZE,
3875
3875
   ULONG_MAX, 0, 1024, 0},
3876
3876
  {"range_alloc_block_size", OPT_RANGE_ALLOC_BLOCK_SIZE,
3877
3877
   "Allocation block size for storing ranges during optimization",
3878
 
   (uchar**) &global_system_variables.range_alloc_block_size,
3879
 
   (uchar**) &max_system_variables.range_alloc_block_size, 0, GET_ULONG,
 
3878
   (char**) &global_system_variables.range_alloc_block_size,
 
3879
   (char**) &max_system_variables.range_alloc_block_size, 0, GET_ULONG,
3880
3880
   REQUIRED_ARG, RANGE_ALLOC_BLOCK_SIZE, RANGE_ALLOC_BLOCK_SIZE, ULONG_MAX,
3881
3881
   0, 1024, 0},
3882
3882
  {"read_buffer_size", OPT_RECORD_BUFFER,
3883
3883
   "Each thread that does a sequential scan allocates a buffer of this size for each table it scans. If you do many sequential scans, you may want to increase this value.",
3884
 
   (uchar**) &global_system_variables.read_buff_size,
3885
 
   (uchar**) &max_system_variables.read_buff_size,0, GET_ULONG, REQUIRED_ARG,
 
3884
   (char**) &global_system_variables.read_buff_size,
 
3885
   (char**) &max_system_variables.read_buff_size,0, GET_ULONG, REQUIRED_ARG,
3886
3886
   128*1024L, IO_SIZE*2+MALLOC_OVERHEAD, INT_MAX32, MALLOC_OVERHEAD, IO_SIZE,
3887
3887
   0},
3888
3888
  {"read_only", OPT_READONLY,
3889
3889
   "Make all non-temporary tables read-only, with the exception for replication (slave) threads and users with the SUPER privilege",
3890
 
   (uchar**) &opt_readonly,
3891
 
   (uchar**) &opt_readonly,
 
3890
   (char**) &opt_readonly,
 
3891
   (char**) &opt_readonly,
3892
3892
   0, GET_BOOL, NO_ARG, 0, 0, 1, 0, 1, 0},
3893
3893
  {"read_rnd_buffer_size", OPT_RECORD_RND_BUFFER,
3894
3894
   "When reading rows in sorted order after a sort, the rows are read through this buffer to avoid a disk seeks. If not set, then it's set to the value of record_buffer.",
3895
 
   (uchar**) &global_system_variables.read_rnd_buff_size,
3896
 
   (uchar**) &max_system_variables.read_rnd_buff_size, 0,
 
3895
   (char**) &global_system_variables.read_rnd_buff_size,
 
3896
   (char**) &max_system_variables.read_rnd_buff_size, 0,
3897
3897
   GET_ULONG, REQUIRED_ARG, 256*1024L, 64 /*IO_SIZE*2+MALLOC_OVERHEAD*/ ,
3898
3898
   INT_MAX32, MALLOC_OVERHEAD, 1 /* Small lower limit to be able to test MRR */, 0},
3899
3899
  {"record_buffer", OPT_RECORD_BUFFER,
3900
3900
   "Alias for read_buffer_size",
3901
 
   (uchar**) &global_system_variables.read_buff_size,
3902
 
   (uchar**) &max_system_variables.read_buff_size,0, GET_ULONG, REQUIRED_ARG,
 
3901
   (char**) &global_system_variables.read_buff_size,
 
3902
   (char**) &max_system_variables.read_buff_size,0, GET_ULONG, REQUIRED_ARG,
3903
3903
   128*1024L, IO_SIZE*2+MALLOC_OVERHEAD, INT_MAX32, MALLOC_OVERHEAD, IO_SIZE, 0},
3904
3904
  {"relay_log_purge", OPT_RELAY_LOG_PURGE,
3905
3905
   "0 = do not purge relay logs. 1 = purge them as soon as they are no more needed.",
3906
 
   (uchar**) &relay_log_purge,
3907
 
   (uchar**) &relay_log_purge, 0, GET_BOOL, NO_ARG,
 
3906
   (char**) &relay_log_purge,
 
3907
   (char**) &relay_log_purge, 0, GET_BOOL, NO_ARG,
3908
3908
   1, 0, 1, 0, 1, 0},
3909
3909
  {"relay_log_space_limit", OPT_RELAY_LOG_SPACE_LIMIT,
3910
3910
   "Maximum space to use for all relay logs.",
3911
 
   (uchar**) &relay_log_space_limit,
3912
 
   (uchar**) &relay_log_space_limit, 0, GET_ULL, REQUIRED_ARG, 0L, 0L,
 
3911
   (char**) &relay_log_space_limit,
 
3912
   (char**) &relay_log_space_limit, 0, GET_ULL, REQUIRED_ARG, 0L, 0L,
3913
3913
   (longlong) ULONG_MAX, 0, 1, 0},
3914
3914
  {"slave_compressed_protocol", OPT_SLAVE_COMPRESSED_PROTOCOL,
3915
3915
   "Use compression on master/slave protocol.",
3916
 
   (uchar**) &opt_slave_compressed_protocol,
3917
 
   (uchar**) &opt_slave_compressed_protocol,
 
3916
   (char**) &opt_slave_compressed_protocol,
 
3917
   (char**) &opt_slave_compressed_protocol,
3918
3918
   0, GET_BOOL, NO_ARG, 0, 0, 1, 0, 1, 0},
3919
3919
  {"slave_net_timeout", OPT_SLAVE_NET_TIMEOUT,
3920
3920
   "Number of seconds to wait for more data from a master/slave connection before aborting the read.",
3921
 
   (uchar**) &slave_net_timeout, (uchar**) &slave_net_timeout, 0,
 
3921
   (char**) &slave_net_timeout, (char**) &slave_net_timeout, 0,
3922
3922
   GET_ULONG, REQUIRED_ARG, SLAVE_NET_TIMEOUT, 1, LONG_TIMEOUT, 0, 1, 0},
3923
3923
  {"slave_transaction_retries", OPT_SLAVE_TRANS_RETRIES,
3924
3924
   "Number of times the slave SQL thread will retry a transaction in case "
3925
3925
   "it failed with a deadlock or elapsed lock wait timeout, "
3926
3926
   "before giving up and stopping.",
3927
 
   (uchar**) &slave_trans_retries, (uchar**) &slave_trans_retries, 0,
 
3927
   (char**) &slave_trans_retries, (char**) &slave_trans_retries, 0,
3928
3928
   GET_ULONG, REQUIRED_ARG, 10L, 0L, (longlong) ULONG_MAX, 0, 1, 0},
3929
3929
  {"slave-allow-batching", OPT_SLAVE_ALLOW_BATCHING,
3930
3930
   "Allow slave to batch requests.",
3931
 
   (uchar**) &slave_allow_batching, (uchar**) &slave_allow_batching,
 
3931
   (char**) &slave_allow_batching, (char**) &slave_allow_batching,
3932
3932
   0, GET_BOOL, NO_ARG, 0, 0, 1, 0, 1, 0},
3933
3933
  {"slow_launch_time", OPT_SLOW_LAUNCH_TIME,
3934
3934
   "If creating the thread takes longer than this value (in seconds), the Slow_launch_threads counter will be incremented.",
3935
 
   (uchar**) &slow_launch_time, (uchar**) &slow_launch_time, 0, GET_ULONG,
 
3935
   (char**) &slow_launch_time, (char**) &slow_launch_time, 0, GET_ULONG,
3936
3936
   REQUIRED_ARG, 2L, 0L, LONG_TIMEOUT, 0, 1, 0},
3937
3937
  {"sort_buffer_size", OPT_SORT_BUFFER,
3938
3938
   "Each thread that needs to do a sort allocates a buffer of this size.",
3939
 
   (uchar**) &global_system_variables.sortbuff_size,
3940
 
   (uchar**) &max_system_variables.sortbuff_size, 0, GET_ULONG, REQUIRED_ARG,
 
3939
   (char**) &global_system_variables.sortbuff_size,
 
3940
   (char**) &max_system_variables.sortbuff_size, 0, GET_ULONG, REQUIRED_ARG,
3941
3941
   MAX_SORT_MEMORY, MIN_SORT_MEMORY+MALLOC_OVERHEAD*2, ULONG_MAX,
3942
3942
   MALLOC_OVERHEAD, 1, 0},
3943
3943
  {"sync-binlog", OPT_SYNC_BINLOG,
3944
3944
   "Synchronously flush binary log to disk after every #th event. "
3945
3945
   "Use 0 (default) to disable synchronous flushing.",
3946
 
   (uchar**) &sync_binlog_period, (uchar**) &sync_binlog_period, 0, GET_ULONG,
 
3946
   (char**) &sync_binlog_period, (char**) &sync_binlog_period, 0, GET_ULONG,
3947
3947
   REQUIRED_ARG, 0, 0, ULONG_MAX, 0, 1, 0},
3948
3948
  {"sync-frm", OPT_SYNC_FRM, "Sync .frm to disk on create. Enabled by default.",
3949
 
   (uchar**) &opt_sync_frm, (uchar**) &opt_sync_frm, 0, GET_BOOL, NO_ARG, 1, 0,
 
3949
   (char**) &opt_sync_frm, (char**) &opt_sync_frm, 0, GET_BOOL, NO_ARG, 1, 0,
3950
3950
   0, 0, 0, 0},
3951
3951
  {"table_cache", OPT_TABLE_OPEN_CACHE,
3952
3952
   "Deprecated; use --table_open_cache instead.",
3953
 
   (uchar**) &table_cache_size, (uchar**) &table_cache_size, 0, GET_ULONG,
 
3953
   (char**) &table_cache_size, (char**) &table_cache_size, 0, GET_ULONG,
3954
3954
   REQUIRED_ARG, TABLE_OPEN_CACHE_DEFAULT, 1, 512*1024L, 0, 1, 0},
3955
3955
  {"table_definition_cache", OPT_TABLE_DEF_CACHE,
3956
3956
   "The number of cached table definitions.",
3957
 
   (uchar**) &table_def_size, (uchar**) &table_def_size,
 
3957
   (char**) &table_def_size, (char**) &table_def_size,
3958
3958
   0, GET_ULONG, REQUIRED_ARG, 128, 1, 512*1024L, 0, 1, 0},
3959
3959
  {"table_open_cache", OPT_TABLE_OPEN_CACHE,
3960
3960
   "The number of cached open tables.",
3961
 
   (uchar**) &table_cache_size, (uchar**) &table_cache_size, 0, GET_ULONG,
 
3961
   (char**) &table_cache_size, (char**) &table_cache_size, 0, GET_ULONG,
3962
3962
   REQUIRED_ARG, TABLE_OPEN_CACHE_DEFAULT, 1, 512*1024L, 0, 1, 0},
3963
3963
  {"table_lock_wait_timeout", OPT_TABLE_LOCK_WAIT_TIMEOUT,
3964
3964
   "Timeout in seconds to wait for a table level lock before returning an "
3965
3965
   "error. Used only if the connection has active cursors.",
3966
 
   (uchar**) &table_lock_wait_timeout, (uchar**) &table_lock_wait_timeout,
 
3966
   (char**) &table_lock_wait_timeout, (char**) &table_lock_wait_timeout,
3967
3967
   0, GET_ULONG, REQUIRED_ARG, 50, 1, 1024 * 1024 * 1024, 0, 1, 0},
3968
3968
  {"thread_cache_size", OPT_THREAD_CACHE_SIZE,
3969
3969
   "How many threads we should keep in a cache for reuse.",
3970
 
   (uchar**) &thread_cache_size, (uchar**) &thread_cache_size, 0, GET_ULONG,
 
3970
   (char**) &thread_cache_size, (char**) &thread_cache_size, 0, GET_ULONG,
3971
3971
   REQUIRED_ARG, 0, 0, 16384, 0, 1, 0},
3972
3972
  {"thread_pool_size", OPT_THREAD_CACHE_SIZE,
3973
3973
   "How many threads we should create to handle query requests in case of 'thread_handling=pool-of-threads'",
3974
 
   (uchar**) &thread_pool_size, (uchar**) &thread_pool_size, 0, GET_ULONG,
 
3974
   (char**) &thread_pool_size, (char**) &thread_pool_size, 0, GET_ULONG,
3975
3975
   REQUIRED_ARG, 20, 1, 16384, 0, 1, 0},
3976
3976
  {"thread_stack", OPT_THREAD_STACK,
3977
 
   "The stack size for each thread.", (uchar**) &my_thread_stack_size,
3978
 
   (uchar**) &my_thread_stack_size, 0, GET_ULONG, REQUIRED_ARG,DEFAULT_THREAD_STACK,
 
3977
   "The stack size for each thread.", (char**) &my_thread_stack_size,
 
3978
   (char**) &my_thread_stack_size, 0, GET_ULONG, REQUIRED_ARG,DEFAULT_THREAD_STACK,
3979
3979
   1024L*128L, ULONG_MAX, 0, 1024, 0},
3980
3980
  { "time_format", OPT_TIME_FORMAT,
3981
3981
    "The TIME format (for future).",
3982
 
    (uchar**) &opt_date_time_formats[MYSQL_TIMESTAMP_TIME],
3983
 
    (uchar**) &opt_date_time_formats[MYSQL_TIMESTAMP_TIME],
 
3982
    (char**) &opt_date_time_formats[MYSQL_TIMESTAMP_TIME],
 
3983
    (char**) &opt_date_time_formats[MYSQL_TIMESTAMP_TIME],
3984
3984
    0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
3985
3985
  {"tmp_table_size", OPT_TMP_TABLE_SIZE,
3986
3986
   "If an internal in-memory temporary table exceeds this size, MySQL will"
3987
3987
   " automatically convert it to an on-disk MyISAM table.",
3988
 
   (uchar**) &global_system_variables.tmp_table_size,
3989
 
   (uchar**) &max_system_variables.tmp_table_size, 0, GET_ULL,
 
3988
   (char**) &global_system_variables.tmp_table_size,
 
3989
   (char**) &max_system_variables.tmp_table_size, 0, GET_ULL,
3990
3990
   REQUIRED_ARG, 16*1024*1024L, 1024, MAX_MEM_TABLE_SIZE, 0, 1, 0},
3991
3991
  {"transaction_alloc_block_size", OPT_TRANS_ALLOC_BLOCK_SIZE,
3992
3992
   "Allocation block size for transactions to be stored in binary log",
3993
 
   (uchar**) &global_system_variables.trans_alloc_block_size,
3994
 
   (uchar**) &max_system_variables.trans_alloc_block_size, 0, GET_ULONG,
 
3993
   (char**) &global_system_variables.trans_alloc_block_size,
 
3994
   (char**) &max_system_variables.trans_alloc_block_size, 0, GET_ULONG,
3995
3995
   REQUIRED_ARG, QUERY_ALLOC_BLOCK_SIZE, 1024, ULONG_MAX, 0, 1024, 0},
3996
3996
  {"transaction_prealloc_size", OPT_TRANS_PREALLOC_SIZE,
3997
3997
   "Persistent buffer for transactions to be stored in binary log",
3998
 
   (uchar**) &global_system_variables.trans_prealloc_size,
3999
 
   (uchar**) &max_system_variables.trans_prealloc_size, 0, GET_ULONG,
 
3998
   (char**) &global_system_variables.trans_prealloc_size,
 
3999
   (char**) &max_system_variables.trans_prealloc_size, 0, GET_ULONG,
4000
4000
   REQUIRED_ARG, TRANS_ALLOC_PREALLOC_SIZE, 1024, ULONG_MAX, 0, 1024, 0},
4001
4001
  {"wait_timeout", OPT_WAIT_TIMEOUT,
4002
4002
   "The number of seconds the server waits for activity on a connection before closing it.",
4003
 
   (uchar**) &global_system_variables.net_wait_timeout,
4004
 
   (uchar**) &max_system_variables.net_wait_timeout, 0, GET_ULONG,
 
4003
   (char**) &global_system_variables.net_wait_timeout,
 
4004
   (char**) &max_system_variables.net_wait_timeout, 0, GET_ULONG,
4005
4005
   REQUIRED_ARG, NET_WAIT_TIMEOUT, 1, IF_WIN(INT_MAX32/1000, LONG_TIMEOUT),
4006
4006
   0, 1, 0},
4007
4007
  {0, 0, 0, 0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0}
4783
4783
 
4784
4784
/** Handle arguments for multiple key caches. */
4785
4785
 
4786
 
extern "C" uchar **mysql_getopt_value(const char *keyname, uint key_length,
 
4786
extern "C" char **mysql_getopt_value(const char *keyname, uint key_length,
4787
4787
                                      const struct my_option *option);
4788
4788
 
4789
 
uchar* *
 
4789
char**
4790
4790
mysql_getopt_value(const char *keyname, uint key_length,
4791
4791
                   const struct my_option *option)
4792
4792
{
4801
4801
      exit(1);
4802
4802
    switch (option->id) {
4803
4803
    case OPT_KEY_BUFFER_SIZE:
4804
 
      return (uchar**) &key_cache->param_buff_size;
 
4804
      return (char**) &key_cache->param_buff_size;
4805
4805
    case OPT_KEY_CACHE_BLOCK_SIZE:
4806
 
      return (uchar**) &key_cache->param_block_size;
 
4806
      return (char**) &key_cache->param_block_size;
4807
4807
    case OPT_KEY_CACHE_DIVISION_LIMIT:
4808
 
      return (uchar**) &key_cache->param_division_limit;
 
4808
      return (char**) &key_cache->param_division_limit;
4809
4809
    case OPT_KEY_CACHE_AGE_THRESHOLD:
4810
 
      return (uchar**) &key_cache->param_age_threshold;
 
4810
      return (char**) &key_cache->param_age_threshold;
4811
4811
    }
4812
4812
  }
4813
4813
  }
4814
 
  return option->value;
 
4814
  return (char **)option->value;
4815
4815
}
4816
4816
 
4817
4817