GBase 8a查询audit_log表报错 Incorrect file format

GBase 对gssys表,采用本地存储的格式,没有express引擎的副本功能。当出现意外损坏时,比如断电,宕机,死机等导致文件损坏,可以通过repire命令进行修复。

报错现象

ERROR 130 (HY000): Incorrect file format 'audit_log'

解决方案

通过repire table 命令修复时,出现文件损坏 Corrupt,无法修复数据了。

通过repair table XXX USE_FRM进行修复表结构

gbase> repair table audit_log USE_FRM;
+-----------------+--------+----------+-------------------------------------+
| Table           | Op     | Msg_type | Msg_text                            |
+-----------------+--------+----------+-------------------------------------+
| gbase.audit_log | repair | warning  | Number of rows changed from 0 to 15 |
| gbase.audit_log | repair | status   | OK                                  |
+-----------------+--------+----------+-------------------------------------+
2 rows in set (Elapsed: 00:00:00.01)

原因

由于断电,宕机,死机等原因,导致文件损坏。