MySQL ErrCode 17 - File Exists

I have a Windows Server 2003, Apache 2.2.2 and MySQL 5.0.21 system with a complicated PHP Moodle site on top.

MYD files are being left in the tmp folder which is causing "Can't create/write to file C:\xampplite\tmp\#sql_xxxx_0.myd' errors.  I have searched the web and tried many things that have worked for other people. I've installed APC caching. I've run an Analyze, Check, Repair and Optimize on the tables. I've given Everyone Full Control to the folder. I've uninstalled McAfee.

This is an in-house server, so we have full access to the server, but no hosting support. Can anyone help, even if it's suggestions or something to check?
thill1982Asked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

glcumminsCommented:
Are .MYD files the only ones being left, or do you also see .MYI files in the tmp folder?

Is upgrading an option, if this is determined to be a bug with the MySQL version?
0
thill1982Author Commented:
If I keep a hawk eye on the folder I can sometimes catch MYI and MYD files appearing and disappearing as they are used. MYI files are never left behind though.

If it is a noted problem with .21 that is fixed with .37 then upgrading is a possibility. I'd rather avoid it otherwise as it's risking a semi-live server. I have not seen it mentioned in change logs though. Has anyone else?
0
glcumminsCommented:
This was a bug listed in an older version, but was supposedly fixed a long time ago: http://bugs.mysql.com/bug.php?id=11824

0
Cloud Class® Course: CompTIA Cloud+

The CompTIA Cloud+ Basic training course will teach you about cloud concepts and models, data storage, networking, and network infrastructure.

glcumminsCommented:
Here is a description of the bug from that page:

Very complex select statements can create temporary tables
  that are too big to be represented as a MyISAM table.
 
  This was not checked at table creation time, but only at
  open time. The result was an attempt to delete the
  "impossible" table.
 
  But if the server is built --with-raid, MyISAM tries to
  open the table before deleting the files. It needs to find
  out if the table uses the raid support and how many raid
  chunks there are. This is done with an open "for repair",
  which will almost always succeed.
 
  But in this case we have an "impossible" table. The open
  failed. Hence the files were not deleted. Also the error
  message was a bit unspecific.


Does this sound like it fits your situation? If so, I would definitely recommend upgrading.
0
thill1982Author Commented:
Yes, although the symptons are slightly different in that both files were left behind. I'm only getting MYD files left.

The tables are MyISAM, and the server disks are RAIDed.
0
thill1982Author Commented:
Solution found! While I thought I had uninstalled McAfee, the EPO policy had reinstalled it, but not so you could see it in the system tray. Once I added the exception to the folder and instructed EPO not to over-write client exceptions everything worked as it should.
0
thill1982Author Commented:
Does Cleanup mean it will be deleted? Although I answered the question myself, this thread could help others in future.
0
VenabiliCommented:
Try to read the comment?
I will leave the following recommendation for this question in the Cleanup topic area:
   PAQ with points refunded

Which means what it says: The question will be saved and the points will be refunded to you.
0
Computer101Commented:
PAQed with points refunded (500)

Computer101
EE Admin
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
PHP

From novice to tech pro — start learning today.