ALTER TABLE often required to create a copy of the entire table, so you need enough space on your file system to simultaneously store two copies of the data, as it restructures this table.
It may seem strange that he needs to make a copy of the table, since you are simply dropping the constraint. In later versions of MySQL, some ALTER TABLE operations have been optimized, so they do not require table restructuring. But you have been using the MySQL version since July 2007!
See also:
source share