Hi! >>>>> "Peter" == Peter Zaitsev <[EMAIL PROTECTED]> writes: Peter> Hello , Peter> Few time ago I've started to get the following problems, which several Peter> times allready lead to data lost for me. Peter> Here is the example: Peter> I found the followings in my application error log: Peter> Query - #1017 [opal.local] - Can't find file: 'g04stat_languages.MYD' (errno: 2) Peter> select visitors,loads,id ,hits from layers_st45.g04stat_languages where layer_id=19573 Peter> 05.Apr 16:30:28 : pid:5224 h -- 65972/0 AllInOne rec:0 l:0 tm:1627.20 # Peter> 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 # <cut> Peter> This is not the worst case - in several tables I had .MYD file to be Peter> not existant, but TMD file left - so I just rename it and it works Peter> find. One or two times I didn't find even TMD file so I had to look Peter> at my backups. This indicates that there is some bug when running with --myisam-recover The only way I can see that the above would happen is if MySQL got killed hard between 2 system calls (not likely) or if there is a bug in the function: mysys/my_redel.c The my_redel() functions should delete the .MYD file and then rename the .TMD file as the .MYD file. I can't however see how this could ever go wrong. There could of course be a bug where the rename system call fails.... We could fix this for system that has the rename call (like Linux) by doing the following change in my_redel.c: } else if (my_delete(org_name,MyFlags)) goto end; if (my_rename(tmp_name,org_name,MyFlags)) goto end; -> #ifndef HAVE_RENAME else if (my_delete(org_name,MyFlags)) goto end; #endif if (my_rename(tmp_name,org_name,MyFlags)) goto end; Peter, could you try the above and check if this helps you solve this problem ? Peter> Looking at the table I found They are usually distributed in one table Peter> group - for example I get many from layers_stXX.gXX* lost there no Peter> over tables lost, so I think this is related to my purge program (this Peter> is still mysql bug anyway :)) ). The thing is after deleting some data Peter> from table the program uses REPAIR table - this is from the times Peter> then optimize table was several times slower. Peter> I'm using mysql 3.23.36, and nothing is changed in system, only mysql, Peter> also I had this problem with mysql 3.23.32 if I'm not mistaken. Peter> I'll try to make an repeatable example but I'm not shure I'll be able Peter> to do so as this does not happens to all tables this program work with Peter> - this may happen only in some specific cases - may be then other Peter> program is working with the table or something. Try using the following test program as a base for this:
I have during the previous week run the above program for days without ANY problems in REPAIR; This probably only means that you are doing something different compared to this program. If we can find this out, we will know a lot more! Regards, Monty
--------------------------------------------------------------------- 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