Details
-
Task
-
Status: Open (View Workflow)
-
Minor
-
Resolution: Unresolved
-
None
-
None
-
None
Description
Feature request:
Before starting an ALTER TABLE or OPTIMIZE TABLE that may create a temporary copy of the table: check up front that sufficient disk space is available for the operation to succeed.
For ALGORITHM=COPY just the free space of the datadir needs to be checked, but for ALGORITHM=INPLACE the tmpdir / innodb_tmpdir also needs to be taken into account, and the fact that with INPLACE temporary storage requirements may actually be around four times the tables size, and not just double as with COPY.
By checking this up front bad effects of running out of disk space on ALTER or OPTIMIZE could be prevented easily.