Why does MySQL add a comment to InnoDB tables?
Question
When using phpMyAdmin or the MySQL GUI Tools, whenever I create an InnoDB table, it adds a comment to the table like this:
InnoDB free: 9216 kB
What does this mean? What's it used for?
Solution
InnoDB stores many tables per file. Inside that InnoDB data file, there can be free space:
- When you drop a table or index, delete rows, or replace rows with smaller ones (e.g., shorter TEXT)
- The file is grown n MB at a time (configured in my.cnf)
The comment is just telling you how much free space is in your InnoDB datafile(s). When that approaches 0, InnoDB will expand the data file.
I believe the default allocation block is 10MB, so that's probably why you have almost 10MB free.
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow