List:General Discussion« Previous MessageNext Message »
From:Michael Widenius Date:September 29 1999 6:21pm
Subject:myisamchk --sort-records= generates segmentation fault
View as plain text  
>>>>> "Peter-Ulrich" == Peter-Ulrich  <Peter-Ulrich@stripped>
> writes:

>> Description:
Peter-Ulrich> when running myisamchk with flag --sort-records=idxnr then the
Peter-Ulrich> Programm ends with segmentation fault
	
>> How-To-Repeat:
Peter-Ulrich> run myisamchk with flag --sort-records=idxnr
	
>> Fix:
Peter-Ulrich> there is no problem with myisamchk ver 1.0 comming with MySql
Peter-Ulrich> 3.23.1-alpha
	
Fix:

*** /my/monty/master/mysql-3.23.4-alpha/myisam/myisamchk.c	Sun Sep 26 15:20:05 1999
--- myisam/myisamchk.c	Wed Sep 29 21:18:16 1999
***************
*** 313,319 ****
  
  static void print_version(void)
  {
!   printf("%s  Ver 1.4 for %s at %s\n",my_progname,SYSTEM_TYPE,
  	 MACHINE_TYPE);
  }
  
--- 313,319 ----
  
  static void print_version(void)
  {
!   printf("%s  Ver 1.5 for %s at %s\n",my_progname,SYSTEM_TYPE,
  	 MACHINE_TYPE);
  }
  
***************
*** 2276,2284 ****
    char llbuff[22],llbuff2[22];
    DBUG_ENTER("sort_records");
  
    keyinfo= &share->keyinfo[sort_key];
    got_error=1;
!   temp_buff=0; sort_info.record=0;
    new_file= -1;
  
    if (!(((ulonglong) 1 << sort_key) & share->state.key_map))
--- 2276,2285 ----
    char llbuff[22],llbuff2[22];
    DBUG_ENTER("sort_records");
  
+   bzero((char*) &sort_info,sizeof(sort_info));
    keyinfo= &share->keyinfo[sort_key];
    got_error=1;
!   temp_buff=0; 
    new_file= -1;
  
    if (!(((ulonglong) 1 << sort_key) & share->state.key_map))
***************
*** 2343,2349 ****
    }
  
    /* Setup param for sort_write_record */
-   bzero((char*) &sort_info,sizeof(sort_info));
    sort_info.info=info;
    sort_info.new_data_file_type=share->data_file_type;
    sort_info.fix_datafile=1;
--- 2344,2349 ----

Regards,
Monty
Thread
myisamchk --sort-records= generates segmentation faultPeter-Ulrich28 Sep
  • myisamchk --sort-records= generates segmentation faultMichael Widenius29 Sep