aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authordrh <>2024-05-27 19:52:24 +0000
committerdrh <>2024-05-27 19:52:24 +0000
commiteeb8506c18173fb26c0b2d93f89a2a66b90711cc (patch)
treebf7bbef8fd006bc866c34307f463e0ff1e169d1b /src
parentd081df0a5d7e8c14465cb2af596ff9873011947e (diff)
downloadsqlite-eeb8506c18173fb26c0b2d93f89a2a66b90711cc.tar.gz
sqlite-eeb8506c18173fb26c0b2d93f89a2a66b90711cc.zip
The previous check-in was a little two aggressive about skipping the
initialization of entries in the CellArray.ixNx array. Fixed here. FossilOrigin-Name: 1b6d1fbcdecf14bc79dc7b5df50e585d2fcc1484a9987b863c190e8f7ba2c39f
Diffstat (limited to 'src')
-rw-r--r--src/btree.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/btree.c b/src/btree.c
index 1c47ace50..c752b0771 100644
--- a/src/btree.c
+++ b/src/btree.c
@@ -7937,6 +7937,7 @@ static int balance_quick(MemPage *pParent, MemPage *pPage, u8 *pSpace){
b.szCell = &szCell;
b.apEnd[0] = pPage->aDataEnd;
b.ixNx[0] = 2;
+ b.ixNx[NB*2-1] = 0x7fffffff;
rc = rebuildPage(&b, 0, 1, pNew);
if( NEVER(rc) ){
releasePage(pNew);
@@ -8173,7 +8174,7 @@ static int balance_nonroot(
memset(abDone, 0, sizeof(abDone));
assert( sizeof(b) - sizeof(b.ixNx) == offsetof(CellArray,ixNx) );
- memset(&b, 0, sizeof(b)-sizeof(b.ixNx));
+ memset(&b, 0, sizeof(b)-sizeof(b.ixNx[0]));
b.ixNx[NB*2-1] = 0x7fffffff;
pBt = pParent->pBt;
assert( sqlite3_mutex_held(pBt->mutex) );