{
  "id": "database/mysql-innodb-redo-log-corruption",
  "signature": "InnoDB: Database page corruption on disk or a failed file read of page [page id: space=123, page number=456]. You may have to recover from a backup.",
  "signature_zh": "InnoDB：磁盘上的数据库页损坏或页面文件读取失败 [页 id：space=123, page number=456]。您可能需要从备份中恢复。",
  "regex": "Database page corruption on disk or a failed file read of page",
  "domain": "database",
  "category": "data_error",
  "subcategory": null,
  "root_cause": "InnoDB detected a checksum mismatch on a data page, indicating physical corruption of the ibd file or a failed read due to hardware issues (e.g., bad disk sector, memory corruption).",
  "root_cause_type": "generic",
  "root_cause_zh": "InnoDB 检测到数据页的校验和不匹配，表明 ibd 文件物理损坏或由于硬件问题（例如，坏磁盘扇区、内存损坏）导致读取失败。",
  "versions": [
    {
      "version": "MySQL 8.0",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    },
    {
      "version": "MySQL 8.4",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    },
    {
      "version": "Percona Server 8.0",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    }
  ],
  "os_specific": {},
  "dead_ends": [
    {
      "action": "Restart MySQL without any recovery steps, hoping the corruption is transient",
      "why_fails": "InnoDB will attempt to read the corrupted page again during startup or on access, causing the same error or a crash.",
      "fail_rate": 0.95,
      "condition": "",
      "sources": []
    },
    {
      "action": "Run REPAIR TABLE on the affected table",
      "why_fails": "REPAIR TABLE only works for MyISAM tables; for InnoDB, it returns 'The storage engine for the table doesn't support repair'.",
      "fail_rate": 1.0,
      "condition": "",
      "sources": []
    }
  ],
  "workarounds": [
    {
      "action": "Set innodb_force_recovery to a value between 1 and 6 in my.cnf, then restart MySQL to bypass the corruption and dump the table: mysqldump -u root mydb my_table > dump.sql. After dump, drop and recreate the table, then restore. Example: innodb_force_recovery = 4.",
      "success_rate": 0.75,
      "how": "Set innodb_force_recovery to a value between 1 and 6 in my.cnf, then restart MySQL to bypass the corruption and dump the table: mysqldump -u root mydb my_table > dump.sql. After dump, drop and recreate the table, then restore. Example: innodb_force_recovery = 4.",
      "condition": "",
      "sources": []
    },
    {
      "action": "Restore the affected table from a recent backup using mysqlbinlog or physical backup (e.g., Percona XtraBackup). Example: xtrabackup --prepare --target-dir=/backup; then copy the restored ibd file to the datadir.",
      "success_rate": 0.85,
      "how": "Restore the affected table from a recent backup using mysqlbinlog or physical backup (e.g., Percona XtraBackup). Example: xtrabackup --prepare --target-dir=/backup; then copy the restored ibd file to the datadir.",
      "condition": "",
      "sources": []
    }
  ],
  "workarounds_zh": [
    "Set innodb_force_recovery to a value between 1 and 6 in my.cnf, then restart MySQL to bypass the corruption and dump the table: mysqldump -u root mydb my_table > dump.sql. After dump, drop and recreate the table, then restore. Example: innodb_force_recovery = 4.",
    "Restore the affected table from a recent backup using mysqlbinlog or physical backup (e.g., Percona XtraBackup). Example: xtrabackup --prepare --target-dir=/backup; then copy the restored ibd file to the datadir."
  ],
  "transition_graph": {
    "leads_to": [],
    "preceded_by": [],
    "frequently_confused_with": []
  },
  "official_doc_url": "https://dev.mysql.com/doc/refman/8.0/en/innodb-recovery.html",
  "official_doc_section": null,
  "error_code": null,
  "verification_tier": "ai_generated",
  "confidence": 0.86,
  "fix_success_rate": 0.7,
  "resolvable": "partial",
  "first_seen": "2024-01-22",
  "last_confirmed": "2024-06-01",
  "last_updated": "2024-06-01",
  "evidence_count": 1,
  "tags": [],
  "locale": "en",
  "aliases": []
}