Shane Wegner wrote:
>
> Hi,
>
> I have recently moved from MySQL 3.22 to 3.23 and am having
> corruption problems. I understand this is beta software so
> this may or may not be a bug. The output from myisamchk is
> as follows.
>
> continuum:/var/lib/mysql/udmsearch# myisamchk url
> Checking MyISAM file: url
> Data records: 81365 Deleted blocks: 1
> - check file-size
> myisamchk: error: Size of datafile is: 40675792
> Should be: 40992284
> - check key delete-chain
> - check record delete-chain
> myisamchk: error: record delete-link-chain corrupted
> - check index reference
> - check data record references index: 1
> myisamchk: error: Found key at page 659456 that points to
> record outside datafile
> - check record links
> myisamchk: error: Record-count is not ok; is 80783
> Should be: 81365
> myisamchk: warning: Found 0 deleted blocks
> Should be: 1
> myisamchk: warning: Found 80783 parts
> Should be: 81950 parts
> MyISAM-table 'url' is corrupted
> Fix it using switch "-r" or "-o"
> continuum:/var/lib/mysql/udmsearch#
>
> This is a web search engine indexing just over 70,000 urls.
> I can generally get it to corrupt after 24 or so hours of
> hard inserting. The ndict tables will corrupt as well.
> Basically what happens during the insert is:
>
> select * from url where next_index_time <= %ld limit 32;
> Run through result set.
>
> delete from dict where url_id = %d
>
> insert into dict (url_id, crc) values(%d, 'crc of word');
> That insert happens as many times as there are words in the
> document.
> Move to next url
> update url set next_index_time=%d where url_id in ...
>
> repeat until first select comes out empty.
>
> So, there are quite a few inserts and deletes. No MySQL
> locking is used with the exception of a lock on url in the
> first select so search threads can and will select on those
> tables.
>
> I've tried this both with skip-locking and enable-locking.
> With both, the tables corrupt. This is Linux 2.2.17, glibc
> 2.1.3 single processor.
>
> If I can do anyone else to provide developers with
> debugging information, please let me know.
Do the following to create a test case:
- clean out your database
- turn on update logging
- create the tables
- run the indexer so that it will corrupt the tables
- make sure the tables are actually corrupt
- ftp your update log to ftp://support.mysql.com/pub/mysql/secret/ along with
the explanation which tables are corrupt
--
Sasha Pachev
+------------------------------------------------------------------+
| ____ __ _____ _____ ___ http://www.mysql.com |
| /*/\*\/\*\ /*/ \*\ /*/ \*\ |*| Sasha Pachev |
| /*/ /*/ /*/ \*\_ |*| |*||*| sasha@stripped |
| /*/ /*/ /*/\*\/*/ \*\|*| |*||*| Provo, Utah, USA |
| /*/ /*/ /*/\*\_/*/ \*\_/*/ |*|____ |
| ^^^^^^^^^^^^/*/^^^^^^^^^^^\*\^^^^^^^^^^^ |
| /*/ \*\ Developers Team |
+------------------------------------------------------------------+