Commit 9d8ee74b authored by Sergei Golubchik's avatar Sergei Golubchik

MDEV-4186 Test case main.myisampack fails on ppc32 (only)

fix the declaration to use the correct type for st_handler_check_param::sort_buffer_length.
remove redundant casts.
parent 8f1b1ab5
......@@ -138,9 +138,9 @@ typedef struct st_handler_check_param
/* Following is used to check if rows are visible */
ulonglong max_trid, max_found_trid;
ulonglong not_visible_rows_found;
ulonglong sort_buffer_length;
ulonglong use_buffers; /* Used as param to getopt() */
size_t read_buffer_length, write_buffer_length;
size_t sort_buffer_length, sort_key_blocks;
size_t read_buffer_length, write_buffer_length, sort_key_blocks;
time_t backup_time; /* To sign backup files */
ulong rec_per_key_part[HA_MAX_KEY_SEG * HA_MAX_POSSIBLE_KEY];
double new_rec_per_key_part[HA_MAX_KEY_SEG * HA_MAX_POSSIBLE_KEY];
......
......@@ -77,7 +77,7 @@ static MYSQL_THDVAR_ULONG(repair_threads, PLUGIN_VAR_RQCMDARG,
static MYSQL_THDVAR_ULONGLONG(sort_buffer_size, PLUGIN_VAR_RQCMDARG,
"The buffer that is allocated when sorting the index when doing "
"a REPAIR or when creating indexes with CREATE INDEX or ALTER TABLE", NULL, NULL,
8192 * 1024, (long) (MIN_SORT_BUFFER + MALLOC_OVERHEAD), SIZE_T_MAX, 1);
8192 * 1024, MIN_SORT_BUFFER + MALLOC_OVERHEAD, SIZE_T_MAX, 1);
static MYSQL_SYSVAR_BOOL(use_mmap, opt_myisam_use_mmap, PLUGIN_VAR_NOCMDARG,
"Use memory mapping for reading and writing MyISAM tables", NULL, NULL, FALSE);
......
......@@ -284,25 +284,25 @@ static struct my_option my_long_options[] =
{ "read_buffer_size", OPT_READ_BUFFER_SIZE, "",
&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},
READ_BUFFER_INIT, MALLOC_OVERHEAD,
INT_MAX32, MALLOC_OVERHEAD, 1L, 0},
{ "write_buffer_size", OPT_WRITE_BUFFER_SIZE, "",
&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},
READ_BUFFER_INIT, MALLOC_OVERHEAD,
INT_MAX32, MALLOC_OVERHEAD, 1L, 0},
{ "sort_buffer_size", OPT_SORT_BUFFER_SIZE,
"Deprecated. myisam_sort_buffer_size alias is being used",
&check_param.sort_buffer_length,
&check_param.sort_buffer_length, 0, GET_ULL, REQUIRED_ARG,
(long) SORT_BUFFER_INIT, (long) (MIN_SORT_BUFFER + MALLOC_OVERHEAD),
SIZE_T_MAX, (long) MALLOC_OVERHEAD, (long) 1L, 0},
SORT_BUFFER_INIT, MIN_SORT_BUFFER + MALLOC_OVERHEAD,
SIZE_T_MAX, MALLOC_OVERHEAD, 1L, 0},
{ "myisam_sort_buffer_size", OPT_SORT_BUFFER_SIZE,
"Alias of sort_buffer_size parameter",
&check_param.sort_buffer_length,
&check_param.sort_buffer_length, 0, GET_ULL, REQUIRED_ARG,
(long) SORT_BUFFER_INIT, (long) (MIN_SORT_BUFFER + MALLOC_OVERHEAD),
SIZE_T_MAX, (long) MALLOC_OVERHEAD, (long) 1L, 0},
SORT_BUFFER_INIT, MIN_SORT_BUFFER + MALLOC_OVERHEAD,
SIZE_T_MAX, MALLOC_OVERHEAD, 1L, 0},
{ "sort_key_blocks", OPT_SORT_KEY_BLOCKS, "",
&check_param.sort_key_blocks,
&check_param.sort_key_blocks, 0, GET_ULONG, REQUIRED_ARG,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment