Bug #48404 check tmpdir at server start
Submitted: 29 Oct 2009 11:46 Modified: 3 Dec 2014 8:59
Reporter: Axel Schwenke Email Updates:
Status: Duplicate Impact on me:
None 
Category:MySQL Server: General Severity:S4 (Feature request)
Version:5.0.68,5.1.42 OS:Any
Assigned to: CPU Architecture:Any
Triage: Needs Triage: D5 (Feature request)

[29 Oct 2009 11:46] Axel Schwenke
Description:
If the tmpdir variable is set wrong, or if the tmpdir has been deleted or is not writable then any kind of errors can happen and it is not always obvious that the tmpdir is the reason.

How to repeat:
Set tmpdir to some notexisting or readonly location and start the server. It will start up, but fail for many operations.

Suggested fix:
At server start, try to create a temporary file. If that fails, refuse to start with a meaningful error message.
[1 Jan 2010 10:00] Shane Bester
some errors might include:
o) innodb failing to startup.
o) ERROR 1 (HY000): Can't create/write to file 'u:\#sql1104_1_23.MYI' (Errcode: 2)
o) ERROR 1049 (42000): Unknown database 'test' when creating a tmp table
[3 Dec 2014 6:32] Daniƫl van Eeden
This is a duplicate of Bug #9403