On 31 Gen, 06:58, Thomas Mueller <thomas.tom.muel...@gmail.com> wrote:
> Hi,
>
> Could you verify you are accessing the same database as where the error
> occurs?
>
> Also, to ensure the primary key is set correctly, could you run the
> statement SCRIPT NODATA and check the primary key definition?

Hi Thomas!
I can state for sure that I'm accessing the same database as where the
error occurs. I'm inspecting it using the H2 console run by it.
The structure of the table was extracted using the H2 console.
Moreover, if I try the statement:

SELECT * FROM
   information_schema.COLUMNS
WHERE
  table_name = 'JBOSSTSTXTABLE'

I get the result you can better read at:
https://community.jboss.org/message/647184#647184
(where I'm talking with the JBoss developers to see whether it's a
JBossTS bug or not)

If I do:
SELECT * FROM
   information_schema.CONSTRAINTS
WHERE
  table_name = 'JBOSSTSTXTABLE'

I get an only row with:
CONSTRAINT_CATALOG = OBJECTSTORE
CONSTRAINT_SCHEMA = PUBLIC
CONSTRAINT_NAME = CONSTRAINT_E
CONSTRAINT_TYPE = PRIMARY KEY
TABLE_CATALOG = OBJECTSTORE
TABLE_SCHEMA = PUBLIC
TABLE_NAME = JBOSSTSTXTABLE
UNIQUE_INDEX_NAME = PRIMARY_KEY_E
CHECK_EXPRESSION = null
COLUMN_LIST = UIDSTRING,STATETYPE,TYPENAME
REMARKS = (empty)
SQL = ALTER TABLE PUBLIC.JBOSSTSTXTABLE ADD CONSTRAINT
PUBLIC.CONSTRAINT_E PRIMARY KEY(UIDSTRING, STATETYPE, TYPENAME) INDEX
PUBLIC.PRIMARY_KEY_E
ID = 10

If I try SCRIPT NODATA, as you suggest, I get:

SET CLUSTER '';
SET DEFAULT_TABLE_TYPE 0;
SET WRITE_DELAY 500;
SET DEFAULT_LOCK_TIMEOUT 2000;
SET CACHE_SIZE 16384;
CREATE USER IF NOT EXISTS SA SALT '288f3796da62f235' HASH
'b391b8e34b7b09e4194248bcc48a301cb678da43a2476f1f4101786fde363e8e'
ADMIN;
CREATE CACHED TABLE PUBLIC.JBOSSTSTXTABLE(
    STATETYPE INTEGER NOT NULL,
    TYPENAME VARCHAR(1024) NOT NULL,
    UIDSTRING VARCHAR(255) NOT NULL,
    OBJECTSTATE BYTEA
);
ALTER TABLE PUBLIC.JBOSSTSTXTABLE ADD CONSTRAINT PUBLIC.CONSTRAINT_E
PRIMARY KEY(UIDSTRING, STATETYPE, TYPENAME);
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.JBOSSTSTXTABLE;

Mauro.

-- 
You received this message because you are subscribed to the Google Groups "H2 
Database" group.
To post to this group, send email to h2-database@googlegroups.com.
To unsubscribe from this group, send email to 
h2-database+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/h2-database?hl=en.

Reply via email to