2 messages in com.mysql.lists.mysqlStrange problem.
FromSent OnAttachments
Peter Zaitsev05 Apr 2001 06:14 
Michael Widenius05 Apr 2001 17:34 
Subject:Strange problem.
From:Peter Zaitsev (pz@spylog.ru)
Date:04/05/2001 06:14:30 AM
List:com.mysql.lists.mysql

Hello ,

Few time ago I've started to get the following problems, which several times allready lead to data lost for me.

Here is the example:

I found the followings in my application error log:

Query - #1017 [opal.local] - Can't find file: 'g04stat_languages.MYD' (errno: 2) select visitors,loads,id ,hits from layers_st45.g04stat_languages where
layer_id=19573 05.Apr 16:30:28 : pid:5224 h -- 65972/0 AllInOne rec:0 l:0 tm:1627.20 # 05.Apr 16:30:28 : pid:5224 h 65972/0 [03.23 17:10] - [01.01 02:59] q:3.73
i:0.00 a:3.26 #

So If I check mysql it's running quite well and long:

opal:/spylog/layers # mysqladmin status Uptime: 255087 Threads: 74 Questions: 28129440 Slow queries: 1453 Opens:
225540 Flush tables: 1 Open tables: 1024 Queries per second avg: 110.274 opal:/spylog/layers #

The logfile contains NO errors or snything about this

I went to look what is wrong with the file: The problem is index file is gone. And there are MUCH such situations - I get several files lost each day.

opal:/spylog/db/layers_st45 # ls -la g04stat_lang* -rw------- 1 mysql daemon 1473241 Mar 26 18:54 g04stat_languages.MYD -rw------- 1 mysql daemon 8664 Jan 12 19:09 g04stat_languages.frm

This is not the worst case - in several tables I had .MYD file to be not existant, but TMD file left - so I just rename it and it works find. One or two times I didn't find even TMD file so I had to look at my backups.

Looking at the table I found They are usually distributed in one table group - for example I get many from layers_stXX.gXX* lost there no over tables lost, so I think this is related to my purge program (this is still mysql bug anyway :)) ). The thing is after deleting some data from table the program uses REPAIR table - this is from the times then optimize table was several times slower.

I'm using mysql 3.23.36, and nothing is changed in system, only mysql, also I had this problem with mysql 3.23.32 if I'm not mistaken.

I'll try to make an repeatable example but I'm not shure I'll be able to do so as this does not happens to all tables this program work with - this may happen only in some specific cases - may be then other program is working with the table or something.