Bug #8706 temporary table with data directory option fails
Submitted: 22 Feb 2005 19:26 Modified: 2 Aug 2006 18:13
Reporter: Martin Friebe (Gold Quality Contributor) (OCA) Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server Severity:S3 (Non-critical)
Version:4.1.10 OS:Any (*)
Assigned to: Antony Curtis CPU Architecture:Any

[22 Feb 2005 19:26] Martin Friebe
Description:
if you want to have some of your temporary tables, on a different partition, and try to specify a data directory, concurent sessions will fail.

see how to repeat

How to repeat:
#session 1
create temporary table srct (a int) data directory = '/var/db/mysql/xxx/' select 9 a;

# session 2 (while seesion 1 is still open)
create temporary table srct (a int) data directory = '/var/db/mysql/xxx/' select 99 a;
ERROR 1 (HY000): Can't create/write to file '/var/db/mysql/xxx/srct.MYD' (Errcode: 17)

Suggested fix:
-
[5 May 2006 22:15] Bugs System
A patch for this bug has been committed. After review, it may
be pushed to the relevant source trees for release in the next
version. You can access the patch from:

  http://lists.mysql.com/commits/6029
[15 Jun 2006 3:02] Bugs System
A patch for this bug has been committed. After review, it may
be pushed to the relevant source trees for release in the next
version. You can access the patch from:

  http://lists.mysql.com/commits/7679
[6 Jul 2006 0:19] Bugs System
A patch for this bug has been committed. After review, it may
be pushed to the relevant source trees for release in the next
version. You can access the patch from:

  http://lists.mysql.com/commits/8805
[10 Jul 2006 10:54] Bugs System
A patch for this bug has been committed. After review, it may
be pushed to the relevant source trees for release in the next
version. You can access the patch from:

  http://lists.mysql.com/commits/8986
[11 Jul 2006 16:41] Antony Curtis
Currently pushed into repositories 4.1.21 and 5.0.24.
Merge into 5.1 pending.
[2 Aug 2006 6:33] Calvin Sun
merged into 5.1.12.
[2 Aug 2006 18:13] Paul Dubois
Noted in 4.1.21, 5.0.24, 5.1.12 changelogs.

The DATA DIRECTORY table option did not work for TEMPORARY tables.