pub fn execute(
opts: &InfoOptions,
writer: &mut dyn Write,
) -> Result<(), IdbError>Expand description
Display InnoDB system-level information from the data directory or a live instance.
Operates in three mutually exclusive modes:
-
--ibdata: Reads page 0 ofibdata1(the system tablespace) and decodes its FIL header — checksum, page type, LSN, flush LSN, and space ID. Also attempts to read checkpoint LSNs from the redo log, trying the MySQL 8.0.30+#innodb_redo/#ib_redo*directory first, then falling back to the legacyib_logfile0. This gives a quick snapshot of the system tablespace state without starting MySQL. -
--lsn-check: Compares the LSN from theibdata1page 0 header with the latest redo log checkpoint LSN. If they match, the system is “in sync”; if not, the difference in bytes is reported. This is useful for diagnosing whether InnoDB shut down cleanly or needs crash recovery. -
-D <database> -t <table>(requires themysqlfeature): Connects to a live MySQL instance and queriesINFORMATION_SCHEMA.INNODB_TABLESandINNODB_INDEXESfor the space ID, table ID, index names, and root page numbers. Also parsesSHOW ENGINE INNODB STATUSfor the current log sequence number and transaction ID counter. Connection parameters come from CLI flags or a.my.cnfdefaults file.