Skip to content

TRUNCATE TABLE seems to corrupt the Database file only after SHUTDOWN DEFRAG #3471

@manticore-projects

Description

@manticore-projects

Greetings.

My observations:

  1. SHUTDOWN DEFRAG --> after that DB can be opened and Table Data can be read
  2. Export to SQL Script and Create new DB from SQL Script --> works flawlessly, new DB can be opened and Table Data can be read

3a) Execute TRUNCATE TABLE .... on all tables and close the DB --> works, but when opening the DB after it throws the Chunk related error message about corruption as shown below.

3b) Execute DELETE FROM .... on the same all table and close the DB --> works and the DB can be opened and Table Data can be read

I can share the 27 MB database SQL file to illustrate this reliably.
H2 Version is 2.2.219

This error only happened, when SHUTDOWN DEFRAG has been executed, without it TRUNCATE TABLE works fine.
Please do let me know any further assistance or information, I should provide.

org.h2.jdbc.JdbcSQLNonTransientException: General error: "Chunk 59 not found [2.2.219/9]"; SQL statement:
CREATE CACHED TABLE "CFE"."EXT_SEC_GL_BALANCE"(
    "CATEGORY" CHARACTER VARYING(14),
    "GL_SUB_HEAD_CODE" CHARACTER VARYING(5),
    "FORACID" CHARACTER VARYING(16),
    "BACID" CHARACTER VARYING(16),
    "ACCT_NAME" CHARACTER VARYING(80),
    "ACCT_SHORT_NAME" CHARACTER VARYING(10),
    "FREE_TEXT" CHARACTER VARYING(240),
    "TRAN_DATE_BAL" NUMERIC(25, 4),
    "VALUE_DATE_BAL" NUMERIC(25, 4),
    "ACCT_CRNCY_CODE" CHARACTER VARYING(3)
) [50000-219]
	at org.h2.message.DbException.getJdbcSQLException(DbException.java:573)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions