Bug #30769 Unclear error message when disk full during sort
Submitted: 3 Sep 2007 11:59 Modified: 3 Sep 2007 18:44
Reporter: Kristian Koehntopp Email Updates:
Status: Verified Impact on me:
None 
Category:MySQL Server: Errors Severity:S4 (Feature request)
Version:5.0.46-enterprise-gpl OS:Any
Assigned to: CPU Architecture:Any

[3 Sep 2007 11:59] Kristian Koehntopp
Description:
A customer gets 

ERROR 2013 (HY000) at line 24: Lost connection to MySQL server during query.

A look into the server side error logs reveals

070830 10:12:36 [ERROR] /opt/mysql5/bin/mysqld: Sort aborted

for that point in time. A look into the code reveals that the only place this message is being used is when the I/O flush for the sort file fails. Further investigation shows us that at that point in time /tmp was full.

How to repeat:
Point tmpdir to some place small, overflow it. Try to debug the problem.

Suggested fix:
The client error message indicates that the server simply terminates the connection here instead of sending a proper error message. That is clearly wrong.

Even if the server sent an error message properly, "Sort aborted" is not very helpful and more interesting diagnostics such as "disk full" or other reasons for the flush failing should be returned.
[3 Sep 2007 18:44] Valeriy Kravchuk
Thank you for a reasonable feature request.