Bug #40111 tmpdir is relative to datadir
Submitted: 17 Oct 2008 15:23 Modified: 31 Oct 2008 10:01
Reporter: Neil Bajorin Email Updates:
Status: Not a Bug Impact on me:
None 
Category:MySQL Server: General Severity:S3 (Non-critical)
Version:5.0.67 OS:Windows (Server 2003 32-bit)
Assigned to: CPU Architecture:Any

[17 Oct 2008 15:23] Neil Bajorin
Description:
I am using InnoDB as the default storage engine. Using my.ini, I set 
  basedir = C:\mysql/
  datadir = E:\mysql\data/
  tmpdir = E:\mysql\temp/
where all folders pre-exist. Running MySQL immediately terminates writing an error to E:\mysql\data\computer.err
  InnoDB: Error: unable to create temporary file; errno: 9
  [ERROR] Default storage engine (InnoDB) is not available
  [ERROR] Aborting
I have also seen the log return errno: 22.

After much experimenting, I concluded that the tmpdir path is relative to the datadir path. My current (working) my.ini reads
  datadir = E:\mysql_data/
  tmpdir = temp
where I've created the folder E:\mysql_data\temp.

I would prefer to see the tmpdir path completely independent of anything else. However, could this feature at least be properly documented?

How to repeat:
Set the tmpdir path to any full, existing folder.

Suggested fix:
Make the tmpdir path independent of any other path directives.
[17 Oct 2008 16:58] Valeriy Kravchuk
Sorry, but I can not repeat the behaviour described if(!) I set pathnames correctly. 

Please, read the manual, http://dev.mysql.com/doc/refman/5.0/en/windows-create-option-file.html:

"Note that Windows pathnames are specified in option files using (forward) slashes rather than backslashes. If you do use backslashes, you must double them:

[mysqld]
# set basedir to your installation path
basedir=E:\\mysql
# set datadir to the location of your data directory
datadir=E:\\mydata\\data"
[17 Oct 2008 17:12] Neil Bajorin
After some more experimenting, I've found that
  tmpdir = /  put the temp files in E:\
  tmpdir = /mysql/temp/  put the temp files in E:\mysql\temp
  datadir = E:/mysql/data/ allows the tmpdir to accept an absolute path

I had been using the C:\path/ pattern only because that's how it is done in the my-size.ini sample files.
[31 Oct 2008 10:01] Sveta Smirnova
Thank you for the feedback.

I believe report can be closed as "Not a Bug". If you don't agree explain why and reopen the report.