Hi, This sounds like a bug in the fulltext search. It looks like a concurrency problem. I think I know where the problem is and how to fix it, but I like to verify it really is concurrency.
What is your database URL? Do you use multiple threads / connections to insert or update data? Regards, Thomas On Tue, Dec 1, 2009 at 11:28 PM, lvr123 <[email protected]> wrote: > Hello, > > I get a org.h2.jdbc.JdbcSQLException: Unique index or primary key > violation: CONSTRAINT_INDEX_4 ON FT.WORDS(NAME); when I update the > value of a fulltext indexed field. > > It's the second time I get this. The first time, I just dropped the db > and recreate it. > This I'm willing to grasp what I did wrong and if possible just drop > and recreate the index. > > Can somebody tell what's going on ? > Regards, > > Laurent > > org.h2.jdbc.JdbcSQLException: Unique index or primary key violation: > CONSTRAINT_INDEX_4 ON FT.WORDS(NAME); SQL statement: > INSERT INTO FT.WORDS(NAME) VALUES(?) [23001-118] > at org.h2.message.Message.getSQLException(Message.java:105) > at org.h2.message.Message.getSQLException(Message.java:116) > at org.h2.message.Message.getSQLException(Message.java:75) > at org.h2.index.BaseIndex.getDuplicateKeyException(BaseIndex.java: > 154) > at org.h2.index.BtreeLeaf.add(BtreeLeaf.java:65) > at org.h2.index.BtreeIndex.add(BtreeIndex.java:228) > at org.h2.table.TableData.addRow(TableData.java:125) > at org.h2.command.dml.Insert.update(Insert.java:100) > at org.h2.command.CommandContainer.update(CommandContainer.java:72) > at org.h2.command.Command.executeUpdate(Command.java:208) > at org.h2.jdbc.JdbcPreparedStatement.execute > (JdbcPreparedStatement.java:176) > at org.h2.fulltext.FullText$FullTextTrigger.getWordIds(FullText.java: > 891) > at org.h2.fulltext.FullText$FullTextTrigger.insert(FullText.java:846) > at org.h2.fulltext.FullText$FullTextTrigger.fire(FullText.java:809) > at org.h2.schema.TriggerObject.fireRow(TriggerObject.java:184) > at org.h2.table.Table.fireRow(Table.java:794) > at org.h2.table.Table.fireAfterRow(Table.java:787) > at org.h2.command.dml.Update.update(Update.java:137) > at org.h2.command.CommandContainer.update(CommandContainer.java:72) > at org.h2.command.Command.executeUpdate(Command.java:208) > at org.h2.jdbc.JdbcPreparedStatement.executeUpdateInternal > (JdbcPreparedStatement.java:139) > at org.h2.jdbc.JdbcPreparedStatement.executeUpdate > (JdbcPreparedStatement.java:128) > > -- > > You received this message because you are subscribed to the Google Groups "H2 > Database" group. > To post to this group, send email to [email protected]. > To unsubscribe from this group, send email to > [email protected]. > For more options, visit this group at > http://groups.google.com/group/h2-database?hl=en. > > > -- You received this message because you are subscribed to the Google Groups "H2 Database" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/h2-database?hl=en.
