InnoInfo

InnoInfo is a tool designed for two purposes:

  1. Getting statistics information on innodb data files
  2. Retrieving data from (corrupt) data files

InnoInfo is a totally seperate tool from MySQL and works directly on the InnoDB table space. InnoBase and Oracle have nothing to do with this tool, and you cannot get support from MySQL, Oracle or InnoBase for this tool. What you *can* do, is download the source, and try it out. However, neither Zarafa nor the author provide ANY WARRANTY on ANY PART of this software. If you trash your database, lose data, or simply stop breathing, this is not our fault.

Download

Download innoinfo 0.1 here

License

InnoInfo is distributed under the GPLv2 license.

Analyse

Analysing is done per table, and outputs this kind of information:

Total leaf pages: 3720 (60948480 bytes)
Sequential pages: 1099 (70.46% fragmented)
Free space in pages: 13071348 (78.38% full avg)
Records (Page count): 538922 (113 bytes effective per record avg)
Actual records: 538922 (should match page count records)
Garbage: 682870 bytes
Proximity: 1510.33 pages avg
B-tree levels (including leaf): 3
Blobs: 469
Blob pages: 593 (9715712 bytes)
Blob sequential pages: 124 (0.00% fragmented)
Blob data size: 6697337 (14280 bytes per blob avg)
Blob-to-Leaf ratio: 0.16
Total data size in records: 43635403
Total data size: 4313 pages (70664192 bytes)
Overhead: 61.94%

A quick explanation:

Dump

You can dump all data in an table directly with innoinfo with the -d option. This does basically what mysqldump would do, simply traversing all your data and dumping it into an SQL file. We do not dump the table defs through (only the INSERT INTO data).

If your table is broken, it may loop back on itself or crash in other strange ways. A mysqldump may only retrieve a small amount of data in that case. If you use the --linear option, this will allow you to (try to) retrieve more data; the linear mode scans the entire ibdata file, looking for pages that are part of the table you're trying to dump. If it finds a page, it dumps the data. This means that in most cases, you will get TOO MANY records; pages that were no longer really in use are often found with the linear option. So, you will never get a perfect dump, but that's still way better than losing 80% of all your data.

How does it work?

InnoInfo simply contains the code for reading 'ibdata' (normally ibdata1) files directly. It is therefore a good idea to close MySQL before using InnoInfo. What it can then do, is show you information on the tables within the file, like column types. It can also run through your entire data set and generate statistics like how many bytes are actually being used by you table, and fragmentation information

How do you know the output data is correct?

We don't. It seems to be pretty logical and correct in many cases though

What is unsupported?

Currently unsupported are:

I want to talk to someone!

Try e-mailing to me, although it may be in vain: s.hardy at zarafa dot com

Developer: InnoInfo (last edited 2008-02-07 14:21:22 by SteveHardy)