On Dec 2, 8:05 pm, Kerry Sainsbury <
ke...@fidelma.com> wrote:
> Could it be that you have a unique index on the column, and you've attempted
> to insert the same value twice...?
Actually, I read something like this in an early topic, and it was not
possible to build a test case. And this is also the second time it
arises.
Because the problem is not in one of my indexes but in one of the
fulltext FT. schema indexes, in which tables and indexes are managed
by the H2 engine.
My opinion is that this is a bug in H2.
I managed to "solve" the problem by deleting all records in the table
FT.WORDS. This is not a sound manipulation. Before I deleted all, I
had 4 entries in that table with ids 1,2,3,5. I don't how the fulltext
engine works. Is that normal that I had that gap in the ids of the
FT.WORDS table ?
Laurent
>
> It would help if you included the definition of your table and its indexes.
-- Initialisation des capacités FullText
CREATE ALIAS IF NOT EXISTS FT_INIT FOR
"org.h2.fulltext.FullText.init";
CALL FT_INIT();
-- Création des tables
CREATE TABLE ENTRY (ID INT NOT NULL IDENTITY,URL VARCHAR(750) NOT
NULL,PATH VARCHAR(500) NOT NULL,FILENAME VARCHAR(250) NOT NULL,RATING
CHAR(2) NOT NULL,SAMPLERATE FLOAT(6) NOT NULL,BITRATE INT NOT
NULL,DESCRIPTION VARCHAR(500),IDTYPE INT,ALLTAGS VARCHAR(2000) NOT
NULL DEFAULT '') ;
CREATE TABLE ENTRYTYPE (ID INT NOT NULL,LABEL VARCHAR(50) NOT NULL) ;
ALTER TABLE ENTRYTYPE ADD CONSTRAINT ENE_PK PRIMARY KEY(ID);
ALTER TABLE ENTRY ADD CONSTRAINT ENY_UK UNIQUE(URL);
ALTER TABLE ENTRY ADD CONSTRAINT ENY_ENE_FK FOREIGN KEY (IDTYPE)
REFERENCES ENTRYTYPE(ID);
-- Les index FullTExt
CALL FT_CREATE_INDEX('PUBLIC', 'ENTRY', 'ALLTAGS');
-- Les types de base
insert into entrytype (id,label) values (1,'RAW');
insert into entrytype (id,label) values (2,'CLEANED');
insert into entrytype (id,label) values (3,'SYNTHESE');
insert into entrytype (id,label) values (4,'MIX');
insert into entrytype (id,label) values (5,'STOMPER');