db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Kathey Marsden <kmarsdende...@sbcglobal.net>
Subject Unusual identity column issue
Date Tue, 02 May 2006 06:16:19 GMT
I have a user report of identity columns getting created with the wrong 
START WITH value with 10.1.2.4.  I have not actually been able to reproduce
yet on my single CPU machine and will follow up to verify the repro on  multiple 
CPU machine, but  I thought I would throw this out there in case it sparked interest 
or insight in anyone, since it is so unusual.

The user has a script that creates a lot of tables, all with START WITH 1.
They run it and two out of three times get a table with a  START WITH value of some large
value, like 
357271994416103177


For example:

"CREATE TABLE 
"APP"."CREA_S_6C3AB6F9B7E4E5573B7DCDB99D4E10CE" ("ID" INTEGER 
NOT NULL GENERATED ALWAYS AS IDENTITY (START WITH 1, INCREMENT 
BY 1));" in relService trace.

is changed to:

"CREATE TABLE 
"APP"."CREA_S_6C3AB6F9B7E4E5573B7DCDB99D4E10CE" ("ID" INTEGER 
NOT NULL GENERATED ALWAYS AS IDENTITY (START WITH 
3572719944161031771, INCREMENT BY 1));" in the exported DDLs.

If they  insert default value into table 
CREA_S_6C3AB6F9B7E4E5573B7DCDB99D4E10CE, a SQL Exception saying 
"SQL Exception: A truncation error was encountered trying to 
shrink ... to length 12." is thrown.

Also dblook reports the ddl with the big START WITH value.

ij < createTables.sql

To check DDLs exported from the database:
>dblook -d 'jdbc:derby:TEST2' -z APP > TEMP_DIR/TEST2.sql

Attached are the files showing this behaviour.

Thanks

Kathey



Mime
View raw message