Hi!

>>>>> "Sasha" == Sasha Pachev <[EMAIL PROTECTED]> writes:

Sasha> On Wednesday 29 August 2001 15:14, Martin MOKREJ? wrote:
>> >Description:
>> I have on Linux running 3.23.41 the following problem:
>> 
>> $ /usr/local/mysql/bin/myisampack -v -v -f --tmpdir=/tmp 
Sasha> /data/mysql/Aactinomycetemcomitans/blimps.MYI
>> Compressing /data/mysql/Aactinomycetemcomitans/blimps.MYD: (1443 records)
>> - Calculating statistics
>> 
>> normal:      7  empty-space:       0  empty-zero:         0  empty-fill:   7
>> pre-space:   0  end-space:         3  intervall-fields:   0  zero:         1
>> Original trees:  16  After join: 9
>> - Compressing file
>> Segmentation fault (core dumped)

<cut>

Thanks Martin for the test case;  It enabled me to quickly find the
bug.

Here is a patch for this (This will be in 3.23.42)

===== myisam/myisampack.c 1.9 vs edited =====
*** /tmp/myisampack.c-1.9-8558  Wed Aug 22 01:45:03 2001
--- edited/myisam/myisampack.c  Thu Aug 30 14:09:40 2001
***************
*** 251,257 ****
  
  static void print_version(void)
  {
!   printf("%s  Ver 1.9 for %s on %s\n",my_progname,SYSTEM_TYPE,MACHINE_TYPE);
  }
  
  static void usage(void)
--- 251,257 ----
  
  static void print_version(void)
  {
!   printf("%s  Ver 1.10 for %s on %s\n",my_progname,SYSTEM_TYPE,MACHINE_TYPE);
  }
  
  static void usage(void)
***************
*** 1670,1676 ****
        max_calc_length+=huff_counts[i].tree->height;
      else if (huff_counts[i].field_type == FIELD_BLOB ||
             huff_counts[i].field_type == FIELD_VARCHAR)
!       max_calc_length=huff_counts[i].tree->height*huff_counts[i].max_length + 
huff_counts[i].length_bits +1;
      else
        max_calc_length+=
        (huff_counts[i].field_length - huff_counts[i].max_zero_fill)*
--- 1670,1676 ----
        max_calc_length+=huff_counts[i].tree->height;
      else if (huff_counts[i].field_type == FIELD_BLOB ||
             huff_counts[i].field_type == FIELD_VARCHAR)
!       max_calc_length+=huff_counts[i].tree->height*huff_counts[i].max_length + 
huff_counts[i].length_bits +1;
      else
        max_calc_length+=
        (huff_counts[i].field_length - huff_counts[i].max_zero_fill)*

Regards,
Monty

---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to