Disallow the skip-scan optimization in the absence of sqlite_stat1 data.

FossilOrigin-Name: e0c6b8bdb76fcd4f08c89ff20dce6a33ef3c11752e1e919fec5c4e7d423c4b93
This commit is contained in:
drh 2020-02-13 14:51:54 +00:00
parent 0ba3621592
commit ab7fdca2ee
3 changed files with 8 additions and 7 deletions

View File

@ -1,5 +1,5 @@
C Omit\sO_NOFOLLOW\sfrom\sthe\sopen()\scall\swhen\sopening\s/dev/null,\ssince\s/dev/null\nis\sa\ssymlink\son\sSolaris,\swe\sare\stold.
D 2020-02-13T13:45:04.135
C Disallow\sthe\sskip-scan\soptimization\sin\sthe\sabsence\sof\ssqlite_stat1\sdata.
D 2020-02-13T14:51:54.614
F .fossil-settings/empty-dirs dbb81e8fc0401ac46a1491ab34a7f2c7c0452f2f06b54ebb845d024ca8283ef1
F .fossil-settings/ignore-glob 35175cdfcf539b2318cb04a9901442804be81cd677d8b889fcc9149c21f239ea
F LICENSE.md df5091916dbb40e6e9686186587125e1b2ff51f022cc334e886c19a0e9982724
@ -617,7 +617,7 @@ F src/vxworks.h d2988f4e5a61a4dfe82c6524dd3d6e4f2ce3cdb9
F src/wal.c 697424314e40d99f93f548c7bfa526c10e87f4bdf64d5a76a96b999dd7133ebc
F src/wal.h 606292549f5a7be50b6227bd685fa76e3a4affad71bb8ac5ce4cb5c79f6a176a
F src/walker.c a137468bf36c92e64d2275caa80c83902e3a0fc59273591b96c6416d3253d05d
F src/where.c 23c7744a3bd6c7d937fe96e97af6322349ccba93360e0be10cefcdae9f14786f
F src/where.c cbad14f1d8e11b9f052e937274315c7c17266a89eda408c86084ee894debb7d5
F src/whereInt.h 9157228db086f436a574589f8cc5749bd971e94017c552305ad9ec472ed2e098
F src/wherecode.c f5df56e395ade2240cabb2d39500c681bd29f8cc0636c3301c4996ad160df94d
F src/whereexpr.c 4b34be1434183e7bb8a05d4bf42bd53ea53021b0b060936fbd12062b4ff6b396
@ -1858,7 +1858,7 @@ F vsixtest/vsixtest.tcl 6a9a6ab600c25a91a7acc6293828957a386a8a93
F vsixtest/vsixtest.vcxproj.data 2ed517e100c66dc455b492e1a33350c1b20fbcdc
F vsixtest/vsixtest.vcxproj.filters 37e51ffedcdb064aad6ff33b6148725226cd608e
F vsixtest/vsixtest_TemporaryKey.pfx e5b1b036facdb453873e7084e1cae9102ccc67a0
P abfb043ebb0c55fdc2be58255bc852b13865d81fa4c2e0dbe8c375810557aafe
R d4cdcde20a4733b9029c60768cc19b63
P 0c683c43a62fe25c6cb765e4a31556ec91a7c21af79349b3d7eeb13f73dd1cdc
R 39bdd561eec3a8801f1b8b81289ae5e3
U drh
Z 24a71b5d93c7dee64e38be46600d1093
Z 0828bb01d9740c88eea0a472b36dac0f

View File

@ -1 +1 @@
0c683c43a62fe25c6cb765e4a31556ec91a7c21af79349b3d7eeb13f73dd1cdc
e0c6b8bdb76fcd4f08c89ff20dce6a33ef3c11752e1e919fec5c4e7d423c4b93

View File

@ -2732,6 +2732,7 @@ static int whereLoopAddBtreeIndex(
&& saved_nEq+1<pProbe->nKeyCol
&& saved_nEq==pNew->nLTerm
&& pProbe->noSkipScan==0
&& pProbe->hasStat1!=0
&& OptimizationEnabled(db, SQLITE_SkipScan)
&& pProbe->aiRowLogEst[saved_nEq+1]>=42 /* TUNING: Minimum for skip-scan */
&& (rc = whereLoopResize(db, pNew, pNew->nLTerm+1))==SQLITE_OK