summaryrefslogtreecommitdiff
path: root/storage/myisam/myisamchk.c
diff options
context:
space:
mode:
authorDavi Arnaut <Davi.Arnaut@Sun.COM>2010-06-10 22:30:49 -0300
committerDavi Arnaut <Davi.Arnaut@Sun.COM>2010-06-10 22:30:49 -0300
commitdb2fe44c844e969405095220287ea98a57f33284 (patch)
tree7aee99151209c7e83d2cf2ec0b242e6827f8c55f /storage/myisam/myisamchk.c
parent90343dd788471cbc384f7f11b7d48fc474ece4c5 (diff)
parent0f9ddfa9d8bb8d071266bcc63e92813cf18ccd2b (diff)
downloadmariadb-git-db2fe44c844e969405095220287ea98a57f33284.tar.gz
Merge of mysql-5.1-bugteam into mysql-trunk-merge.
Diffstat (limited to 'storage/myisam/myisamchk.c')
-rw-r--r--storage/myisam/myisamchk.c66
1 files changed, 33 insertions, 33 deletions
diff --git a/storage/myisam/myisamchk.c b/storage/myisam/myisamchk.c
index 612dd6f3ce1..11ec52fd123 100644
--- a/storage/myisam/myisamchk.c
+++ b/storage/myisam/myisamchk.c
@@ -168,7 +168,7 @@ static struct my_option my_long_options[] =
0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0},
{"character-sets-dir", OPT_CHARSETS_DIR,
"Directory where character sets are.",
- (uchar**) &charsets_dir, 0, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
+ &charsets_dir, 0, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
{"check", 'c',
"Check table for errors.",
0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0},
@@ -188,8 +188,8 @@ static struct my_option my_long_options[] =
0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0},
{"data-file-length", 'D',
"Max length of data file (when recreating data-file when it's full).",
- (uchar**) &check_param.max_data_file_length,
- (uchar**) &check_param.max_data_file_length,
+ &check_param.max_data_file_length,
+ &check_param.max_data_file_length,
0, GET_LL, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
{"extend-check", 'e',
"If used when checking a table, ensure that the table is 100 percent consistent, which will take a long time. If used when repairing a table, try to recover every possible row from the data file. Normally this will also find a lot of garbage rows; Don't use this option with repair if you are not totally desperate.",
@@ -211,13 +211,13 @@ static struct my_option my_long_options[] =
0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0},
{"keys-used", 'k',
"Tell MyISAM to update only some specific keys. # is a bit mask of which keys to use. This can be used to get faster inserts.",
- (uchar**) &check_param.keys_in_use,
- (uchar**) &check_param.keys_in_use,
+ &check_param.keys_in_use,
+ &check_param.keys_in_use,
0, GET_ULL, REQUIRED_ARG, -1, 0, 0, 0, 0, 0},
{"max-record-length", OPT_MAX_RECORD_LENGTH,
"Skip rows bigger than this if myisamchk can't allocate memory to hold it",
- (uchar**) &check_param.max_record_length,
- (uchar**) &check_param.max_record_length,
+ &check_param.max_record_length,
+ &check_param.max_record_length,
0, GET_ULL, REQUIRED_ARG, LONGLONG_MAX, 0, LONGLONG_MAX, 0, 0, 0},
{"medium-check", 'm',
"Faster than extend-check, but only finds 99.99% of all errors. Should be good enough for most cases.",
@@ -246,12 +246,12 @@ static struct my_option my_long_options[] =
#endif
{"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.",
- (uchar**) &check_param.auto_increment_value,
- (uchar**) &check_param.auto_increment_value,
+ &check_param.auto_increment_value,
+ &check_param.auto_increment_value,
0, GET_ULL, OPT_ARG, 0, 0, 0, 0, 0, 0},
{"set-collation", OPT_SET_COLLATION,
"Change the collation used by the index",
- (uchar**) &set_collation_name, 0, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
+ &set_collation_name, 0, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
{"silent", 's',
"Only print errors. One can use two -s to make myisamchk very silent.",
0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0},
@@ -260,12 +260,12 @@ static struct my_option my_long_options[] =
0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0},
{"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!)",
- (uchar**) &check_param.opt_sort_key,
- (uchar**) &check_param.opt_sort_key,
+ &check_param.opt_sort_key,
+ &check_param.opt_sort_key,
0, GET_UINT, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
{"tmpdir", 't',
"Path for temporary files.",
- (uchar**) &opt_tmpdir,
+ &opt_tmpdir,
0, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
{"update-state", 'U',
"Mark tables as crashed if any errors were found.",
@@ -283,54 +283,54 @@ static struct my_option my_long_options[] =
"Wait if table is locked.",
0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0},
{ "key_buffer_size", OPT_KEY_BUFFER_SIZE, "",
- (uchar**) &check_param.use_buffers, (uchar**) &check_param.use_buffers, 0,
+ &check_param.use_buffers, &check_param.use_buffers, 0,
GET_ULL, REQUIRED_ARG, USE_BUFFER_INIT, MALLOC_OVERHEAD,
SIZE_T_MAX, MALLOC_OVERHEAD, IO_SIZE, 0},
{ "key_cache_block_size", OPT_KEY_CACHE_BLOCK_SIZE, "",
- (uchar**) &opt_key_cache_block_size,
- (uchar**) &opt_key_cache_block_size, 0,
+ &opt_key_cache_block_size,
+ &opt_key_cache_block_size, 0,
GET_LONG, REQUIRED_ARG, MI_KEY_BLOCK_LENGTH, MI_MIN_KEY_BLOCK_LENGTH,
MI_MAX_KEY_BLOCK_LENGTH, 0, MI_MIN_KEY_BLOCK_LENGTH, 0},
{ "myisam_block_size", OPT_MYISAM_BLOCK_SIZE, "",
- (uchar**) &opt_myisam_block_size, (uchar**) &opt_myisam_block_size, 0,
+ &opt_myisam_block_size, &opt_myisam_block_size, 0,
GET_LONG, REQUIRED_ARG, MI_KEY_BLOCK_LENGTH, MI_MIN_KEY_BLOCK_LENGTH,
MI_MAX_KEY_BLOCK_LENGTH, 0, MI_MIN_KEY_BLOCK_LENGTH, 0},
{ "read_buffer_size", OPT_READ_BUFFER_SIZE, "",
- (uchar**) &check_param.read_buffer_length,
- (uchar**) &check_param.read_buffer_length, 0, GET_ULONG, REQUIRED_ARG,
+ &check_param.read_buffer_length,
+ &check_param.read_buffer_length, 0, GET_ULONG, REQUIRED_ARG,
(long) READ_BUFFER_INIT, (long) MALLOC_OVERHEAD,
INT_MAX32, (long) MALLOC_OVERHEAD, (long) 1L, 0},
{ "write_buffer_size", OPT_WRITE_BUFFER_SIZE, "",
- (uchar**) &check_param.write_buffer_length,
- (uchar**) &check_param.write_buffer_length, 0, GET_ULONG, REQUIRED_ARG,
+ &check_param.write_buffer_length,
+ &check_param.write_buffer_length, 0, GET_ULONG, REQUIRED_ARG,
(long) READ_BUFFER_INIT, (long) MALLOC_OVERHEAD,
INT_MAX32, (long) MALLOC_OVERHEAD, (long) 1L, 0},
{ "sort_buffer_size", OPT_SORT_BUFFER_SIZE, "",
- (uchar**) &check_param.sort_buffer_length,
- (uchar**) &check_param.sort_buffer_length, 0, GET_ULONG, REQUIRED_ARG,
+ &check_param.sort_buffer_length,
+ &check_param.sort_buffer_length, 0, GET_ULONG, REQUIRED_ARG,
(long) SORT_BUFFER_INIT, (long) (MIN_SORT_BUFFER + MALLOC_OVERHEAD),
ULONG_MAX, (long) MALLOC_OVERHEAD, (long) 1L, 0},
{ "sort_key_blocks", OPT_SORT_KEY_BLOCKS, "",
- (uchar**) &check_param.sort_key_blocks,
- (uchar**) &check_param.sort_key_blocks, 0, GET_ULONG, REQUIRED_ARG,
+ &check_param.sort_key_blocks,
+ &check_param.sort_key_blocks, 0, GET_ULONG, REQUIRED_ARG,
BUFFERS_WHEN_SORTING, 4L, 100L, 0L, 1L, 0},
- { "decode_bits", OPT_DECODE_BITS, "", (uchar**) &decode_bits,
- (uchar**) &decode_bits, 0, GET_UINT, REQUIRED_ARG, 9L, 4L, 17L, 0L, 1L, 0},
- { "ft_min_word_len", OPT_FT_MIN_WORD_LEN, "", (uchar**) &ft_min_word_len,
- (uchar**) &ft_min_word_len, 0, GET_ULONG, REQUIRED_ARG, 4, 1, HA_FT_MAXCHARLEN,
+ { "decode_bits", OPT_DECODE_BITS, "", &decode_bits,
+ &decode_bits, 0, GET_UINT, REQUIRED_ARG, 9L, 4L, 17L, 0L, 1L, 0},
+ { "ft_min_word_len", OPT_FT_MIN_WORD_LEN, "", &ft_min_word_len,
+ &ft_min_word_len, 0, GET_ULONG, REQUIRED_ARG, 4, 1, HA_FT_MAXCHARLEN,
0, 1, 0},
- { "ft_max_word_len", OPT_FT_MAX_WORD_LEN, "", (uchar**) &ft_max_word_len,
- (uchar**) &ft_max_word_len, 0, GET_ULONG, REQUIRED_ARG, HA_FT_MAXCHARLEN, 10,
+ { "ft_max_word_len", OPT_FT_MAX_WORD_LEN, "", &ft_max_word_len,
+ &ft_max_word_len, 0, GET_ULONG, REQUIRED_ARG, HA_FT_MAXCHARLEN, 10,
HA_FT_MAXCHARLEN, 0, 1, 0},
{ "ft_stopword_file", OPT_FT_STOPWORD_FILE,
"Use stopwords from this file instead of built-in list.",
- (uchar**) &ft_stopword_file, (uchar**) &ft_stopword_file, 0, GET_STR,
+ &ft_stopword_file, &ft_stopword_file, 0, GET_STR,
REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
{"stats_method", OPT_STATS_METHOD,
"Specifies how index statistics collection code should treat NULLs. "
"Possible values of name are \"nulls_unequal\" (default behavior for 4.1/5.0), "
"\"nulls_equal\" (emulate 4.0 behavior), and \"nulls_ignored\".",
- (uchar**) &myisam_stats_method_str, (uchar**) &myisam_stats_method_str, 0,
+ &myisam_stats_method_str, &myisam_stats_method_str, 0,
GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
{ 0, 0, 0, 0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0}
};