Bug #51713 .MYD not found : wrong path sent from MyODBC (ErrCode 22)
Submitted: 4 Mar 2010 10:11 Modified: 4 Apr 2010 11:32
Reporter: Frédéric PROST Email Updates:
Status: No Feedback Impact on me:
Category:MySQL Server: Windows Severity:S2 (Serious)
Version:5.1.34 OS:Microsoft Windows (64 bits)
Assigned to: Assigned Account CPU Architecture:Any

[4 Mar 2010 10:11] Frédéric PROST

On a heavy loaded MySQL Server (5.1.34 on Windows 2003 64 bits), I sometime have my server which generates errors like this : 

[MySQL][ODBC 5.1 Driver][mysqld-5.1.34-community-log]File '.mybasemytable.MYD' not found (Errcode: 22) (invalid argument according to perror)

It seems that it forget to send the seperator between the database name and table name (something like mybase/mytable.MYD, I guess)

This happends suddenly and affects all tables. 
When I restart the server, everything works ok.

These errors are reported in my ASP applications but nothing special can be identified in MySQL errors log.

I'm using MyOBDBC

Thanks for your help,

Best regards,


How to repeat:
I dont't know ;-)
[4 Mar 2010 10:20] Tonci Grgin
Hi Frédéric and thanks for your report.

Are you absolutely sure you are addressing a proper table ('.mybasemytable')? To me, ".mybasemytable" looks like a typo in code (just don't tell me you actually do have tables starting with ".")...
[4 Mar 2010 10:25] Frédéric PROST

Thank for your response.

I'm sure that my queries are correct because they work fine before this problem appears. and when I restart the server, it works fine again.

It seems that something hangs the server but I don't know how to detect the problem.
[4 Mar 2010 10:37] Tonci Grgin
Well Frédéric, you should start from general query log on MySQL server and check for exact query sent to server confirming that table name has a dot in it.
Then you need to create ODBC trace (see manual on how to do that) and attach it to this report.
Last, but not less important, debug your own code on that point and make sure it was *not* you who sent wrong table name to MySQL server via c/ODBC. Things might be thread safe but that does not mean they are shareable...
[4 Mar 2010 10:58] Frédéric PROST
My queries are correct and I never specify the database name in them as I'm only connected to a single database (my queries look like SELECT FROM <mytable> WHERE ...). 

And the fact that this problem affects all tables and that a restart solves the issue confirms that point.

I tried to activate ODBC trace but it seems to work only when a dsn is defined and I'm using a connexion string : 
Driver={MySQL ODBC 5.1 Driver};Server=<server_ip>;Port=3306;Database=<mybase>;User=<user>; Password=<pasword>;Option=16384;SET NAMES utf8;

I also tried to activate MyOBDC debug mode (option 4 + 524288) but it seems to be disabled since 3.51.18.
[4 Mar 2010 11:08] Tonci Grgin
Frédéric, so? Use DSN and test. Also, did you checked general query log? So far, this is not a bug report in any sense...
[4 Mar 2010 11:21] Frédéric PROST
I'm sure it's not a query problem.

Maybe I didn't explain my problem very well : the problem doesn't apperar randomly from time to time butsuddenly and massively on every query we pass to MySQL.

Here is, for instance, what happened, on 03/02/2010 at 08:44 PM: 

Our site was working fine and we didn't have any problem (I mean no bad queries, which generally return an error in our asp code with something like "table not found").

At 08:44 PM, our asp log system wich logs all error 500 suddenly started to report the error message I mentionned :
[MySQL][ODBC 5.1 Driver][mysqld-5.1.34-community-log]File
'.mybasemytable.MYD' not found (Errcode: 22)

Where mybase is the database we are connected to through the obdc connection string and mytable represents any table from this database (according, I guess to the query which asked this table).

At 08:00 AM the next day, we discovered this problem and simply stop and restart the MySQL service. No more errors 500 whith this problem where logged and the site was working fine again.

Our system logged about 300.000 errors like the one above during this time, but not before 08:44 PM and after 08:00.
[4 Mar 2010 11:32] Tonci Grgin
Frédéric, you see that this is not actually a bug report right? I'm squeezing stuff out of you... For example, if I knew IIS was involved I would have abandoned the idea of ODBC trace as it is just impossible to generate one from inside the IIS...

So far what I gather from you is:
  o At some point of undefined load, on undefined web server, my undefined code misplaces the dot in databse.table notation and query fails... Further more, we are unable to provide ODBC traces that could shed some light on the problem (since no code reproducing the error is made available) as we're (probably) using IIS.

What do you think I can do with all this? I am not a wizard...
[4 Apr 2010 23:00] Bugs System
No feedback was provided for this bug for over a month, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".