Skip to content

Commit

Permalink
Backport #7662: Fix performance issues in prepare_update()
Browse files Browse the repository at this point in the history
Fix an issue where the temporary record is inserted twice in prepare_update() when the record which is being updated has 3 or more fragments
  • Loading branch information
ilya071294 committed Jul 20, 2023
1 parent cce58c0 commit b3e81ab
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/jrd/vio.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1421,6 +1421,8 @@ void VIO_data(thread_db* tdbb, record_param* rpb, MemoryPool* pool)
const ULONG back_page = rpb->rpb_b_page;
const USHORT back_line = rpb->rpb_b_line;
const USHORT save_flags = rpb->rpb_flags;
const ULONG save_f_page = rpb->rpb_f_page;
const USHORT save_f_line = rpb->rpb_f_line;

while (rpb->rpb_flags & rpb_incomplete)
{
Expand All @@ -1432,6 +1434,8 @@ void VIO_data(thread_db* tdbb, record_param* rpb, MemoryPool* pool)
rpb->rpb_b_page = back_page;
rpb->rpb_b_line = back_line;
rpb->rpb_flags = save_flags;
rpb->rpb_f_page = save_f_page;
rpb->rpb_f_line = save_f_line;
}

CCH_RELEASE(tdbb, &rpb->getWindow(tdbb));
Expand Down

0 comments on commit b3e81ab

Please sign in to comment.