MySQL Lists are EOL. Please join:

List:Commits« Previous MessageNext Message »
From:Sergey Glukhov Date:May 27 2009 8:11am
Subject:bzr commit into mysql-5.1-bugteam branch (Sergey.Glukhov:2912)
Bug#43940
View as plain text  
#At file:///home/gluh/MySQL/mysql-5.1-bugteam/ based on revid:bjorn.munch@stripped

 2912 Sergey Glukhov	2009-05-27
      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

    modified:
      include/myisam.h
      storage/myisam/myisamchk.c
=== modified file 'include/myisam.h'
--- a/include/myisam.h	2009-01-26 06:35:15 +0000
+++ b/include/myisam.h	2009-05-27 08:11:28 +0000
@@ -404,7 +404,8 @@ typedef struct st_mi_check_param
   my_off_t keydata,totaldata,key_blocks,start_check_pos;
   ha_rows total_records,total_deleted;
   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;
   uint out_flag,warning_printed,error_printed,verbose;
   uint opt_sort_key,total_files,max_level;

=== modified file 'storage/myisam/myisamchk.c'
--- a/storage/myisam/myisamchk.c	2009-04-09 08:06:47 +0000
+++ b/storage/myisam/myisamchk.c	2009-05-27 08:11:28 +0000
@@ -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},
   { "key_buffer_size", OPT_KEY_BUFFER_SIZE, "",
     (uchar**) &check_param.use_buffers, (uchar**) &check_param.use_buffers, 0,
-    GET_ULONG, REQUIRED_ARG, (long) USE_BUFFER_INIT, (long) MALLOC_OVERHEAD,
-    (long) ~0L, (long) MALLOC_OVERHEAD, (long) IO_SIZE, 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,
@@ -1102,7 +1102,7 @@ static int myisamchk(MI_CHECK *param, ch
       {
 	if (param->testflag & (T_EXTEND | T_MEDIUM))
 	  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(&param->read_cache,datafile,
 			   (uint) param->read_buffer_length,
 			   READ_CACHE,
@@ -1525,8 +1525,8 @@ static int mi_sort_records(MI_CHECK *par
   if (share->state.key_root[sort_key] == HA_OFFSET_ERROR)
     DBUG_RETURN(0);				/* Nothing to do */
 
-  init_key_cache(dflt_key_cache, opt_key_cache_block_size, param->use_buffers,
-                 0, 0);
+  init_key_cache(dflt_key_cache, opt_key_cache_block_size,
+                 (size_t) param->use_buffers, 0, 0);
   if (init_io_cache(&info->rec_cache,-1,(uint) param->write_buffer_length,
 		   WRITE_CACHE,share->pack.header_length,1,
 		   MYF(MY_WME | MY_WAIT_IF_FULL)))


Attachment: [text/bzr-bundle] bzr/sergey.glukhov@sun.com-20090527081128-okv2205vr4nkdes8.bundle
Thread
bzr commit into mysql-5.1-bugteam branch (Sergey.Glukhov:2912)Bug#43940Sergey Glukhov27 May