Bug #57331 Native OPTIMIZE TABLE support for InnoDB
Submitted: 8 Oct 2010 3:04
Reporter: Mikiya Okuno Email Updates:
Status: Verified Impact on me:
None 
Category:MySQL Server: InnoDB storage engine Severity:S4 (Feature request)
Version: OS:Any
Assigned to: CPU Architecture:Any

[8 Oct 2010 3:04] Mikiya Okuno
Description:
While OPTIMIZE TABLE is mapped to ALTER TABLE for InnoDB, if the table has larger than 50% of total available disk spaces, it's not possible to OPTIMIZE anyway. To avoid such situation, we need a native OPTIMIZE TABLE support for InnoDB.

How to repeat:
n/a

Suggested fix:
feature request.
[28 Jun 2015 10:41] Daniƫl van Eeden
Could we consider ALTER TABLE.. FORCE as an online operation a fix for this bug?

mysql-5.7.7-rc-debug> create table t1 (id bigint unsigned auto_increment primary key, name varchar (400)) default character set utf8mb4;
Query OK, 0 rows affected (0.03 sec)

mysql-5.7.7-rc-debug> ALTER TABLE t1 FORCE, ALGORITHM=INPLACE, LOCK=NONE;
Query OK, 0 rows affected (0.09 sec)
Records: 0  Duplicates: 0  Warnings: 0