innodb-java-reader
innodb-java-reader copied to clipboard
提示 index header is unreadable
你好,
sql: CREATE TABLE binance_wallet_address
(id
int(11) NOT NULL,address
varchar(80),is_hot_cold
int(2),PRIMARY KEY (id
),KEY index_address
(address
)) ENGINE=InnoDB;"
ibdfile :binance_wallet_address.ibd
出现下面的错误, ibd 文件与 sql 语句是有效的。唯一的不同点,是 ibd 文件不是创建在 datadir 中的,通过 isl 连接 Index header is unreadable, only new-style compact page format is supported, please make sure the file is a valid InnoDB data file, page=Page#676291(header=FilHeader(checksum=0, pageNumber=0, prevPage=0, nextPage=0, lastModifiedLsn=0, pageType=ALLOCATED, flushLsn=0, spaceId=0)), index.header = IndexHeader(numOfDirSlots=0, heapTopPosition=0, numOfHeapRecords=0, format=REDUNDANT, firstGarbageRecOffset=0, garbageSpace=0, lastInsertPos=0, pageDirection=null, numOfInsertsInPageDirection=0, numOfRecs=0, maxTrxId=0, pageLevel=0, indexId=0)
您好,isl连接是指?
谢谢你的回答。 我没说清楚。 创建表时,有使用 data DIRECTORY='/zfspool/local/mysqld' 。真正的 datadir ="/data/mysql" 所以上面的 ibd 文件不是在 datadir 里拿的,不知这是是导致上面错误的原因。 反正:这ibd 文件,我通过 discard ,import tablespace 没能还原成功。所以才想到读文件方式拿到数据 看上面的报错信息:page=Page#676291 数据总行数是拿到了
发生错误的代码在这儿
if (this.indexHeader.getIndexId() <= 0L && this.indexHeader.getMaxTrxId() <= 0L) { throw new ReaderException("Index header is unreadable, only new-style compact page format is supported, please make sure the file is a valid InnoDB data file, page=" + this.innerPage.toString() + ", index.header = " + this.indexHeader.toString()); }
@zhangxiao1124 这个应该是某个page是空的导致的,可以hexdump一下文件,看下是不是大片的0x00。