~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/drizzled.cc

  • Committer: Stewart Smith
  • Date: 2009-03-04 22:49:53 UTC
  • mto: (910.4.2 sparc) (908.3.6 work)
  • mto: This revision was merged to the branch mainline in revision 912.
  • Revision ID: stewart@flamingspork.com-20090304224953-b2ow237kc1bkp0o0
for getopt, replace GET_ULONG with GET_UINT32.

Don't replace for sql variables (yet). instead just indicated the intense source of fail with GET_ULONG_IS_FAIL.

Show diffs side-by-side

added added

removed removed

Lines of Context:
2253
2253
  {"log-warnings", 'W',
2254
2254
   N_("Log some not critical warnings to the log file."),
2255
2255
   (char**) &global_system_variables.log_warnings,
2256
 
   (char**) &max_system_variables.log_warnings, 0, GET_ULONG, OPT_ARG, 1, 0, 0,
 
2256
   (char**) &max_system_variables.log_warnings, 0, GET_BOOL, OPT_ARG, 1, 0, 0,
2257
2257
   0, 0, 0},
2258
2258
  {"memlock", OPT_MEMLOCK,
2259
2259
   N_("Lock drizzled in memory."),
2300
2300
  {"server-id", OPT_SERVER_ID,
2301
2301
   N_("Uniquely identifies the server instance in the community of "
2302
2302
      "replication partners."),
2303
 
   (char**) &server_id, (char**) &server_id, 0, GET_ULONG, REQUIRED_ARG, 0, 0, 0,
 
2303
   (char**) &server_id, (char**) &server_id, 0, GET_UINT32, REQUIRED_ARG, 0, 0, 0,
2304
2304
   0, 0, 0},
2305
2305
  {"skip-new", OPT_SKIP_NEW,
2306
2306
   N_("Don't use new, possible wrong routines."),
2369
2369
    N_("The number of seconds the drizzled server is waiting for a connect "
2370
2370
       "packet before responding with 'Bad handshake'."),
2371
2371
    (char**) &connect_timeout, (char**) &connect_timeout,
2372
 
    0, GET_ULONG, REQUIRED_ARG, CONNECT_TIMEOUT, 2, LONG_TIMEOUT, 0, 1, 0 },
 
2372
    0, GET_UINT32, REQUIRED_ARG, CONNECT_TIMEOUT, 2, LONG_TIMEOUT, 0, 1, 0 },
2373
2373
  { "div_precision_increment", OPT_DIV_PRECINCREMENT,
2374
2374
   N_("Precision of the result of '/' operator will be increased on that "
2375
2375
      "value."),
2379
2379
  { "group_concat_max_len", OPT_GROUP_CONCAT_MAX_LEN,
2380
2380
    N_("The maximum length of the result of function  group_concat."),
2381
2381
    (char**) &global_system_variables.group_concat_max_len,
2382
 
    (char**) &max_system_variables.group_concat_max_len, 0, GET_ULONG,
 
2382
    (char**) &max_system_variables.group_concat_max_len, 0, GET_UINT64,
2383
2383
    REQUIRED_ARG, 1024, 4, ULONG_MAX, 0, 1, 0},
2384
2384
  { "interactive_timeout", OPT_INTERACTIVE_TIMEOUT,
2385
2385
    N_("The number of seconds the server waits for activity on an interactive "
2386
2386
       "connection before closing it."),
2387
2387
   (char**) &global_system_variables.net_interactive_timeout,
2388
2388
   (char**) &max_system_variables.net_interactive_timeout, 0,
2389
 
   GET_ULONG, REQUIRED_ARG, NET_WAIT_TIMEOUT, 1, LONG_TIMEOUT, 0, 1, 0},
 
2389
   GET_UINT32, REQUIRED_ARG, NET_WAIT_TIMEOUT, 1, LONG_TIMEOUT, 0, 1, 0},
2390
2390
  { "join_buffer_size", OPT_JOIN_BUFF_SIZE,
2391
2391
    N_("The size of the buffer that is used for full joins."),
2392
2392
   (char**) &global_system_variables.join_buff_size,
2393
 
   (char**) &max_system_variables.join_buff_size, 0, GET_ULONG,
 
2393
   (char**) &max_system_variables.join_buff_size, 0, GET_UINT64,
2394
2394
   REQUIRED_ARG, 128*1024L, IO_SIZE*2+MALLOC_OVERHEAD, ULONG_MAX,
2395
2395
   MALLOC_OVERHEAD, IO_SIZE, 0},
2396
2396
  {"keep_files_on_create", OPT_KEEP_FILES_ON_CREATE,
2414
2414
      "total number of blocks in key cache"),
2415
2415
   (char**) &dflt_key_cache_var.param_age_threshold,
2416
2416
   (char**) 0,
2417
 
   0, (GET_ULONG | GET_ASK_ADDR), REQUIRED_ARG,
 
2417
   0, (GET_UINT32 | GET_ASK_ADDR), REQUIRED_ARG,
2418
2418
   300, 100, ULONG_MAX, 0, 100, 0},
2419
2419
  {"key_cache_block_size", OPT_KEY_CACHE_BLOCK_SIZE,
2420
2420
   N_("The default size of key cache blocks"),
2421
2421
   (char**) &dflt_key_cache_var.param_block_size,
2422
2422
   (char**) 0,
2423
 
   0, (GET_ULONG | GET_ASK_ADDR), REQUIRED_ARG,
 
2423
   0, (GET_UINT32 | GET_ASK_ADDR), REQUIRED_ARG,
2424
2424
   KEY_CACHE_BLOCK_SIZE, 512, 1024 * 16, 0, 512, 0},
2425
2425
  {"key_cache_division_limit", OPT_KEY_CACHE_DIVISION_LIMIT,
2426
2426
   N_("The minimum percentage of warm blocks in key cache"),
2427
2427
   (char**) &dflt_key_cache_var.param_division_limit,
2428
2428
   (char**) 0,
2429
 
   0, (GET_ULONG | GET_ASK_ADDR) , REQUIRED_ARG, 100,
 
2429
   0, (GET_UINT32 | GET_ASK_ADDR) , REQUIRED_ARG, 100,
2430
2430
   1, 100, 0, 1, 0},
2431
2431
  {"max_allowed_packet", OPT_MAX_ALLOWED_PACKET,
2432
2432
   N_("Max packetlength to send/receive from to server."),
2433
2433
   (char**) &global_system_variables.max_allowed_packet,
2434
 
   (char**) &max_system_variables.max_allowed_packet, 0, GET_ULONG,
 
2434
   (char**) &max_system_variables.max_allowed_packet, 0, GET_UINT32,
2435
2435
   REQUIRED_ARG, 1024*1024L, 1024, 1024L*1024L*1024L, MALLOC_OVERHEAD, 1024, 0},
2436
2436
  {"max_connect_errors", OPT_MAX_CONNECT_ERRORS,
2437
2437
   N_("If there is more than this number of interrupted connections from a "
2438
2438
      "host this host will be blocked from further connections."),
2439
 
   (char**) &max_connect_errors, (char**) &max_connect_errors, 0, GET_ULONG,
 
2439
   (char**) &max_connect_errors, (char**) &max_connect_errors, 0, GET_UINT64,
2440
2440
   REQUIRED_ARG, MAX_CONNECT_ERRORS, 1, ULONG_MAX, 0, 1, 0},
2441
2441
  {"max_error_count", OPT_MAX_ERROR_COUNT,
2442
2442
   N_("Max number of errors/warnings to store for a statement."),
2443
2443
   (char**) &global_system_variables.max_error_count,
2444
2444
   (char**) &max_system_variables.max_error_count,
2445
 
   0, GET_ULONG, REQUIRED_ARG, DEFAULT_ERROR_COUNT, 0, 65535, 0, 1, 0},
 
2445
   0, GET_UINT64, REQUIRED_ARG, DEFAULT_ERROR_COUNT, 0, 65535, 0, 1, 0},
2446
2446
  {"max_heap_table_size", OPT_MAX_HEP_TABLE_SIZE,
2447
2447
   N_("Don't allow creation of heap tables bigger than this."),
2448
2448
   (char**) &global_system_variables.max_heap_table_size,
2463
2463
  { "max_seeks_for_key", OPT_MAX_SEEKS_FOR_KEY,
2464
2464
    N_("Limit assumed max number of seeks when looking up rows based on a key"),
2465
2465
    (char**) &global_system_variables.max_seeks_for_key,
2466
 
    (char**) &max_system_variables.max_seeks_for_key, 0, GET_ULONG,
 
2466
    (char**) &max_system_variables.max_seeks_for_key, 0, GET_UINT64,
2467
2467
    REQUIRED_ARG, ULONG_MAX, 1, ULONG_MAX, 0, 1, 0 },
2468
2468
  {"max_sort_length", OPT_MAX_SORT_LENGTH,
2469
2469
   N_("The number of bytes to use when sorting BLOB or TEXT values "
2475
2475
  {"max_tmp_tables", OPT_MAX_TMP_TABLES,
2476
2476
   N_("Maximum number of temporary tables a client can keep open at a time."),
2477
2477
   (char**) &global_system_variables.max_tmp_tables,
2478
 
   (char**) &max_system_variables.max_tmp_tables, 0, GET_ULONG,
 
2478
   (char**) &max_system_variables.max_tmp_tables, 0, GET_UINT64,
2479
2479
   REQUIRED_ARG, 32, 1, ULONG_MAX, 0, 1, 0},
2480
2480
  {"max_write_lock_count", OPT_MAX_WRITE_LOCK_COUNT,
2481
2481
   N_("After this many write locks, allow some read locks to run in between."),
2497
2497
  {"net_buffer_length", OPT_NET_BUFFER_LENGTH,
2498
2498
   N_("Buffer length for TCP/IP and socket communication."),
2499
2499
   (char**) &global_system_variables.net_buffer_length,
2500
 
   (char**) &max_system_variables.net_buffer_length, 0, GET_ULONG,
 
2500
   (char**) &max_system_variables.net_buffer_length, 0, GET_UINT32,
2501
2501
   REQUIRED_ARG, 16384, 1024, 1024*1024L, 0, 1024, 0},
2502
2502
  {"net_read_timeout", OPT_NET_READ_TIMEOUT,
2503
2503
   N_("Number of seconds to wait for more data from a connection before "
2504
2504
      "aborting the read."),
2505
2505
   (char**) &global_system_variables.net_read_timeout,
2506
 
   (char**) &max_system_variables.net_read_timeout, 0, GET_ULONG,
 
2506
   (char**) &max_system_variables.net_read_timeout, 0, GET_UINT32,
2507
2507
   REQUIRED_ARG, NET_READ_TIMEOUT, 1, LONG_TIMEOUT, 0, 1, 0},
2508
2508
  {"net_retry_count", OPT_NET_RETRY_COUNT,
2509
2509
   N_("If a read on a communication port is interrupted, retry this many "
2510
2510
      "times before giving up."),
2511
2511
   (char**) &global_system_variables.net_retry_count,
2512
2512
   (char**) &max_system_variables.net_retry_count,0,
2513
 
   GET_ULONG, REQUIRED_ARG, MYSQLD_NET_RETRY_COUNT, 1, ULONG_MAX, 0, 1, 0},
 
2513
   GET_UINT32, REQUIRED_ARG, MYSQLD_NET_RETRY_COUNT, 1, ULONG_MAX, 0, 1, 0},
2514
2514
  {"net_write_timeout", OPT_NET_WRITE_TIMEOUT,
2515
2515
   N_("Number of seconds to wait for a block to be written to a connection "
2516
2516
      "before aborting the write."),
2517
2517
   (char**) &global_system_variables.net_write_timeout,
2518
 
   (char**) &max_system_variables.net_write_timeout, 0, GET_ULONG,
 
2518
   (char**) &max_system_variables.net_write_timeout, 0, GET_UINT32,
2519
2519
   REQUIRED_ARG, NET_WRITE_TIMEOUT, 1, LONG_TIMEOUT, 0, 1, 0},
2520
2520
  { "old", OPT_OLD_MODE,
2521
2521
    N_("Use compatible behavior."),
2571
2571
  {"range_alloc_block_size", OPT_RANGE_ALLOC_BLOCK_SIZE,
2572
2572
   N_("Allocation block size for storing ranges during optimization"),
2573
2573
   (char**) &global_system_variables.range_alloc_block_size,
2574
 
   (char**) &max_system_variables.range_alloc_block_size, 0, GET_ULONG,
 
2574
   (char**) &max_system_variables.range_alloc_block_size, 0, GET_SIZE,
2575
2575
   REQUIRED_ARG, RANGE_ALLOC_BLOCK_SIZE, RANGE_ALLOC_BLOCK_SIZE, SIZE_MAX,
2576
2576
   0, 1024, 0},
2577
2577
  {"read_buffer_size", OPT_RECORD_BUFFER,
2597
2597
  {"sort_buffer_size", OPT_SORT_BUFFER,
2598
2598
   N_("Each thread that needs to do a sort allocates a buffer of this size."),
2599
2599
   (char**) &global_system_variables.sortbuff_size,
2600
 
   (char**) &max_system_variables.sortbuff_size, 0, GET_ULONG, REQUIRED_ARG,
 
2600
   (char**) &max_system_variables.sortbuff_size, 0, GET_SIZE, REQUIRED_ARG,
2601
2601
   MAX_SORT_MEMORY, MIN_SORT_MEMORY+MALLOC_OVERHEAD*2, SIZE_MAX,
2602
2602
   MALLOC_OVERHEAD, 1, 0},
2603
2603
  {"table_definition_cache", OPT_TABLE_DEF_CACHE,
2606
2606
   0, GET_ULL, REQUIRED_ARG, 128, 1, 512*1024L, 0, 1, 0},
2607
2607
  {"table_open_cache", OPT_TABLE_OPEN_CACHE,
2608
2608
   N_("The number of cached open tables."),
2609
 
   (char**) &table_cache_size, (char**) &table_cache_size, 0, GET_ULONG,
 
2609
   (char**) &table_cache_size, (char**) &table_cache_size, 0, GET_UINT64,
2610
2610
   REQUIRED_ARG, TABLE_OPEN_CACHE_DEFAULT, 1, 512*1024L, 0, 1, 0},
2611
2611
  {"table_lock_wait_timeout", OPT_TABLE_LOCK_WAIT_TIMEOUT,
2612
2612
   N_("Timeout in seconds to wait for a table level lock before returning an "
2616
2616
  {"thread_stack", OPT_THREAD_STACK,
2617
2617
   N_("The stack size for each thread."),
2618
2618
   (char**) &my_thread_stack_size,
2619
 
   (char**) &my_thread_stack_size, 0, GET_ULONG,
 
2619
   (char**) &my_thread_stack_size, 0, GET_SIZE,
2620
2620
   REQUIRED_ARG,DEFAULT_THREAD_STACK,
2621
2621
   UINT32_C(1024*128), SIZE_MAX, 0, 1024, 0},
2622
2622
  {"tmp_table_size", OPT_TMP_TABLE_SIZE,