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>,
    },
    Checksum {
        file: String,
        verbose: bool,
        json: bool,
        page_size: Option<u32>,
    },
}

Variants§

§

Parse

Parse .ibd file and display page summary

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

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

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

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

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

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+)

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

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

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)

§

Checksum

Validate page checksums

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> 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> 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