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

您好请问,解析ibd文件时候如何能获取删除数据的delete-marked标记 #43

Open
fengfengzhang opened this issue Nov 17, 2023 · 1 comment

Comments

@fengfengzhang
Copy link

public static void main(String[] args) {
String createTableSql = "CREATE TABLE tb11\n"
+ "(id int(11) NOT NULL ,\n"
+ "a bigint(20) NOT NULL,\n"
+ "b varchar(64) NOT NULL,\n"
+ "PRIMARY KEY (id),\n"
+ "KEY key_a (a))\n"
+ "ENGINE=InnoDB;";
String ibdFilePath = "/Users/zhangfeng/Desktop/dbtest/tb11.ibd";
try (TableReader reader = new TableReaderImpl(ibdFilePath, createTableSql)) {
reader.open();
List recordList = reader.queryByPageNumber(3);
for (GenericRecord record : recordList) {
Object[] values = record.getValues();
System.out.println(Arrays.asList(values));
assert record.getPrimaryKey() == record.get("id");
RecordHeader header = record.getHeader();
System.out.println("id=" + record.get("id") + ",a=" + record.get("a")+",b=" + record.get("b") +",flag="+header.getInfoFlag());
if (!record.isLeafRecord()) {
System.out.println(record.getChildPageNumber());
}
}

}

无法获取删除的记录,以及delete-marked标记

@fengfengzhang
Copy link
Author

是数据量级的原因吗

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

1 participant