mirror of
https://github.com/FirebirdSQL/firebird.git
synced 2025-01-24 12:03:02 +01:00
Fixed bug CORE-3610 : Can insert DUPLICATE keys in UNIQUE index
This commit is contained in:
parent
eefc7c0b87
commit
2affc6808e
@ -1821,7 +1821,6 @@ bool VIO_get(thread_db* tdbb, record_param* rpb, jrd_tra* transaction, MemoryPoo
|
|||||||
|
|
||||||
|
|
||||||
bool VIO_get_current(thread_db* tdbb,
|
bool VIO_get_current(thread_db* tdbb,
|
||||||
//record_param* old_rpb,
|
|
||||||
record_param* rpb,
|
record_param* rpb,
|
||||||
jrd_tra* transaction,
|
jrd_tra* transaction,
|
||||||
MemoryPool* pool,
|
MemoryPool* pool,
|
||||||
@ -2025,12 +2024,14 @@ bool VIO_get_current(thread_db* tdbb,
|
|||||||
if (rpb->rpb_flags & rpb_deleted)
|
if (rpb->rpb_flags & rpb_deleted)
|
||||||
return !foreign_key;
|
return !foreign_key;
|
||||||
|
|
||||||
if (rpb->rpb_flags & rpb_uk_modified)
|
if (foreign_key)
|
||||||
return !foreign_key;
|
{
|
||||||
|
|
||||||
// clear lock error from status vector
|
// clear lock error from status vector
|
||||||
fb_utils::init_status(tdbb->tdbb_status_vector);
|
fb_utils::init_status(tdbb->tdbb_status_vector);
|
||||||
return true;
|
return !(rpb->rpb_flags & rpb_uk_modified);
|
||||||
|
}
|
||||||
|
|
||||||
|
return !foreign_key;
|
||||||
|
|
||||||
case tra_dead:
|
case tra_dead:
|
||||||
if (transaction->tra_attachment->att_flags & ATT_no_cleanup) {
|
if (transaction->tra_attachment->att_flags & ATT_no_cleanup) {
|
||||||
|
Loading…
Reference in New Issue
Block a user