Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

提示 index header is unreadable #19

Open
zhangxd-1222 opened this issue Jan 25, 2021 · 3 comments
Open

提示 index header is unreadable #19

zhangxd-1222 opened this issue Jan 25, 2021 · 3 comments

Comments

@zhangxd-1222
Copy link

你好,
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)

@neoremind
Copy link
Collaborator

您好,isl连接是指?

@zhangxd-1222
Copy link
Author

zhangxd-1222 commented Jan 25, 2021

谢谢你的回答。
我没说清楚。
创建表时,有使用 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()); }

@neoremind
Copy link
Collaborator

@zhangxiao1124 这个应该是某个page是空的导致的,可以hexdump一下文件,看下是不是大片的0x00。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants