mirror of
https://github.com/sqlite/sqlite.git
synced 2025-08-05 15:55:57 +03:00
Fix a faulty assert() statement in balance_nonroot() - the assert() should use
get2byteNotZero() instead of get2byte() for the corner case where the number cells is zero on a 65536-byte page. FossilOrigin-Name: bcbe7d96df3c9515f679ccf671ca9ba89d081b53501495d4218eb5126196838b
This commit is contained in:
@@ -8166,7 +8166,8 @@ static int balance_nonroot(
|
||||
rc = defragmentPage(apNew[0], -1);
|
||||
testcase( rc!=SQLITE_OK );
|
||||
assert( apNew[0]->nFree ==
|
||||
(get2byte(&apNew[0]->aData[5])-apNew[0]->cellOffset-apNew[0]->nCell*2)
|
||||
(get2byteNotZero(&apNew[0]->aData[5]) - apNew[0]->cellOffset
|
||||
- apNew[0]->nCell*2)
|
||||
|| rc!=SQLITE_OK
|
||||
);
|
||||
copyNodeContent(apNew[0], pParent, &rc);
|
||||
|
Reference in New Issue
Block a user