On Thu, 30 Aug 2001, Michael Widenius wrote:

Hi,
  yes this patch *fixes* all of my problems, except one table which is/was
probably too big? I haven't found any options that would make myisamchk to
ask for less memory.

/usr/local/mysql/bin/myisamchk: Out of memory (Needed 4294922813 bytes)
/usr/local/mysql/bin/myisamchk: error: 12 when opening MyISAM-table 
'/data/mysql/Celegans/rep.MYI'
/usr/local/mysql/bin/myisamchk: Out of memory (Needed 4294922813 bytes)
/usr/local/mysql/bin/myisamchk: error: 12 when opening MyISAM-table 
'/data/mysql/Celegans/rep.MYI'

-rwxrwx---    1 mysql    mysql    21108759 Aug 28 20:31 /data/mysql/Celegans/rep.MYD
-rwxrwx---    1 mysql    mysql        1024 Aug 29 21:55 /data/mysql/Celegans/rep.MYI
-rwxrwx---    1 mysql    mysql        9247 Aug 28 20:30 /data/mysql/Celegans/rep.frm

 Well, the other rep tables are fine. I'm a bit angry about myself,
because I dropped the Celegans.rep tables:!!!


mysql> drop table rep;
Query OK, 0 rows affected (0.05 sec)


and dumped them again via network from master site, so I got:

-rw-rw----    1 mysql    mysql    44130688 Aug 30 21:39 /data/mysql/Celegans/rep.MYD
-rw-rw----    1 mysql    mysql     2411520 Aug 30 21:39 /data/mysql/Celegans/rep.MYI
-rw-rw----    1 mysql    mysql        9247 Aug 30 21:38 /data/mysql/Celegans/rep.frm


I managed successfully to run "myisamchk -rq" on it, myisampack and again
"myisamchk -rq". So now I can only tell you that broken datafile can cause
myisamchk to ask for too much memory. :(

  This is on master site:
-rw-rw----    1 pedant   users    44130688 Jul 11 13:41 /home/mysql/Celegans/rep.MYD
-rw-rw----    1 pedant   users     1645568 Jul 11 13:41 /home/mysql/Celegans/rep.MYI
-rw-rw----    1 pedant   users        9247 Jul 11 13:40 /home/mysql/Celegans/rep.frm

mysql> select count(id) from rep;
+-----------+
| count(id) |
+-----------+
|     19223 |
+-----------+
1 row in set (0.02 sec)

mysql> 


  and this is on backup site after compression and rebuilding index:
-rw-rw----    1 mysql    mysql    21108573 Aug 30 21:41 /data/mysql/Celegans/rep.MYD
-rw-rw----    1 mysql    mysql     1644544 Aug 30 21:41 /data/mysql/Celegans/rep.MYI
-rw-rw----    1 mysql    mysql        9247 Aug 30 21:38 /data/mysql/Celegans/rep.frm

  and also 19223 lines.

  So unfortunately, I don't have the "broken" table anymore, only the
screen dumps (size od .MYD and .MYI differed). It seems the
"broken" datafile had 6 bytes more, "broken" index was much smaller.
That's all I can tell you. ;)
Maybe it helps.

> 
> 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
> 

-- 
Martin Mokrejs - PGP5.0i key is at http://www.natur.cuni.cz/~mmokrejs
MIPS / Institute for Bioinformatics <http://mips.gsf.de>
GSF - National Research Center for Environment and Health
Ingolstaedter Landstrasse 1, D-85764 Neuherberg, Germany


---------------------------------------------------------------------
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