~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to storage/myisam/myisamchk.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:
154
154
  {"analyze", 'a',
155
155
   "Analyze distribution of keys. Will make some joins in MySQL faster. You can check the calculated distribution.",
156
156
   0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0},
157
 
  {"block-search", 'b',
158
 
   "No help available.",
159
 
   0, 0, 0, GET_ULONG, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
160
157
  {"backup", 'B',
161
158
   "Make a backup of the .MYD file as 'filename-time.BAK'.",
162
159
   0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0},
273
270
   0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0},
274
271
  { "key_buffer_size", OPT_KEY_BUFFER_SIZE, "",
275
272
    (char**) &check_param.use_buffers, (char**) &check_param.use_buffers, 0,
276
 
    GET_ULONG, REQUIRED_ARG, (long) USE_BUFFER_INIT, (long) MALLOC_OVERHEAD,
 
273
    GET_UINT64, REQUIRED_ARG, (long) USE_BUFFER_INIT, (long) MALLOC_OVERHEAD,
277
274
    INT32_MAX, (long) MALLOC_OVERHEAD, (long) IO_SIZE, 0},
278
275
  { "key_cache_block_size", OPT_KEY_CACHE_BLOCK_SIZE,  "",
279
276
    (char**) &opt_key_cache_block_size,
286
283
    MI_MAX_KEY_BLOCK_LENGTH, 0, MI_MIN_KEY_BLOCK_LENGTH, 0},
287
284
  { "read_buffer_size", OPT_READ_BUFFER_SIZE, "",
288
285
    (char**) &check_param.read_buffer_length,
289
 
    (char**) &check_param.read_buffer_length, 0, GET_ULONG, REQUIRED_ARG,
 
286
    (char**) &check_param.read_buffer_length, 0, GET_SIZE, REQUIRED_ARG,
290
287
    (long) READ_BUFFER_INIT, (long) MALLOC_OVERHEAD,
291
288
    SIZE_MAX, (long) MALLOC_OVERHEAD, (long) 1L, 0},
292
289
  { "write_buffer_size", OPT_WRITE_BUFFER_SIZE, "",
293
290
    (char**) &check_param.write_buffer_length,
294
 
    (char**) &check_param.write_buffer_length, 0, GET_ULONG, REQUIRED_ARG,
 
291
    (char**) &check_param.write_buffer_length, 0, GET_SIZE, REQUIRED_ARG,
295
292
    (long) READ_BUFFER_INIT, (long) MALLOC_OVERHEAD,
296
293
    SIZE_MAX, (long) MALLOC_OVERHEAD, (long) 1L, 0},
297
294
  { "sort_buffer_size", OPT_SORT_BUFFER_SIZE, "",
298
295
    (char**) &check_param.sort_buffer_length,
299
 
    (char**) &check_param.sort_buffer_length, 0, GET_ULONG, REQUIRED_ARG,
 
296
    (char**) &check_param.sort_buffer_length, 0, GET_SIZE, REQUIRED_ARG,
300
297
    (long) SORT_BUFFER_INIT, (long) (MIN_SORT_BUFFER + MALLOC_OVERHEAD),
301
298
    SIZE_MAX, (long) MALLOC_OVERHEAD, (long) 1L, 0},
302
299
  { "sort_key_blocks", OPT_SORT_KEY_BLOCKS, "",
303
300
    (char**) &check_param.sort_key_blocks,
304
 
    (char**) &check_param.sort_key_blocks, 0, GET_ULONG, REQUIRED_ARG,
 
301
    (char**) &check_param.sort_key_blocks, 0, GET_SIZE, REQUIRED_ARG,
305
302
    BUFFERS_WHEN_SORTING, 4L, 100L, 0L, 1L, 0},
306
303
  { "decode_bits", OPT_DECODE_BITS, "", (char**) &decode_bits,
307
304
    (char**) &decode_bits, 0, GET_UINT, REQUIRED_ARG, 9L, 4L, 17L, 0L, 1L, 0},
427
424
  -R, --sort-records=#\n\
428
425
                      Sort records according to an index.  This makes your\n\
429
426
                      data much more localized and may speed up things\n\
430
 
                      (It may be VERY slow to do a sort the first time!).\n\
431
 
  -b,  --block-search=#\n\
432
 
                       Find a record, a block at given offset belongs to.");
 
427
                      (It may be VERY slow to do a sort the first time!).\n");
433
428
 
434
429
  print_defaults("drizzle", load_default_groups);
435
430
  my_print_variables(my_long_options);