1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-11-16 23:02:26 +03:00

Fix an assert in the automatic-index constructor that can be false following

an OOM error.  dbsqlfuzz ee04d66c627ed5b5301e0ce09e24db47e0f1544e.

FossilOrigin-Name: cc6463fe6d23febeea5171f9a1bcb1e5f980f7f44b7e85022d5fd8662b471160
This commit is contained in:
drh
2021-04-07 12:36:58 +00:00
parent 0781219fd2
commit d6a33de77c
3 changed files with 8 additions and 8 deletions

View File

@@ -803,7 +803,7 @@ static void constructAutomaticIndex(
}
}
}
assert( nKeyCol>0 );
assert( nKeyCol>0 || pParse->db->mallocFailed );
pLoop->u.btree.nEq = pLoop->nLTerm = nKeyCol;
pLoop->wsFlags = WHERE_COLUMN_EQ | WHERE_IDX_ONLY | WHERE_INDEXED
| WHERE_AUTO_INDEX;