21.11.2014 12:06, Dimitry Sibiryakov wrote:
>     Hello, All.
>
>     In current trunk if next page is already full, ppg_min_space got frozen, 
> causin
> unnecessary loops in locate_space().

   It is not frozen, of course, but not advanced up to the next non-full slot - 
here
you are correct.

> Following patch fix that:
>
> Index: dpm.epp
> ===================================================================
> --- dpm.epp   (revision 60270)
> +++ dpm.epp   (working copy)
> @@ -3363,8 +3363,11 @@
>       if (flags & dpg_full)
>       {
>               *byte |= bit;
> -             if (slot == ppage->ppg_min_space)
> +             while (slot <= ppage->ppg_min_space &&
> +                             PPG_DP_BIT_TEST((UCHAR*) 
> &ppage->ppg_page[dbb->dbb_dp_per_pp], ppage->ppg_min_space,
> ppg_dp_full))
> +             {
>                       ppage->ppg_min_space++;
> +             }
>       }
>       else
>       {
>

   Sorry, but this is bad code. It doesn't check for number of slots on PP and 
allows
unlimited grow of ppg_min_space. Just imagine case when all slots on PP is 
already marked
as full except one we mark now.

   I'll commit correct version.

Thanks,
Vlad

------------------------------------------------------------------------------
Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
from Actuate! Instantly Supercharge Your Business Reports and Dashboards
with Interactivity, Sharing, Native Excel Exports, App Integration & more
Get technology previously reserved for billion-dollar corporations, FREE
http://pubads.g.doubleclick.net/gampad/clk?id=157005751&iu=/4140/ostg.clktrk
Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel

Reply via email to