Today we had a very interesting phenomena at a customer. He
complained that MySQL always get some errors of the following
type:
[ERROR] mysqld: Sort aborted: Error writing file '/tmp/MYGbBrpA' (Errcode: 28 - No space left on device)
After a first investigation we found that df -h /tmp
shows from time to time a full disk but we could not see any file
with ls -la /tmp/MY*.
After some more investigation we found even the query from the
Slow Query Log which was producing the same problem. It looked
similar to this query:
SELECT * FROM test ORDER BY field5, field4, field3, field2, field1;
Now we were capable to simulate the problem at will with the
following table:
CREATE TABLE `test` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`data` varchar(64) DEFAULT NULL,
`ts` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE …
[Read more]