Share

HyperSQL Database Engine

Tracker: Bugs

1 SHUTDOWN COMPACT aborts at a TEXT table - ID: 1594826
Last Update: Settings changed ( fredt )

Since my DB.data file continued to grow I discovered
"SHUTDOWN ABORT". Result (embedded DB driver):

--- snip (console output of my program) ----
SQL-DB update with command SHUTDOWN COMPACT
Couldn't shutdown DB.
java.sql.SQLException: error in script file line: 40
Header not allowed or too long in statement [SET TABLE
"Ships4History" SOURCE HEADER "shipclassnumber
"] in statement [SHUTDOWN COMPACT]
at org.hsqldb.jdbc.Util.sqlException(Unknown Source)
at org.hsqldb.jdbc.jdbcStatement.fetchResult(Unknown
Source)
at org.hsqldb.jdbc.jdbcStatement.executeUpdate(Unknown
Source)
at
de.retsiemuab.witpDecoder.HsqlDB.update(HsqlDB.java:119)
at
de.retsiemuab.witpDecoder.gui.MainGuiAdaptor.shutdownDB(MainGuiAdaptor.java
:127)
.....
---- snip ----

The lines of the respective table in the script file
looks as follows:

----- snip ----
CREATE TEXT TABLE "Ships4History"("shiptypeID" TINYINT
DEFAULT 0 NOT NULL,CONSTRAINT SYS_FK_3243 FOREIGN
KEY("shiptypeID") REFERENCES "ShipTypes"("shiptypeID"))
SET TABLE "Ships4History" READONLY TRUE
SET TABLE "Ships4History" SOURCE
"ships4history.csv;ignore_first=true"
SET TABLE "Ships4History" SOURCE HEADER
"shipclassnumber\u000a"
---- snip ----

The last line is line 40.
(note that the table has only one column)

In the csv file there is no such character:
---- snip ----
% od -xc ships4history.csv
0000000 6873 7069 6c63 7361 6e73 6d75 6562 0a72
s h i p c l a s s n u m
b e r \n
0000020 0a31 0a32 0a33 0a34 0a35 0a36 0a37 0a38
1 \n 2 \n 3 \n 4 \n 5 \n 6 \n
7 \n 8 \n
0000040 0a39 3031 310a 0a31 3231 310a 0a36 3931
9 \n 1 0 \n 1 1 \n 1 2 \n 1
6 \n 1 9
0000060 340a 0a31 3234 340a 0a33 3534 340a 0a37
\n 4 1 \n 4 2 \n 4 3 \n 4 5
\n 4 7 \n
0000100
---- snip ---

Maybe HSQLDB has a problem with TEXT tables with only
one column?


Markus Baumeister ( mabap ) - 2006-11-11 21:49

1

Closed

Fixed

Nobody/Anonymous

engine

current-release

Public


Comments ( 3 )

Date: 2009-09-16 01:40
Sender: fredtProject Admin

In 1.8.x, The issue is
SET TABLE "Ships4History" READONLY TRUE
If you set the table back to normal, it can be shutdown compact.

The issue has been fixed in 1.9


Date: 2006-11-12 12:54
Sender: mabap

Logged In: YES
user_id=759495

And a workaround is dropping the table completely before
doing SHUTDOWN COMPACT.
Not much of a problem, since it is read-only anyway.


Date: 2006-11-11 21:57
Sender: mabap

Logged In: YES
user_id=759495

(How does one prevent sourceforge to do the ugly formatting
above :-(

BTW, removing the \u000a from the line does not help. But
the .data file was already removed by hsqldb. May I suggest
that "SHUTDOWN COMPACT" does not remove the .data file
before it has created a new one (Good that there is no real
data in the DB yet)?

BTW2, Removing all lines referencing Ships4History does help.


Attached File

No Files Currently Attached

Changes ( 5 )

Field Old Value Date By
status_id Open 2009-09-16 01:40 fredt
resolution_id None 2009-09-16 01:40 fredt
priority 5 2009-09-16 01:40 fredt
allow_comments 1 2009-09-16 01:40 fredt
close_date - 2009-09-16 01:40 fredt