8
0
mirror of https://github.com/FirebirdSQL/firebird.git synced 2025-01-24 03:23:03 +01:00

Fixed bug CORE-3610 : Can insert DUPLICATE keys in UNIQUE index

This commit is contained in:
hvlad 2011-09-29 07:45:12 +00:00
parent eefc7c0b87
commit 2affc6808e

View File

@ -1821,7 +1821,6 @@ bool VIO_get(thread_db* tdbb, record_param* rpb, jrd_tra* transaction, MemoryPoo
bool VIO_get_current(thread_db* tdbb,
//record_param* old_rpb,
record_param* rpb,
jrd_tra* transaction,
MemoryPool* pool,
@ -2025,12 +2024,14 @@ bool VIO_get_current(thread_db* tdbb,
if (rpb->rpb_flags & rpb_deleted)
return !foreign_key;
if (rpb->rpb_flags & rpb_uk_modified)
return !foreign_key;
// clear lock error from status vector
fb_utils::init_status(tdbb->tdbb_status_vector);
return true;
if (foreign_key)
{
// clear lock error from status vector
fb_utils::init_status(tdbb->tdbb_status_vector);
return !(rpb->rpb_flags & rpb_uk_modified);
}
return !foreign_key;
case tra_dead:
if (transaction->tra_attachment->att_flags & ATT_no_cleanup) {