Skip to content

Commit 962bdd1

Browse files
8232214: Improved internal validations
Reviewed-by: ghb, rhalade
1 parent 2d2b824 commit 962bdd1

File tree

1 file changed

+4
-1
lines changed
  • modules/javafx.web/src/main/native/Source/ThirdParty/sqlite

1 file changed

+4
-1
lines changed

modules/javafx.web/src/main/native/Source/ThirdParty/sqlite/sqlite3.c

+4-1
Original file line numberDiff line numberDiff line change
@@ -105489,7 +105489,9 @@ static void decodeIntArray(
105489105489
if( sqlite3_strglob("unordered*", z)==0 ){
105490105490
pIndex->bUnordered = 1;
105491105491
}else if( sqlite3_strglob("sz=[0-9]*", z)==0 ){
105492-
pIndex->szIdxRow = sqlite3LogEst(sqlite3Atoi(z+3));
105492+
int sz = sqlite3Atoi(z+3);
105493+
if( sz<2 ) sz = 2;
105494+
pIndex->szIdxRow = sqlite3LogEst(sz);
105493105495
}else if( sqlite3_strglob("noskipscan*", z)==0 ){
105494105496
pIndex->noSkipScan = 1;
105495105497
}
@@ -142704,6 +142706,7 @@ static int whereLoopAddBtreeIndex(
142704142706
** it to pNew->rRun, which is currently set to the cost of the index
142705142707
** seek only. Then, if this is a non-covering index, add the cost of
142706142708
** visiting the rows in the main table. */
142709+
assert( pSrc->pTab->szTabRow>0 );
142707142710
rCostIdx = pNew->nOut + 1 + (15*pProbe->szIdxRow)/pSrc->pTab->szTabRow;
142708142711
pNew->rRun = sqlite3LogEstAdd(rLogSize, rCostIdx);
142709142712
if( (pNew->wsFlags & (WHERE_IDX_ONLY|WHERE_IPK))==0 ){

0 commit comments

Comments
 (0)