alibaba / alibaba/innodb-java-reader
您好请问,解析ibd文件时候如何能获取删除数据的delete-marked标记
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 496
- Forks
- 122
- PR merge metrics
- No merged PRs in 30d
Description
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标记
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by tracing the TableReaderImpl and TableReader usage shown in the issue, especially queryByPageNumber(3), GenericRecord, and RecordHeader. Determine whether the current reader filters deleted records and whether RecordHeader exposes the delete-marked state; done means deleted records and that marker can be retrieved through the reader API.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java, mysql
- Domain
- databases
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100