Skip to main content

Commands

Enum Commands 

Source
pub enum Commands {
    Parse {
        file: String,
        page: Option<u64>,
        verbose: bool,
        no_empty: bool,
        json: bool,
        page_size: Option<u32>,
    },
    Pages {
        file: String,
        page: Option<u64>,
        verbose: bool,
        show_empty: bool,
        list: bool,
        filter_type: Option<String>,
        json: bool,
        page_size: Option<u32>,
    },
    Dump {
        file: String,
        page: Option<u64>,
        offset: Option<u64>,
        length: Option<usize>,
        raw: bool,
        page_size: Option<u32>,
    },
    Corrupt {
        file: String,
        page: Option<u64>,
        bytes: usize,
        header: bool,
        records: bool,
        offset: Option<u64>,
        verify: bool,
        json: bool,
        page_size: Option<u32>,
    },
    Find {
        datadir: String,
        page: u64,
        checksum: Option<u32>,
        space_id: Option<u32>,
        first: bool,
        json: bool,
        page_size: Option<u32>,
    },
    Tsid {
        datadir: String,
        list: bool,
        tablespace_id: Option<u32>,
        json: bool,
        page_size: Option<u32>,
    },
    Sdi {
        file: String,
        pretty: bool,
        page_size: Option<u32>,
    },
    Log {
        file: String,
        blocks: Option<u64>,
        no_empty: bool,
        verbose: bool,
        json: bool,
    },
    Info {
        ibdata: bool,
        lsn_check: bool,
        datadir: Option<String>,
        database: Option<String>,
        table: Option<String>,
        host: Option<String>,
        port: Option<u16>,
        user: Option<String>,
        password: Option<String>,
        defaults_file: Option<String>,
        json: bool,
        page_size: Option<u32>,
    },
    Recover {
        file: String,
        page: Option<u64>,
        verbose: bool,
        json: bool,
        force: bool,
        page_size: Option<u32>,
    },
    Checksum {
        file: String,
        verbose: bool,
        json: bool,
        page_size: Option<u32>,
    },
}
Expand description

Available subcommands for the inno CLI.

Variants§

§

Parse

Parse .ibd file and display page summary

Reads the 38-byte FIL header of every page in a tablespace, decodes the page type, checksum, LSN, prev/next pointers, and space ID, then prints a per-page breakdown followed by a page-type frequency summary table. Page 0 additionally shows the FSP header (space ID, size, flags). Use --no-empty to skip zero-checksum allocated pages, or -p to inspect a single page in detail. With --verbose, checksum validation and LSN consistency results are included for each page.

Fields

§file: String

Path to InnoDB data file (.ibd)

§page: Option<u64>

Display a specific page number

§verbose: bool

Display additional information

§no_empty: bool

Skip empty/allocated pages

§json: bool

Output in JSON format

§page_size: Option<u32>

Override page size (default: auto-detect)

§

Pages

Detailed page structure analysis

Goes beyond FIL headers to decode the internal structure of each page type: INDEX pages show the B+Tree index header, FSEG inode pointers, and infimum/supremum system records; UNDO pages show the undo page header and segment state; BLOB/LOB pages show chain pointers and data lengths; and page 0 shows extended FSP header fields including compression and encryption flags. Use -l for a compact one-line-per-page listing, -t INDEX to filter by page type, or -p for a single page deep dive.

Fields

§file: String

Path to InnoDB data file (.ibd)

§page: Option<u64>

Display a specific page number

§verbose: bool

Display additional information

§show_empty: bool

Show empty/allocated pages

§list: bool

Compact list mode (one line per page)

§filter_type: Option<String>

Filter by page type (e.g., INDEX)

§json: bool

Output in JSON format

§page_size: Option<u32>

Override page size (default: auto-detect)

§

Dump

Hex dump of raw page bytes

Operates in two modes: page mode (default) reads a full page by number and produces a formatted hex dump with file-relative offsets; offset mode (--offset) reads bytes at an arbitrary file position, useful for inspecting structures that cross page boundaries. Use --length to limit the number of bytes shown, or --raw to emit unformatted binary bytes suitable for piping to other tools.

Fields

§file: String

Path to InnoDB data file

§page: Option<u64>

Page number to dump (default: 0)

§offset: Option<u64>

Absolute byte offset to start dumping (bypasses page mode)

§length: Option<usize>

Number of bytes to dump (default: page size or 256 for offset mode)

§raw: bool

Output raw binary bytes (no formatting)

§page_size: Option<u32>

Override page size (default: auto-detect)

§

Corrupt

Intentionally corrupt pages for testing

Writes random bytes into a tablespace file to simulate data corruption. Targets can be the FIL header (-k), the record data area (-r), or an absolute byte offset (--offset). If no page is specified, one is chosen at random. Use --verify to print before/after checksum comparisons confirming the page is now invalid — useful for verifying that inno checksum correctly detects the damage.

Fields

§file: String

Path to data file

§page: Option<u64>

Page number to corrupt (random if not specified)

§bytes: usize

Number of bytes to corrupt

§header: bool

Corrupt the FIL header area

§records: bool

Corrupt the record data area

§offset: Option<u64>

Absolute byte offset to corrupt (bypasses page calculation)

§verify: bool

Show before/after checksum comparison

§json: bool

Output in JSON format

§page_size: Option<u32>

Override page size (default: auto-detect)

§

Find

Search for pages across data directory

Recursively discovers all .ibd files under a MySQL data directory, opens each as a tablespace, and reads the FIL header of every page looking for a matching page_number field. Optional --checksum and --space-id filters narrow results when the same page number appears in multiple tablespaces. Use --first to stop after the first match for faster lookups.

Fields

§datadir: String

MySQL data directory path

§page: u64

Page number to search for

§checksum: Option<u32>

Checksum to match

§space_id: Option<u32>

Space ID to match

§first: bool

Stop at first match

§json: bool

Output in JSON format

§page_size: Option<u32>

Override page size (default: auto-detect)

§

Tsid

List/find tablespace IDs

Scans .ibd and .ibu files under a MySQL data directory and reads the space ID from the FSP header (page 0, offset 38) of each file. In list mode (-l) it prints every file and its space ID; in lookup mode (-t <id>) it finds the file that owns a specific tablespace ID. Useful for mapping a space ID seen in error logs or INFORMATION_SCHEMA back to a physical file on disk.

Fields

§datadir: String

MySQL data directory path

§list: bool

List all tablespace IDs

§tablespace_id: Option<u32>

Find table file by tablespace ID

§json: bool

Output in JSON format

§page_size: Option<u32>

Override page size (default: auto-detect)

§

Sdi

Extract SDI metadata (MySQL 8.0+)

Locates SDI (Serialized Dictionary Information) pages in a tablespace by scanning for page type 17853, then reassembles multi-page SDI records by following the page chain. The zlib-compressed payload is decompressed and printed as JSON. Each tablespace in MySQL 8.0+ embeds its own table/column/index definitions as SDI records, eliminating the need for the .frm files used in older versions. Use --pretty for indented JSON output.

Fields

§file: String

Path to InnoDB data file (.ibd)

§pretty: bool

Pretty-print JSON output

§page_size: Option<u32>

Override page size (default: auto-detect)

§

Log

Analyze InnoDB redo log files

Opens an InnoDB redo log file (ib_logfile0/ib_logfile1 for MySQL < 8.0.30, or #ib_redo* files for 8.0.30+) and displays the log file header, both checkpoint records, and per-block details including block number, data length, checkpoint number, and CRC-32C checksum status. With --verbose, MLOG record types within each data block are decoded and summarized. Use --blocks N to limit output to the first N data blocks, or --no-empty to skip blocks that contain no redo data.

Fields

§file: String

Path to redo log file (ib_logfile0, ib_logfile1, or #ib_redo*)

§blocks: Option<u64>

Limit to first N data blocks

§no_empty: bool

Skip empty blocks

§verbose: bool

Display additional information

§json: bool

Output in JSON format

§

Info

Show InnoDB file and system information

Operates in three modes. --ibdata reads the ibdata1 page 0 FIL header and redo log checkpoint LSNs. --lsn-check compares the ibdata1 header LSN with the latest redo log checkpoint LSN to detect whether the system tablespace and redo log are in sync (useful for diagnosing crash-recovery state). -D/-t queries a live MySQL instance via INFORMATION_SCHEMA.INNODB_TABLES and INNODB_INDEXES for tablespace IDs, table IDs, index root pages, and key InnoDB status metrics (requires the mysql feature).

Fields

§ibdata: bool

Inspect ibdata1 page 0 header

§lsn_check: bool

Compare ibdata1 and redo log LSNs

§datadir: Option<String>

MySQL data directory path

§database: Option<String>

Database name (for table/index info)

§table: Option<String>

Table name (for table/index info)

§host: Option<String>

MySQL host

§port: Option<u16>

MySQL port

§user: Option<String>

MySQL user

§password: Option<String>

MySQL password

§defaults_file: Option<String>

Path to MySQL defaults file (.my.cnf)

§json: bool

Output in JSON format

§page_size: Option<u32>

Override page size (default: auto-detect)

§

Recover

Recover data from corrupt/damaged tablespace files

Scans a tablespace file and classifies each page as intact, corrupt, empty, or unreadable. For INDEX pages, counts recoverable user records by walking the compact record chain. Produces a recovery assessment showing how many pages and records can be salvaged.

Use --force to also extract records from pages with bad checksums but valid-looking headers — useful when data is partially damaged but the record chain is still intact. Use --page-size to override page size detection when page 0 is corrupt.

With --verbose, per-page details are shown including page type, status, LSN, and record count. With --json, a structured report is emitted including optional per-record detail when combined with --verbose.

Fields

§file: String

Path to InnoDB data file (.ibd)

§page: Option<u64>

Analyze a single page instead of full scan

§verbose: bool

Show per-page details

§json: bool

Output in JSON format

§force: bool

Extract records from corrupt pages with valid headers

§page_size: Option<u32>

Override page size (critical when page 0 is corrupt)

§

Checksum

Validate page checksums

Reads every page in a tablespace and validates its stored checksum against both CRC-32C (MySQL 5.7.7+) and legacy InnoDB algorithms. Also checks that the header LSN low-32 bits match the FIL trailer. All-zero pages are counted as empty and skipped. With --verbose, per-page results are printed including the detected algorithm and stored vs. calculated values. Exits with code 1 if any page has an invalid checksum, making it suitable for use in scripts and CI.

Fields

§file: String

Path to InnoDB data file (.ibd)

§verbose: bool

Show per-page checksum details

§json: bool

Output in JSON format

§page_size: Option<u32>

Override page size (default: auto-detect)

Trait Implementations§

Source§

impl FromArgMatches for Commands

Source§

fn from_arg_matches(__clap_arg_matches: &ArgMatches) -> Result<Self, Error>

Instantiate Self from ArgMatches, parsing the arguments as needed. Read more
Source§

fn from_arg_matches_mut( __clap_arg_matches: &mut ArgMatches, ) -> Result<Self, Error>

Instantiate Self from ArgMatches, parsing the arguments as needed. Read more
Source§

fn update_from_arg_matches( &mut self, __clap_arg_matches: &ArgMatches, ) -> Result<(), Error>

Assign values from ArgMatches to self.
Source§

fn update_from_arg_matches_mut<'b>( &mut self, __clap_arg_matches: &mut ArgMatches, ) -> Result<(), Error>

Assign values from ArgMatches to self.
Source§

impl Subcommand for Commands

Source§

fn augment_subcommands<'b>(__clap_app: Command) -> Command

Append to Command so it can instantiate Self via FromArgMatches::from_arg_matches_mut Read more
Source§

fn augment_subcommands_for_update<'b>(__clap_app: Command) -> Command

Append to Command so it can instantiate self via FromArgMatches::update_from_arg_matches_mut Read more
Source§

fn has_subcommand(__clap_name: &str) -> bool

Test whether Self can parse a specific subcommand

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> Conv for T

Source§

fn conv<T>(self) -> T
where Self: Into<T>,

Converts self into T using Into<T>. Read more
Source§

impl<Choices> CoproductSubsetter<CNil, HNil> for Choices

Source§

type Remainder = Choices

Source§

fn subset( self, ) -> Result<CNil, <Choices as CoproductSubsetter<CNil, HNil>>::Remainder>

Extract a subset of the possible types in a coproduct (or get the remaining possibilities) Read more
Source§

impl<T> FmtForward for T

Source§

fn fmt_binary(self) -> FmtBinary<Self>
where Self: Binary,

Causes self to use its Binary implementation when Debug-formatted.
Source§

fn fmt_display(self) -> FmtDisplay<Self>
where Self: Display,

Causes self to use its Display implementation when Debug-formatted.
Source§

fn fmt_lower_exp(self) -> FmtLowerExp<Self>
where Self: LowerExp,

Causes self to use its LowerExp implementation when Debug-formatted.
Source§

fn fmt_lower_hex(self) -> FmtLowerHex<Self>
where Self: LowerHex,

Causes self to use its LowerHex implementation when Debug-formatted.
Source§

fn fmt_octal(self) -> FmtOctal<Self>
where Self: Octal,

Causes self to use its Octal implementation when Debug-formatted.
Source§

fn fmt_pointer(self) -> FmtPointer<Self>
where Self: Pointer,

Causes self to use its Pointer implementation when Debug-formatted.
Source§

fn fmt_upper_exp(self) -> FmtUpperExp<Self>
where Self: UpperExp,

Causes self to use its UpperExp implementation when Debug-formatted.
Source§

fn fmt_upper_hex(self) -> FmtUpperHex<Self>
where Self: UpperHex,

Causes self to use its UpperHex implementation when Debug-formatted.
Source§

fn fmt_list(self) -> FmtList<Self>
where &'a Self: for<'a> IntoIterator,

Formats each item in a sequence. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U, I> LiftInto<U, I> for T
where U: LiftFrom<T, I>,

Source§

fn lift_into(self) -> U

Performs the indexed conversion.
Source§

impl<T> Pipe for T
where T: ?Sized,

Source§

fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> R
where Self: Sized,

Pipes by value. This is generally the method you want to use. Read more
Source§

fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> R
where R: 'a,

Borrows self and passes that borrow into the pipe function. Read more
Source§

fn pipe_ref_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> R
where R: 'a,

Mutably borrows self and passes that borrow into the pipe function. Read more
Source§

fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> R
where Self: Borrow<B>, B: 'a + ?Sized, R: 'a,

Borrows self, then passes self.borrow() into the pipe function. Read more
Source§

fn pipe_borrow_mut<'a, B, R>( &'a mut self, func: impl FnOnce(&'a mut B) -> R, ) -> R
where Self: BorrowMut<B>, B: 'a + ?Sized, R: 'a,

Mutably borrows self, then passes self.borrow_mut() into the pipe function. Read more
Source§

fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> R
where Self: AsRef<U>, U: 'a + ?Sized, R: 'a,

Borrows self, then passes self.as_ref() into the pipe function.
Source§

fn pipe_as_mut<'a, U, R>(&'a mut self, func: impl FnOnce(&'a mut U) -> R) -> R
where Self: AsMut<U>, U: 'a + ?Sized, R: 'a,

Mutably borrows self, then passes self.as_mut() into the pipe function.
Source§

fn pipe_deref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> R
where Self: Deref<Target = T>, T: 'a + ?Sized, R: 'a,

Borrows self, then passes self.deref() into the pipe function.
Source§

fn pipe_deref_mut<'a, T, R>( &'a mut self, func: impl FnOnce(&'a mut T) -> R, ) -> R
where Self: DerefMut<Target = T> + Deref, T: 'a + ?Sized, R: 'a,

Mutably borrows self, then passes self.deref_mut() into the pipe function.
Source§

impl<T> Pointable for T

Source§

const ALIGN: usize

The alignment of pointer.
Source§

type Init = T

The type for initializers.
Source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
Source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
Source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
Source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<Source> Sculptor<HNil, HNil> for Source

Source§

type Remainder = Source

Source§

fn sculpt(self) -> (HNil, <Source as Sculptor<HNil, HNil>>::Remainder)

Consumes the current HList and returns an HList with the requested shape. Read more
Source§

impl<T> Tap for T

Source§

fn tap(self, func: impl FnOnce(&Self)) -> Self

Immutable access to a value. Read more
Source§

fn tap_mut(self, func: impl FnOnce(&mut Self)) -> Self

Mutable access to a value. Read more
Source§

fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Self
where Self: Borrow<B>, B: ?Sized,

Immutable access to the Borrow<B> of a value. Read more
Source§

fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Self
where Self: BorrowMut<B>, B: ?Sized,

Mutable access to the BorrowMut<B> of a value. Read more
Source§

fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Self
where Self: AsRef<R>, R: ?Sized,

Immutable access to the AsRef<R> view of a value. Read more
Source§

fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Self
where Self: AsMut<R>, R: ?Sized,

Mutable access to the AsMut<R> view of a value. Read more
Source§

fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Self
where Self: Deref<Target = T>, T: ?Sized,

Immutable access to the Deref::Target of a value. Read more
Source§

fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Self
where Self: DerefMut<Target = T> + Deref, T: ?Sized,

Mutable access to the Deref::Target of a value. Read more
Source§

fn tap_dbg(self, func: impl FnOnce(&Self)) -> Self

Calls .tap() only in debug builds, and is erased in release builds.
Source§

fn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self

Calls .tap_mut() only in debug builds, and is erased in release builds.
Source§

fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Self
where Self: Borrow<B>, B: ?Sized,

Calls .tap_borrow() only in debug builds, and is erased in release builds.
Source§

fn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Self
where Self: BorrowMut<B>, B: ?Sized,

Calls .tap_borrow_mut() only in debug builds, and is erased in release builds.
Source§

fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Self
where Self: AsRef<R>, R: ?Sized,

Calls .tap_ref() only in debug builds, and is erased in release builds.
Source§

fn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Self
where Self: AsMut<R>, R: ?Sized,

Calls .tap_ref_mut() only in debug builds, and is erased in release builds.
Source§

fn tap_deref_dbg<T>(self, func: impl FnOnce(&T)) -> Self
where Self: Deref<Target = T>, T: ?Sized,

Calls .tap_deref() only in debug builds, and is erased in release builds.
Source§

fn tap_deref_mut_dbg<T>(self, func: impl FnOnce(&mut T)) -> Self
where Self: DerefMut<Target = T> + Deref, T: ?Sized,

Calls .tap_deref_mut() only in debug builds, and is erased in release builds.
Source§

impl<T> TryConv for T

Source§

fn try_conv<T>(self) -> Result<T, Self::Error>
where Self: TryInto<T>,

Attempts to convert self into T using TryInto<T>. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V