mirror of
https://github.com/MariaDB/server.git
synced 2025-01-16 03:52:35 +01:00
Bug#43940 64-bit windows myisamchk doesn't support key_buffer_size > 4G
The fix is to allow myisamchk to use >4G key_buffer_size on win64 include/myisam.h: use ulonglong instead of ulong for use_buffers storage/myisam/myisamchk.c: use ulonglong instead of ulong for use_buffers
This commit is contained in:
parent
d7d3c56aee
commit
d31b6e4784
2 changed files with 7 additions and 6 deletions
|
@ -404,7 +404,8 @@ typedef struct st_mi_check_param
|
||||||
my_off_t keydata,totaldata,key_blocks,start_check_pos;
|
my_off_t keydata,totaldata,key_blocks,start_check_pos;
|
||||||
ha_rows total_records,total_deleted;
|
ha_rows total_records,total_deleted;
|
||||||
ha_checksum record_checksum,glob_crc;
|
ha_checksum record_checksum,glob_crc;
|
||||||
ulong use_buffers,read_buffer_length,write_buffer_length,
|
ulonglong use_buffers;
|
||||||
|
ulong read_buffer_length,write_buffer_length,
|
||||||
sort_buffer_length,sort_key_blocks;
|
sort_buffer_length,sort_key_blocks;
|
||||||
uint out_flag,warning_printed,error_printed,verbose;
|
uint out_flag,warning_printed,error_printed,verbose;
|
||||||
uint opt_sort_key,total_files,max_level;
|
uint opt_sort_key,total_files,max_level;
|
||||||
|
|
|
@ -287,8 +287,8 @@ static struct my_option my_long_options[] =
|
||||||
0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0},
|
0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0},
|
||||||
{ "key_buffer_size", OPT_KEY_BUFFER_SIZE, "",
|
{ "key_buffer_size", OPT_KEY_BUFFER_SIZE, "",
|
||||||
(uchar**) &check_param.use_buffers, (uchar**) &check_param.use_buffers, 0,
|
(uchar**) &check_param.use_buffers, (uchar**) &check_param.use_buffers, 0,
|
||||||
GET_ULONG, REQUIRED_ARG, (long) USE_BUFFER_INIT, (long) MALLOC_OVERHEAD,
|
GET_ULL, REQUIRED_ARG, USE_BUFFER_INIT, MALLOC_OVERHEAD,
|
||||||
(long) ~0L, (long) MALLOC_OVERHEAD, (long) IO_SIZE, 0},
|
SIZE_T_MAX, MALLOC_OVERHEAD, IO_SIZE, 0},
|
||||||
{ "key_cache_block_size", OPT_KEY_CACHE_BLOCK_SIZE, "",
|
{ "key_cache_block_size", OPT_KEY_CACHE_BLOCK_SIZE, "",
|
||||||
(uchar**) &opt_key_cache_block_size,
|
(uchar**) &opt_key_cache_block_size,
|
||||||
(uchar**) &opt_key_cache_block_size, 0,
|
(uchar**) &opt_key_cache_block_size, 0,
|
||||||
|
@ -1102,7 +1102,7 @@ static int myisamchk(MI_CHECK *param, char * filename)
|
||||||
{
|
{
|
||||||
if (param->testflag & (T_EXTEND | T_MEDIUM))
|
if (param->testflag & (T_EXTEND | T_MEDIUM))
|
||||||
VOID(init_key_cache(dflt_key_cache,opt_key_cache_block_size,
|
VOID(init_key_cache(dflt_key_cache,opt_key_cache_block_size,
|
||||||
param->use_buffers, 0, 0));
|
(size_t) param->use_buffers, 0, 0));
|
||||||
VOID(init_io_cache(¶m->read_cache,datafile,
|
VOID(init_io_cache(¶m->read_cache,datafile,
|
||||||
(uint) param->read_buffer_length,
|
(uint) param->read_buffer_length,
|
||||||
READ_CACHE,
|
READ_CACHE,
|
||||||
|
@ -1525,8 +1525,8 @@ static int mi_sort_records(MI_CHECK *param,
|
||||||
if (share->state.key_root[sort_key] == HA_OFFSET_ERROR)
|
if (share->state.key_root[sort_key] == HA_OFFSET_ERROR)
|
||||||
DBUG_RETURN(0); /* Nothing to do */
|
DBUG_RETURN(0); /* Nothing to do */
|
||||||
|
|
||||||
init_key_cache(dflt_key_cache, opt_key_cache_block_size, param->use_buffers,
|
init_key_cache(dflt_key_cache, opt_key_cache_block_size,
|
||||||
0, 0);
|
(size_t) param->use_buffers, 0, 0);
|
||||||
if (init_io_cache(&info->rec_cache,-1,(uint) param->write_buffer_length,
|
if (init_io_cache(&info->rec_cache,-1,(uint) param->write_buffer_length,
|
||||||
WRITE_CACHE,share->pack.header_length,1,
|
WRITE_CACHE,share->pack.header_length,1,
|
||||||
MYF(MY_WME | MY_WAIT_IF_FULL)))
|
MYF(MY_WME | MY_WAIT_IF_FULL)))
|
||||||
|
|
Loading…
Reference in a new issue