Eric
OK I've got a fix for this now. It'll be in the next release.
Your current workaround, adding the BUFFER clause, will only work
sometimes. A more reliable workaround, if this is acceptable, is to
close the database after all the alter table calls and then to reopen
it again.
What's happening is that, the alter table is setting up the wrong disk
read ahead buffer size when the column sizes change. For cached objects
this has no effect (either buffered imports or object caches), but when
it has to read from disk, ir gets all the offsets wrong.
Thanks for your help, and sorry for the inconvenience.
Pete
----- Original Message -----
From: Eric Mackem <mackem@mitre.org>
Date: Thursday, January 11, 2001 1:32 pm
Subject: Re: InstantDB: Illegal string size errors
> Hi Peter,
>
> Thanks for the test script. I was initially also unable to reproduce
> the error,
> but finally ran into it under the conditions noted below. Adding a
> BUFFER
> statement of any size at the end of the IMPORT statement prevents the
> error from
> occuring.
>
> Here is the error message:
>
> Enhydra InstantDB - Version 3.25
> The Initial Developer of the Original Code is Lutris Technologies Inc.
> Portions created by Lutris are Copyright (C) 1997-2000 Lutris
> Technologies, Inc.
>
> All Rights Reserved.
>
> Connected to jdbc:idb:/home/mackem/dbtest/Examples/sample.prp
> Driver InstantDB JDBC Driver
> Version Version 3.25
>
> mySql1.txt drop table airports
> mySql1.txt CREATE TABLE airports( facility_id CHAR(11) )
> mySql1.txt ALTER TABLE airports ADD type CHAR(13)
> mySql1.txt ALTER TABLE airports ADD airport_id CHAR(4)
> mySql1.txt ALTER TABLE airports ADD region CHAR(3)
> mySql1.txt ALTER TABLE airports ADD state_abbrev CHAR(2)
> mySql1.txt ALTER TABLE airports ADD latitude double
> mySql1.txt ALTER TABLE airports ADD longitude double
> mySql1.txt ALTER TABLE airports ADD elevation int
> mySql1.txt ALTER TABLE airports ADD mag_var int
> mySql1.txt IMPORT airports FROM "airports.txt" USING
> "airports_schema.txt"
> mySql1.txt CREATE INDEX airports_airport_id_Index ON airports
> (airport_id)
> mySql1.txt java.sql.SQLException: Problem reading column,
> airport_id, in
> table,
> airports, java.lang.Exception: Illegal string size: 3538997
> mySql1.txt java.sql.SQLException: Problem reading column,
> airport_id, in
> table,
> airports, java.lang.Exception: Illegal string size: 3538997
> java.sql.SQLException: Problem reading column, airport_id, in table,
> airports,
> java.lang.Exception: Illegal string size: 3538997
> at org.enhydra.instantdb.db.SQLProg.execute(SQLProg.java:276)
> at
> org.enhydra.instantdb.jdbc.idbStatement.execute(idbStatement.java:235)
> at
> org.enhydra.instantdb.jdbc.idbStatement.executeUpdate
(idbStatement.java:103)
>
> at org.enhydra.instantdb.SampleThread.run(ScriptTool.java:459)
> at java.lang.Thread.run(Thread.java:484)
> mySql1.txt select * from airports
> mySql1.txt java.sql.SQLException: Problem reading column, facility_id,
> in table,
> airports, java.lang.Exception: Illegal string size: 1459639808
> java.sql.SQLException: Problem reading column, facility_id, in table,
> airports,
> java.lang.Exception: Illegal string size: 1459639808
> at org.enhydra.instantdb.db.SQLProg.execute(SQLProg.java:276)
> at
> org.enhydra.instantdb.jdbc.idbStatement.execute(idbStatement.java:235)
> at
> org.enhydra.instantdb.jdbc.idbStatement.executeQuery
(idbStatement.java:91)
>
> at org.enhydra.instantdb.SampleThread.run(ScriptTool.java:591)
> at java.lang.Thread.run(Thread.java:484)
> mySql1.txt create index i1 on airports (airport_id)
> mySql1.txt java.sql.SQLException: Problem reading column,
> airport_id, in
> table,
> airports, java.lang.Exception: Illegal string size: 3538997
> mySql1.txt java.sql.SQLException: Problem reading column,
> airport_id, in
> table,
> airports, java.lang.Exception: Illegal string size: 3538997
> java.sql.SQLException: Problem reading column, airport_id, in table,
> airports,
> java.lang.Exception: Illegal string size: 3538997
> at org.enhydra.instantdb.db.SQLProg.execute(SQLProg.java:276)
> at
> org.enhydra.instantdb.jdbc.idbStatement.execute(idbStatement.java:235)
> at
> org.enhydra.instantdb.jdbc.idbStatement.executeUpdate
(idbStatement.java:103)
>
> at org.enhydra.instantdb.SampleThread.run(ScriptTool.java:459)
> at java.lang.Thread.run(Thread.java:484)
> Database sample is shutting down...
> Database sample shutdown complete.
>
>
>
>
> This is the script I used:
>
>
>
> d org.enhydra.instantdb.jdbc.idbDriver;
> o jdbc:idb:/home/mackem/dbtest/Examples/sample.prp;
>
>
> drop table airports;
> CREATE TABLE airports( facility_id CHAR(11) );
> ALTER TABLE airports ADD type CHAR(13);
> ALTER TABLE airports ADD airport_id CHAR(4);
> ALTER TABLE airports ADD region CHAR(3);
> ALTER TABLE airports ADD state_abbrev CHAR(2);
> ALTER TABLE airports ADD latitude double;
> ALTER TABLE airports ADD longitude double;
> ALTER TABLE airports ADD elevation int;
> ALTER TABLE airports ADD mag_var int;
>
>
>
> IMPORT airports FROM "airports.txt" USING "airports_schema.txt";
>
>
> CREATE INDEX airports_airport_id_Index ON airports (airport_id);
>
> q select * from airports;
>
>
> create index i1 on airports (airport_id);
>
>
> c close;
> c exit;
>
>
>
>
> Next is airports_schema.txt:
>
> [airports.txt]
> ColNameHeader=False
> CharacterSet=ANSI
> Format=CSVDelimited
> Col1=facility_id CHAR(11)
> Col2=type CHAR(13)
> Col3=airport_id CHAR(4)
> Col4=region CHAR(3)
> Col5=state_abbrev CHAR(2)
> Col6=latitude long
> Col7=longitude long
> Col8=elevation int
> Col9=mag_var int
>
>
> Since my airports.txt file is so long, I will only include a few
> lines,but here are the first 10 lines of data, (out of 20, 000,
> but I had
> troubles with using more than 630 .....but that is another message.)
> The script should produce the error if you have more than 550
> lines of
> similar data. Duplicating these lines should work. I had included
> this email with an attachment for the data file a couple of days ago,
> but for some reason that did not make it onto the message board. The
> script worked OK with 500 or fewer lines.
>
> "27099.*A","AIRPORT","50C","AGL","WI",43.329170277777784,-
> 87.9973125,875,-1
>
> "27099.12*A","AIRPORT","WI62","AGL","WI",43.26945,-
> 87.99814527777778,800,-1
>
> "27099.3*A","AIRPORT","75WI","AGL","WI",43.58888638888889,-
> 87.78425416666667,640,-2
>
> "27099.55*A","AIRPORT","40WI","AGL","WI",44.05829555555555,-
> 91.43070222222222,750,2
> "27101.*A","AIRPORT","30WI","AGL","WI",45.19193055555555,-
> 87.35927777777778,588,-3
>
> "27102.*A","AIRPORT","Y23","AGL","WI",45.306526388888884,-
> 91.63660027777779,1056,0
> "27102.01*A","AIRPORT","WS13","AGL","WI",45.31194444444444,-
> 91.58972222222222,1050,1
> "27106.2*A","AIRPORT","3WI9","AGL","WI",44.99996111111111,-
> 91.38348944444445,940,1
> "27106.21*A","AIRPORT","4WI0","AGL","WI",44.933295,-
> 91.27237416666667,936,1
> "27106.22*H","HELIPORT","WS47","AGL","WI",44.949683611111105,-
> 91.36098888888888,905,1
> "27111.*C","SEAPLANE
> BASE","7WI1","AGL","WI",46.158564166666665,-90.88434833333334,1456,1
>
>
> Hope this helps,
>
> Eric
>
>
> -------------------------------------------------------------------
> ----------
> To unsubscribe from this mailing list, send email to
> majordomo@enhydra.orgwith the text "unsubscribe instantdb" in the
> body of the email.
> If you have other questions regarding this mailing list, send
> email to
> the list admin at owner-instantdb@enhydra.org.
>
-----------------------------------------------------------------------------
To unsubscribe from this mailing list, send email to majordomo@enhydra.org
with the text "unsubscribe instantdb" in the body of the email.
If you have other questions regarding this mailing list, send email to
the list admin at owner-instantdb@enhydra.org.
|