fix(pag): Incorrect calculation of last used page#8772
fix(pag): Incorrect calculation of last used page#8772dyemanov merged 3 commits intoFirebirdSQL:masterfrom
Conversation
* fix(pag): Incorrect calculation of last used page * Revert "fix(pag): Incorrect calculation of last used page" This reverts commit 91a29a8. * fix(pag): Incorrect calculation of last used page --------- Co-authored-by: Artyom Ivanov <[email protected]>
|
It looks like the patch is incorrect when we are working with the first PIP. Because the first PIP is interpreted as 0 page, the I will prepare a patch with the fix. |
|
|
Yes, but we add |
|
You right, I (wrongly) considered that it should return count of used pages. |
|
Still it is not clear why page zero is different from others and what happen with the gap between the last bit on this page and first bit on the next. |
I'm not quite getting your question, but Vlad explained how |
|
Ugh, yes. What was missed in this explanation was that |
If
pip_usedhas its maximum possible value, we can read over the page buffer.This can lead to incorrect validation of SCN pages when requesting the last used page to calculate the number of SCNs.
v5 and v4 are also affected.