Bug #14634 Running out of diskspace on tmpdir returns an inappropriate error
Submitted: 4 Nov 2005 12:29 Modified: 26 Jan 2006 3:56
Reporter: Peter Olsen
Status: Closed
Category:Server Severity:S3 (Non-critical)
Version:4.1.9/5.0 OS:Linux (Linux/Windows)
Assigned to: Magnus Blaudd Target Version:

[4 Nov 2005 12:29] Peter Olsen
Description:
Running a query with a GROUP BY clause on a serious amount of data will cause  the server
to exceed the in-memory temporary table and write to the predefined tmpdir.
If it runs out of diskspace during this query it returns a "duplicate entry error"
instead of a more reasonable description.

How to repeat:
Create a temporary directory on a partition that is close to full.
Let the 'tmpdir' variable point to this directory.
Make sure the 'tmp_table_size' variable is small.
Execute a query on a large table with a GROUP BY clause - anything that would cause the
optimizer to create a temporary table.
[2 Dec 2005 13:33] 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/internals/32958
[17 Jan 2006 14:50] 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/internals/33348
[17 Jan 2006 16:48] 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/internals/33351
[19 Jan 2006 11:07] Magnus Blaudd
"Got error 28" wil now be returned when runnig out of disk space in tmpdir.

Pushed to 4.1.18
[23 Jan 2006 15:19] Magnus Blaudd
Pushed to 4.1.18 and 5.0.19
[26 Jan 2006 3:56] Mike Hillyer
Recorded in 4.1.18 and 5.0.19 changelogs:

<listitem>
     <para>
       Running out of diskspace in the location specified by the
       <literal>tmpdir</literal> option resulted in incorrect error
       message. (Bug #14634)
     </para>
   </listitem>