I am the admin of a Mysql 4.0.14-standard databas running on Solaris 9.
A developer and I created a shell script that does a mysqldump of the
database and then runs an optimize on the largest table we have. The
command line is as follows:

$EXECPATH/mysql  --host=172.65.12.10 --user=user --password=pass
--execute="optimize table MESSAGES" test

Here is the output we got this morning:

test.MESSAGES   optimize        error   13 when fixing table
test.MESSAGES   optimize        status  Operation failed

We ran this same script last night and it ran fine! Here is something
the developer sent me. it is a description of the problems he sees in
the database that seemed to be caused by the optimize:


> When I start mysql from command line and try to "use test" database, I
> get ... 
>         Reading table information for completion of table and column
>         names
>         You can turn off this feature to get a quicker startup with -A
>         
>         Didn't find any fields in table 'MESSAGES'
>         Database changed
> When I try to "desc MESSAGES" or select some data, I get ... 
>         ERROR 1016: Can't open file: 'MESSAGES.MYI'. (errno: 144)
> When I run myisamchk on .MYI tables, I get ... 
>         Checking MyISAM file: /usr/local/mysql/data/test/MESSAGES.MYI
>         Data records:    5202   Deleted blocks:       0
>         myisamchk: warning: Table is marked as crashed and last repair
>         failed
>         - check file-size
>         myisamchk: warning: Size of indexfile is: 34373632      Should
>         be: 445440
>         myisamchk: warning: Size of datafile is: 38468336       
>         Should be: 24260468
>         - check key delete-chain
>         - check record delete-chain
>         - check index reference
>         - check data record references index: 1
>         myisamchk: error: Found 28440 keys of 5202
>         - check record links
>         myisamchk: error: Record-count is not ok; is 28440       
>         Should be: 5202
>         myisamchk: warning: Found      16653 deleted blocks      
>         Should be: 0
>         myisamchk: warning: Found      45093 parts               
>         Should be: 5203 parts
>         MyISAM-table '/usr/local/mysql/data/test/MESSAGES.MYI' is
>         corrupted
>         Fix it using switch "-r" or "-o"

Anyone have any ideas what is going on? I need help ASAP on this, if you
can!

Thanks,

Ben Ricker




-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to