Menu

#156 corrupt database after large number of inserts

4.0.3
closed
None
1
2022-10-29
2022-10-14
No

Hi, I'm seeing the same problem. Run the following, open mdb in Access and try to delete some rows, then get the error message.

File dbFile = new File("test.mdb");
Database db = new DatabaseBuilder(dbFile).setFileFormat(Database.FileFormat.V2000).create();
Table table = new TableBuilder("Test")
        .addColumn(new ColumnBuilder("KEY", DataType.LONG))
        .addIndex(new IndexBuilder(IndexBuilder.PRIMARY_KEY_NAME).addColumns("KEY").setPrimaryKey())
        .toTable(db);
for (int i = 0; i < 100000; i++) {
    table.addRow(i);
}
db.close();

I guess it occurs when the primary key is set and the table size exceeds 2MB.

Discussion

  • James Ahlborn

    James Ahlborn - 2022-10-27

    FYI, i haven't forgotten about this. it is turning out to be a rather tricky bug to track down. good news is that i can reproduce the problem easily. i think i've narrowed down on the probable cause, but still haven't figured out the actual bug.

     
  • James Ahlborn

    James Ahlborn - 2022-10-28
    • status: open --> closed
    • Group: Unassigned --> 4.0.3
     
  • James Ahlborn

    James Ahlborn - 2022-10-28

    that was a nasty one to track down! anyway, it is now fixed in trunk and will be in the 4.0.3 release.

     
  • James Ahlborn

    James Ahlborn - 2022-10-29

    note, the 4.0.3 release process did not complete successfully, so this finally got rolled out as 4.0.4.

     

Log in to post a comment.

MongoDB Logo MongoDB