diff options
author | unknown <jani@dsl-jkl1657.dial.inet.fi> | 2002-05-11 14:36:34 +0300 |
---|---|---|
committer | unknown <jani@dsl-jkl1657.dial.inet.fi> | 2002-05-11 14:36:34 +0300 |
commit | 3dd3414739a8d668b7d611af1f456e3fd33f7a59 (patch) | |
tree | 8f8fd16d50627a5416d739d24130c15cfb52ff8f /myisam | |
parent | 3a98842da531ba70195ab000ba0cb6bba88ba57a (diff) | |
download | mariadb-git-3dd3414739a8d668b7d611af1f456e3fd33f7a59.tar.gz |
- Fixed some option types in my_getopt struct in all clients.
- Added special option/variable prefix '--loose-' to my_getopt.c
client/mysql.cc:
Fixed some variable types.
client/mysqladmin.c:
Fixed some variable types.
client/mysqlcheck.c:
Fixed some variable types.
client/mysqldump.c:
Fixed some variable types.
client/mysqlimport.c:
Fixed some variable types.
client/mysqlshow.c:
Fixed some variable types.
myisam/myisamchk.c:
Fixed some variable types.
mysys/my_getopt.c:
Fixed a bug in noticing whether argument was allowed to option (variable).
Added support for prefix --loose-option-name
This will work with options and variables, but not with --set-variable (!)
--set-variable is depricated and --variable-name=value should be used
instead. When used, my_getopt will not return error if option/variable
was not found, but print a warning, do a no-op and continue.
BitKeeper/etc/logging_ok:
Logging to logging@openlogging.org accepted
Diffstat (limited to 'myisam')
-rw-r--r-- | myisam/myisamchk.c | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/myisam/myisamchk.c b/myisam/myisamchk.c index 6b117427b2d..254efa2a7ed 100644 --- a/myisam/myisamchk.c +++ b/myisam/myisamchk.c @@ -155,7 +155,7 @@ static struct my_option my_long_options[] = {"analyze", 'a', "Analyze distribution of keys. Will make some joins in MySQL faster. You can check the calculated distribution.", 0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0}, - {"block-search", 'b', "No help available.", 0, 0, 0, GET_LONG, REQUIRED_ARG, + {"block-search", 'b', "No help available.", 0, 0, 0, GET_ULONG, REQUIRED_ARG, 0, 0, 0, 0, 0, 0}, {"backup", 'B', "Make a backup of the .MYD file as 'filename-time.BAK'", 0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0}, @@ -211,10 +211,10 @@ static struct my_option my_long_options[] = "Uses old recovery method; Slower than '-r' but can handle a couple of cases where '-r' reports that it can't fix the data file.", 0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0}, {"start-check-pos", OPT_START_CHECK_POS, "No help available.", 0, 0, 0, - GET_LONG, REQUIRED_ARG, 0, 0, 0, 0, 0, 0}, + GET_ULL, REQUIRED_ARG, 0, 0, 0, 0, 0, 0}, {"set-auto-increment", 'A', "Force auto_increment to start at this or higher value. If no value is given, then sets the next auto_increment value to the highest used value for the auto key + 1.", (gptr*) &check_param.auto_increment_value, - (gptr*) &check_param.auto_increment_value, 0, GET_LL, OPT_ARG, 0, 0, 0, + (gptr*) &check_param.auto_increment_value, 0, GET_ULL, OPT_ARG, 0, 0, 0, 0, 0, 0}, {"set-character-set", OPT_SET_CHARSET, "Change the character set used by the index", 0, 0, 0, GET_STR, @@ -231,7 +231,7 @@ static struct my_option my_long_options[] = {"sort-records", 'R', "Sort records according to an index. This makes your data much more localized and may speed up things. (It may be VERY slow to do a sort the first time!)", (gptr*) &check_param.opt_sort_key, (gptr*) &check_param.opt_sort_key, 0, - GET_LONG, REQUIRED_ARG, 0, 0, 0, 0, 0, 0}, + GET_UINT, REQUIRED_ARG, 0, 0, 0, 0, 0, 0}, {"sort-recover", 'n', "Force recovering with sorting even if the temporary file was very big.", 0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0}, @@ -250,7 +250,7 @@ static struct my_option my_long_options[] = 0, 0, 0, 0}, { "key_buffer_size", OPT_KEY_BUFFER_SIZE, "", (gptr*) &check_param.use_buffers, (gptr*) &check_param.use_buffers, 0, - GET_LL, REQUIRED_ARG, (long) USE_BUFFER_INIT, (long) MALLOC_OVERHEAD, + GET_ULONG, REQUIRED_ARG, (long) USE_BUFFER_INIT, (long) MALLOC_OVERHEAD, (long) ~0L, (long) MALLOC_OVERHEAD, (long) IO_SIZE, 0}, { "myisam_block_size", OPT_MYISAM_BLOCK_SIZE, "", (gptr*) &opt_myisam_block_size, (gptr*) &opt_myisam_block_size, 0, @@ -258,41 +258,41 @@ static struct my_option my_long_options[] = MI_MAX_KEY_BLOCK_LENGTH, 0, MI_MIN_KEY_BLOCK_LENGTH, 0}, { "read_buffer_size", OPT_READ_BUFFER_SIZE, "", (gptr*) &check_param.read_buffer_length, - (gptr*) &check_param.read_buffer_length, 0, GET_LL, REQUIRED_ARG, + (gptr*) &check_param.read_buffer_length, 0, GET_ULONG, REQUIRED_ARG, (long) READ_BUFFER_INIT, (long) MALLOC_OVERHEAD, (long) ~0L, (long) MALLOC_OVERHEAD, (long) 1L, 0}, { "write_buffer_size", OPT_WRITE_BUFFER_SIZE, "", (gptr*) &check_param.write_buffer_length, - (gptr*) &check_param.write_buffer_length, 0, GET_LL, REQUIRED_ARG, + (gptr*) &check_param.write_buffer_length, 0, GET_ULONG, REQUIRED_ARG, (long) READ_BUFFER_INIT, (long) MALLOC_OVERHEAD, (long) ~0L, (long) MALLOC_OVERHEAD, (long) 1L, 0}, { "sort_buffer_size", OPT_SORT_BUFFER_SIZE, "", (gptr*) &check_param.sort_buffer_length, - (gptr*) &check_param.sort_buffer_length, 0, GET_LL, REQUIRED_ARG, + (gptr*) &check_param.sort_buffer_length, 0, GET_ULONG, REQUIRED_ARG, (long) SORT_BUFFER_INIT, (long) (MIN_SORT_BUFFER + MALLOC_OVERHEAD), (long) ~0L, (long) MALLOC_OVERHEAD, (long) 1L, 0}, { "sort_key_blocks", OPT_SORT_KEY_BLOCKS, "", (gptr*) &check_param.sort_key_blocks, - (gptr*) &check_param.sort_key_blocks, 0, GET_LL, REQUIRED_ARG, + (gptr*) &check_param.sort_key_blocks, 0, GET_ULONG, REQUIRED_ARG, BUFFERS_WHEN_SORTING, 4L, 100L, 0L, 1L, 0}, { "decode_bits", OPT_DECODE_BITS, "", (gptr*) &decode_bits, - (gptr*) &decode_bits, 0, GET_LONG, REQUIRED_ARG, 9L, 4L, 17L, 0L, 1L, 0}, + (gptr*) &decode_bits, 0, GET_UINT, REQUIRED_ARG, 9L, 4L, 17L, 0L, 1L, 0}, { "ft_min_word_len", OPT_FT_MIN_WORD_LEN, "", (gptr*) &ft_min_word_len, - (gptr*) &ft_min_word_len, 0, GET_LONG, REQUIRED_ARG, 4, 1, HA_FT_MAXLEN, + (gptr*) &ft_min_word_len, 0, GET_ULONG, REQUIRED_ARG, 4, 1, HA_FT_MAXLEN, 0, 1, 0}, { "ft_max_word_len", OPT_FT_MAX_WORD_LEN, "", (gptr*) &ft_max_word_len, - (gptr*) &ft_max_word_len, 0, GET_LONG, REQUIRED_ARG, HA_FT_MAXLEN, 10, + (gptr*) &ft_max_word_len, 0, GET_ULONG, REQUIRED_ARG, HA_FT_MAXLEN, 10, HA_FT_MAXLEN, 0, 1, 0}, { "ft_max_word_len_for_sort", OPT_FT_MAX_WORD_LEN_FOR_SORT, "", (gptr*) &ft_max_word_len_for_sort, (gptr*) &ft_max_word_len_for_sort, 0, - GET_LONG, REQUIRED_ARG, 20, 4, HA_FT_MAXLEN, 0, 1, 0}, + GET_ULONG, REQUIRED_ARG, 20, 4, HA_FT_MAXLEN, 0, 1, 0}, { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0} }; static void print_version(void) { - printf("%s Ver 2.3 for %s at %s\n", my_progname, SYSTEM_TYPE, + printf("%s Ver 2.4 for %s at %s\n", my_progname, SYSTEM_TYPE, MACHINE_TYPE); } |