{"id":45883223,"url":"https://github.com/baotiao/inno_space","last_synced_at":"2026-02-27T14:58:39.536Z","repository":{"id":40369005,"uuid":"425349135","full_name":"baotiao/inno_space","owner":"baotiao","description":"Inno_space is a command-line tool designed for direct access to InnoDB (.ibd) files.","archived":false,"fork":false,"pushed_at":"2026-01-13T09:42:18.000Z","size":1526,"stargazers_count":161,"open_issues_count":8,"forks_count":52,"subscribers_count":5,"default_branch":"main","last_synced_at":"2026-01-13T11:55:27.183Z","etag":null,"topics":["cpp","innodb","mysql"],"latest_commit_sha":null,"homepage":"http://baotiao.github.io/","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/baotiao.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2021-11-06T21:09:46.000Z","updated_at":"2026-01-13T10:19:00.000Z","dependencies_parsed_at":"2023-09-26T11:24:27.758Z","dependency_job_id":null,"html_url":"https://github.com/baotiao/inno_space","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/baotiao/inno_space","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/baotiao%2Finno_space","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/baotiao%2Finno_space/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/baotiao%2Finno_space/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/baotiao%2Finno_space/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/baotiao","download_url":"https://codeload.github.com/baotiao/inno_space/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/baotiao%2Finno_space/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29900959,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-27T14:46:13.553Z","status":"ssl_error","status_checked_at":"2026-02-27T14:46:10.522Z","response_time":57,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cpp","innodb","mysql"],"created_at":"2026-02-27T14:58:38.756Z","updated_at":"2026-02-27T14:58:39.528Z","avatar_url":"https://github.com/baotiao.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"## Introduction\n\nInno_space is a command-line tool designed for direct access to InnoDB (.ibd) files. It offers the capability to parse these files, providing detailed table information, and it can also assist in fixing corrupt pages. Inno_space converts .ibd files into human-readable formats, inspired by Jeremy Cole's inno_ruby. Unlike inno_ruby, Inno_space supports MySQL 8.0 and is implemented in C++, eliminating the need to set up a Ruby environment.\n\nAn intriguing feature of Inno_space is its ability to bypass corrupt pages. In cases where a database won't start due to corruption in some pages, Inno_space can delete the corrupt page, allowing the database to start. This results in the loss of only one page, with other data remaining retrievable.\n\n## Features\n\n* Supports reading all blocks in .ibd files.\n* Allows reading a specific block within the .ibd file.\n* Provides the capability to remove corrupt pages in .ibd files.\n* Supports updating page checksums.\n* **Supports dumping records from .ibd files.**\n* **Auto-extracts SDI (data dictionary) from .ibd files using ibd2sdi.**\n\n## Build\n\n```bash\n# Build the project (produces executable named \"inno\")\nmake\n\n# Clean build artifacts\nmake clean\n```\n\n**macOS:** If the build fails with `undeclared identifier 'ulong'`, edit `include/my_config.h` and change `#define HAVE_ULONG 1` to `/* #undef HAVE_ULONG */`.\n\n## Usage\n\n```shell\nInno_space\nusage: inno [-h] [-f test/t.ibd] [-p page_num]\n        -h                -- show this help\n        -f test/t.ibd     -- ibd file\n                -c list-page-type      -- show all page types\n                -c index-summary       -- show indexes information\n                -c show-undo-file      -- show undo log detail\n                -c dump-all-records    -- dump all records (uses ibd2sdi or -s)\n        -p page_num       -- show page information\n                -c show-records        -- show all records information\n        -s sdi.json       -- SDI file (optional, uses ibd2sdi if not provided)\n        -u page_num       -- update page checksum\n        -d page_num       -- delete page\n\nExample:\n====================================================\nShow sbtest1.ibd all page types\n./inno -f ~/git/primary/dbs2250/sbtest/sbtest1.ibd -c list-page-type\nShow sbtest1.ibd all indexes information\n./inno -f ~/git/primary/dbs2250/sbtest/sbtest1.ibd -c index-summary\nShow undo_001 all rseg information\n./inno -f ~/git/primary/dbs2250/log/undo_001 -c show-undo-file\nShow specified page information\n./inno -f ~/git/primary/dbs2250/sbtest/sbtest1.ibd -p 10\nDump all records (auto-extract SDI using ibd2sdi)\n./inno -f ~/git/primary/dbs2250/sbtest/sbtest1.ibd -c dump-all-records\nDump all records (with explicit SDI file)\n./inno -f ~/git/primary/dbs2250/sbtest/sbtest1.ibd -c dump-all-records -s ./tool/sbtest1.json\nDelete specified page\n./inno -f ~/git/primary/dbs2250/test/t1.ibd -d 2\nUpdate specified page checksum\n./inno -f ~/git/primary/dbs2250/test/t1.ibd -u 2\n\n```\n\n**Example1:**\nShow basic file space information\n\n```shell\n└─[$] ./inno -f ~/git/primary/dbs2250/sbtest/sbtest1.ibd -c list-page-type\nFile path /home/zongzhi.czz/git/primary/dbs2250/sbtest/sbtest1.ibd path, page num 0\npage num 0\n==========================space page type==========================\nFile size 2604662784\nstart           end             count           type\n0               0               1               FSP HDR\n1               1               1               INSERT BUFFER BITMAP\n2               2               1               INDEX NODE PAGE\n3               3               1               SDI INDEX PAGE\n4               16383           16380           INDEX PAGE\n16384           16384           1               XDES\n16385           16385           1               INSERT BUFFER BITMAP\n16386           31990           15605           INDEX PAGE\n31991           31999           9               FRESHLY ALLOCATED PAGE\n32000           32767           768             INDEX PAGE\n32768           32768           1               XDES\n32769           32769           1               INSERT BUFFER BITMAP\n32770           49151           16382           INDEX PAGE\n49152           49152           1               XDES\n49153           49153           1               INSERT BUFFER BITMAP\n49154           65535           16382           INDEX PAGE\n65536           65536           1               XDES\n65537           65537           1               INSERT BUFFER BITMAP\n65538           81919           16382           INDEX PAGE\n81920           81920           1               XDES\n\n```\n\n**Example 2:**\n./inno -f ~/git/primary/dbs2250/sbtest/sbtest1.ibd -c index-summary\n\n```shell\nFile path /home/zongzhi.czz/git/primary/dbs2250/sbtest/sbtest1.ibd path, page num 0\n==========================Space Header==========================\nSpace ID: 15\nHighest Page number: 158976\nFree limit Page Number: 152256\nFREE_FRAG page number: 24\nNext Seg ID: 7\nFile size 2604662784\n========Primary index========\nPrimary index root page space_id 15 page_no 4\nBtree height: 2\n\u003c\u003c\u003cLeaf page segment\u003e\u003e\u003e\nSEGMENT id 4, space id 15\nExtents information:\nFULL extent list size 2140\nFREE extent list size 0\nPARTIALLY FREE extent list size 1\nPages information:\nReserved page num: 137056\nUsed page num: 137003\nFree page num: 53\n\n\u003c\u003c\u003cNon-Leaf page segment\u003e\u003e\u003e\nSEGMENT id 3, space id 15\nExtents information:\nFULL extent list size 1\nFREE extent list size 0\nPARTIALLY FREE extent list size 1\nPages information:\nReserved page num: 160\nUsed page num: 116\nFree page num: 44\n\n========Secondary index========\nSecondary index root page space_id 15 page_no 31940\nBtree height: 2\n\u003c\u003c\u003cLeaf page segment\u003e\u003e\u003e\nSEGMENT id 6, space id 15\nExtents information:\nFULL extent list size 7\nFREE extent list size 0\nPARTIALLY FREE extent list size 219\nPages information:\nReserved page num: 14465\nUsed page num: 12160\nFree page num: 2305\n\n\u003c\u003c\u003cNon-Leaf page segment\u003e\u003e\u003e\nSEGMENT id 5, space id 15\nExtents information:\nFULL extent list size 0\nFREE extent list size 0\nPARTIALLY FREE extent list size 0\nPages information:\nReserved page num: 19\nUsed page num: 19\nFree page num: 0\n\n**Suggestion**\nFile size 2604662784, reserved but not used space 39354368, percentage 1.51%\nOptimize table will get new fie size 2565308416\n```\n\n**Example 3:**\nShow specific page information\n\n```shell\n└─[$] ./inno -f ~/git/primary/dbs2250/sbtest/sbtest1.ibd -p 10\nFile path /home/zongzhi.czz/git/primary/dbs2250/sbtest/sbtest1.ibd path, page num 10\n==========================block==========================\nFIL Header:\nCheckSum: 1187106543\ncrc 1187106543\nPage number: 10\nPrevious Page: 9\nNext Page: 12\nPage LSN: 35174063\nPage Type: 17855\nFlush LSN: 0\nIndex Header:\nNumber of Directory Slots: 18\nGarbage Space: 0\nNumber of Records: 73\nMax Trx id: 0\nPage level: 0\nIndex ID: 142\n```\n\nExample 4:\n\n```shell\nTry to write some corrupt data to data file\nprintf 'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaabbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb' | dd of=../primary/dbs2250/sbtest/sbtest1.ibd bs=1 seek=172032 count=100 conv=notrunc\nThe database will crash after visiting the data\nThe log is:\n\n2021-12-14T09:21:19.230754Z 9 [ERROR] [MY-030043] [InnoDB] InnoDB: Corrupt page resides in file: ./sbtest/sbtest1.ibd, offset: 163840, len: 16384\n2021-12-14T09:21:19.230768Z 9 [ERROR] [MY-011906] [InnoDB] Database page corruption on disk or a failed file read of page [page id: space=15, page number=10]. You may have to recover from a backup.\n2021-12-14T09:21:19.230775Z 9 [Note] [MY-011876] [InnoDB] Page dump in ASCII and hex (16384 bytes):\n\nDelete specified page\n./inno -f ~/git/primary/dbs2250/sbtest/sbtest1.ibd -d 10\n\nUpdate specified page checksum\n./inno -f ~/git/primary/dbs2250/sbtest/sbtest1.ibd -u 10\n```\n\nStart mysqld, and the database can be started successfully\n\n**Example 5:**\n\nTry to show records on a specified page number\n\n```shell\n./inno -f /home/zongzhi.czz/git/db8r/dbs2250/sbtest/sbtest1.ibd -c show-records -p 10  -s ./tool/sbtest1.json\n\nFile path /home/zongzhi.czz/git/db8r/dbs2250/sbtest/sbtest1.ibd path, page num 10\n=========================10's block==========================\nFIL Header:\nCheckSum: 613295053\nPage number: 10\nPrevious Page: 9\nNext Page: 11\nPage LSN: 92471792635\nPage Type: 17855\nFlush LSN: 0\n\nIndex Header:\nNumber of Directory Slots: 19\nGarbage Space: 0\nNumber of Records: 73\nMax Trx id: 0\nPage level: 0\nIndex ID: 359\n\noffset from the previous record 26\noffset inside the page 125\nheap no 2\nrecord status 0\nInfo Flags: is_deleted 0, is_min_record 0\nid: 329\nk: 67746\nc: 25087106756-05358861945-28639810730-70293660170-58309876130-54681200436-23663683142-92420314539-18642450369-82863665005\npad: 39869284856-57048363201-54479788494-88842253993-52056631753\n... \nthen all the records on page num 10\n\n```\n\n\n\n\n\nRead more about InnoDB file_space:\n\nhttps://blog.jcole.us/innodb/\n\nhttp://baotiao.github.io/2021/11/29/inno-space.html\n\n### Contact Us\nIf you have any questions or need assistance, feel free to contact the author at baotiao@gmail.com\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbaotiao%2Finno_space","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbaotiao%2Finno_space","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbaotiao%2Finno_space/lists"}