myisamchk crash
am 18.03.2003 12:27:40 von mmokrejsHi,
I found a broken myisam compressed table on one of our linux server.
Mysql reported error 145 - broken table. I tried to fix the table as
follows:
How-To-Repeat:
/data/mysql/Caenorhabditis_elegans_WS75$ mysql --version
mysql Ver 12.18 Distrib 4.0.11, for pc-linux (i686)
/data/mysql/Caenorhabditis_elegans_WS75$ myisamchk --version
myisamchk Ver 2.6 for pc-linux at i686
/data/mysql/Caenorhabditis_elegans_WS75$ cp contig_data.MYD /tmp
/data/mysql/Caenorhabditis_elegans_WS75$ mysql Caenorhabditis_elegans_WS75
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 362565 to server version: 4.0.11-log
Type 'help;' or '\h' for help. Type '\c' to clear the buffer.
mysql> truncate table contig_data;
Query OK, 0 rows affected (0.05 sec)
mysql> flush tables;
Query OK, 0 rows affected (15.23 sec)
mysql> quit
Bye
/data/mysql/Caenorhabditis_elegans_WS75$ myisampack contig_data
Compressing contig_data.MYD: (0 records)
- Calculating statistics
- Compressing file
Empty file saved in compressed format
Remember to run myisamchk -rq on compressed tables
/data/mysql/Caenorhabditis_elegans_WS75$ cp /tmp/contig_data.MYD .
/data/mysql/Caenorhabditis_elegans_WS75$ myisamchk -r contig_data
- recovering (with keycache) MyISAM-table 'contig_data'
Data records: 0
Segmentation fault
/data/mysql/Caenorhabditis_elegans_WS75$ hash
hits command
1 /usr/local/mysql/bin/myisampack
1 /usr/local/mysql/bin/myisamchk
2 /bin/cp
1 /usr/local/mysql/bin/mysql
/data/mysql/Caenorhabditis_elegans_WS75$ gdb /usr/local/mysql/bin/myisamchk ./core
GNU gdb 5.3-debian
Copyright 2002 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB. Type "show warranty" for details.
This GDB was configured as "i386-linux"...(no debugging symbols found)...
warning: Cannot initialize thread debugging library: unknown thread_db error '22'
Core was generated by `myisamchk -r contig_data'.
Program terminated with signal 11, Segmentation fault.
#0 0x08054528 in decode_bytes ()
(gdb) where
#0 0x08054528 in decode_bytes ()
#1 0x080553e7 in uf_blob ()
#2 0x08054e07 in _mi_pack_rec_unpack ()
#3 0x08060681 in sort_get_next_record ()
#4 0x0805c871 in mi_repair ()
#5 0x0804938f in myisamchk ()
#6 0x08048247 in main ()
#7 0x08086da5 in __libc_start_main ()
(gdb) quit
/data/mysql/Caenorhabditis_elegans_WS75$ ls -la contig_data.*
-rw-rw---- 1 mysql mysql 27303889 Mar 18 12:08 contig_data.MYD
-rw-rw---- 1 mysql mysql 1024 Mar 18 12:10 contig_data.MYI
-rw-r--r-- 1 mysql mysql 12017664 Mar 18 12:11 contig_data.TMD
-rw-rw---- 1 mysql mysql 8744 Jan 25 07:27 contig_data.frm
/data/mysql/Caenorhabditis_elegans_WS75$
Please find contig_data.tar.bz2 at support.mysql.com.
35495085 bytes sent in 183 seconds (189.0 kbyte/s)
--
Martin Mokrejs
PGP5.0i key is at http://www.natur.cuni.cz/~mmokrejs
MIPS / Institute for Bioinformatics
GSF - National Research Center for Environment and Health
Ingolstaedter Landstrasse 1, D-85764 Neuherberg, Germany
tel.: +49-89-3187 3683 , fax: +49-89-3187 3585
------------------------------------------------------------ ---------
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 bugs-thread13985@lists.mysql.com
To unsubscribe, e-mail