Bug #99293 CREATE INDEX gives in not very helpful error message when out of disk space
Submitted: 17 Apr 2020 21:01 Modified: 24 Apr 2020 13:09
Reporter: Øystein Grøvlen Email Updates:
Status: Duplicate Impact on me:
None 
Category:MySQL Server: InnoDB storage engine Severity:S3 (Non-critical)
Version:8.0.19 OS:CentOS
Assigned to: CPU Architecture:Any

[17 Apr 2020 21:01] Øystein Grøvlen
Description:
When creating an index, I get the following error message:

mysql> create index k_cov on sbtest1(k, c, pad);
ERROR 1034 (HY000): Incorrect key file for table 'sbtest1'; try to repair it

The log file shows that the real cause was that there was little disk space

2020-04-17T18:30:07.395241Z 522 [Warning] [MY-012637] [InnoDB] 1048576 bytes should have been written. Only 290816 bytes written. Retrying for the remaining bytes.
2020-04-17T18:30:07.395303Z 522 [Warning] [MY-012638] [InnoDB] Retry attempts for writing partial data failed.
2020-04-17T18:30:07.395320Z 522 [ERROR] [MY-012639] [InnoDB] Write to file (merge) failed at offset 1353711616, 1048576 bytes should have been written, only 290816 were written. Operating system error number 28. Check that your OS and file system support files of this size. Check also that the disk is not full or a disk quota exceeded.
2020-04-17T18:30:07.395355Z 522 [ERROR] [MY-012640] [InnoDB] Error number 28 means 'No space left on device'
2020-04-17T18:47:58.540011Z 523 [Warning] [MY-012637] [InnoDB] 1048576 bytes should have been written. Only 581632 bytes written. Retrying for the remaining bytes.
2020-04-17T18:47:58.540075Z 523 [Warning] [MY-012638] [InnoDB] Retry attempts for writing partial data failed.

How to repeat:
Create an index when the disk of tmpdir is almost full.

Suggested fix:
Give an error message that informs about the real cause, or at least suggests to check the error log.
[18 Apr 2020 4:49] Valeriy Kravchuk
Old story. Check these bug reports:

https://bugs.mysql.com/bug.php?id=27872

https://bugs.mysql.com/bug.php?id=80932

and some more.
[24 Apr 2020 13:09] MySQL Verification Team
Hi 

This bug is a duplicate of the following one:

https://bugs.mysql.com/bug.php?id=27872