I think this is a reasonable feature request (see upstream http://bugs.mysql.com/bug.php?id=1341) that can be implemented at least partially with the following tools/approaches/stages:
1. Some tool/command to just truncate free space at the end of ibdata1 (assuming some tables were dropped etc) safely
2. Some tool/command to "shrink" free space allocated for a table (ideally something better than just dump the table, drop it and then create new one), maybe by dropping extents allocated that are entirely "free".
3. Some tool/command to "de-fragment" a table, that is, move data allocated into the smaller number of extents/pages possible.
4. Some tool maybe based on/in frames of data recovery tools to move pages from one extent to the other getting all structures/checksums/pointers etc in sync.
If nothing of the above works easily, maybe just create a tool/script to automate the process of dumping all InnoDB tables, stopping server and deleting ib*, then creating small ibdata and loading tables back. For 5.6 we may move tables to individual .ibd files instead and them re-importing them into newly created ibdata using transportable tablespace feature.
I think this is a reasonable feature request (see upstream http:// bugs.mysql. com/bug. php?id= 1341) that can be implemented at least partially with the following tools/approache s/stages:
1. Some tool/command to just truncate free space at the end of ibdata1 (assuming some tables were dropped etc) safely checksums/ pointers etc in sync.
2. Some tool/command to "shrink" free space allocated for a table (ideally something better than just dump the table, drop it and then create new one), maybe by dropping extents allocated that are entirely "free".
3. Some tool/command to "de-fragment" a table, that is, move data allocated into the smaller number of extents/pages possible.
4. Some tool maybe based on/in frames of data recovery tools to move pages from one extent to the other getting all structures/
If nothing of the above works easily, maybe just create a tool/script to automate the process of dumping all InnoDB tables, stopping server and deleting ib*, then creating small ibdata and loading tables back. For 5.6 we may move tables to individual .ibd files instead and them re-importing them into newly created ibdata using transportable tablespace feature.
See somewhat related http:// bugs.mysql. com/bug. php?id= 59783 also.