Hi, Thanks a lot! Yes, I think it is a bug. I have a fix for it now. This is related to a bugfix in version 1.4.179, change log "Referential integrity constraints sometimes used the wrong index, such that updating a row in the referenced table incorrectly failed with a constraint violation." - but the bugfix was not completely correct.
Regards, Thomas On Tuesday, April 21, 2015, Wes Clark <[email protected]> wrote: > Is this something that would be considered a bug and fixable? > > On Friday, April 17, 2015 at 10:41:55 AM UTC-7, Wes Clark wrote: >> >> Yep, that worked. Script attached. If you run in the browser console, >> you can browse the schema and see the two indexes. >> >> On Thursday, April 16, 2015 at 10:43:47 PM UTC-7, Thomas Mueller wrote: >>> >>> Hi, >>> >>> Yes, I think there was a change in this area because of a bug, but I >>> don't fully remember. >>> >>> Could you please create a simple test case that shows the problem? I >>> mean something like: >>> >>> drop all objects; >>> create table parent(id int primary key); >>> create table child(id int primary key, parent_id int, x int); >>> create index y on child(parent_id, x); >>> alter table child add constraint z foreign key(parent_id) references >>> parent(id); >>> script nosettings; >>> >>> Regards, >>> Thomas >>> >>> >>> On Friday, April 17, 2015, Wes Clark <[email protected]> wrote: >>> >>>> My company, Guidewire, is attempting to move from H2 1.2 to 1.4 to take >>>> advantage of the MVStore feature that should greatly reduce deadlocks. >>>> >>>> Is it possible to change the behavior of H2 1.4 so that when a FK >>>> constraint is created it will not also create a single column index on that >>>> column if a multicolumn index already exists with that column as a leading >>>> key? in our case, many of our tables have a RETIRED column that is >>>> non-zero for rows that have been logically deleted. For columns being >>>> turned into a FK, there is already a two column index on the FK column and >>>> RETIRED, so we don't need and or want or expect a separate single column >>>> index on that FK. The behavior seems to have changed since 1.3. >>>> >>>> -- >>>> You received this message because you are subscribed to the Google >>>> Groups "H2 Database" group. >>>> To unsubscribe from this group and stop receiving emails from it, send >>>> an email to [email protected]. >>>> To post to this group, send email to [email protected]. >>>> Visit this group at http://groups.google.com/group/h2-database. >>>> For more options, visit https://groups.google.com/d/optout. >>>> >>> -- > You received this message because you are subscribed to the Google Groups > "H2 Database" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected] > <javascript:_e(%7B%7D,'cvml','h2-database%[email protected]');> > . > To post to this group, send email to [email protected] > <javascript:_e(%7B%7D,'cvml','[email protected]');>. > Visit this group at http://groups.google.com/group/h2-database. > For more options, visit https://groups.google.com/d/optout. > -- You received this message because you are subscribed to the Google Groups "H2 Database" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/h2-database. For more options, visit https://groups.google.com/d/optout.
