2

I have about 12GB of data in my tables and my datafile, ibdata1, used to be about 12GBs in size. I then ran the following command

alter table `rails_production`.`pictures` change `data` `image_file_data` mediumblob NULL

While it was making a temporary copy of the table, I got the following error

ERROR 1114 (HY000): The table '#sql-7fe4_12c9' is full

I assume this means there wasn't enough space to make a temporary copy of the table. But now the datafile is 17GB! How do I reclaim the space in the datafile?

Is there a way to check how much of that 17GB is being used?

Janak
  • 5,025
  • 8
  • 34
  • 43

2 Answers2

5

Unfortunately you can't reclaim space from an innodb database if you are not using innodb_file_per_table in your configuration:

MySQL InnoDB not releasing disk space after deleting data rows from table

Community
  • 1
  • 1
davek
  • 22,499
  • 9
  • 75
  • 95
0

Even when not using innodb_file_per_table , you can re-claim the space by dumping the DB and loading it back. This will probably cause some down-time, though.

Rafa
  • 1,397
  • 15
  • 21