Minor fixes.

FossilOrigin-Name: ed5afebc410e3d430e2428d35f027bffb218e5f11036a42f97b080153e89016e
This commit is contained in:
drh 2024-02-19 23:58:26 +00:00
parent a1507a3fa0
commit ae71fa5d59
3 changed files with 10 additions and 9 deletions

View File

@ -1,5 +1,5 @@
C Fix\sa\sminor\shiccup\sin\sthe\scomputation\sof\sthe\snumber\sof\sbtrees\sto\sbe\sscanned.
D 2024-02-19T20:47:59.472
C Minor\sfixes.
D 2024-02-19T23:58:26.332
F .fossil-settings/empty-dirs dbb81e8fc0401ac46a1491ab34a7f2c7c0452f2f06b54ebb845d024ca8283ef1
F .fossil-settings/ignore-glob 35175cdfcf539b2318cb04a9901442804be81cd677d8b889fcc9149c21f239ea
F LICENSE.md df5091916dbb40e6e9686186587125e1b2ff51f022cc334e886c19a0e9982724
@ -732,7 +732,7 @@ F src/parse.y bfd6da46fc895cd8237400ff485d04ab0b32e47eb56de20982bb7f53e56c1f42
F src/pcache.c 040b165f30622a21b7a9a77c6f2e4877a32fb7f22d4c7f0d2a6fa6833a156a75
F src/pcache.h 1497ce1b823cf00094bb0cf3bac37b345937e6f910890c626b16512316d3abf5
F src/pcache1.c 602acb23c471bb8d557a6f0083cc2be641d6cafcafa19e481eba7ef4c9ca0f00
F src/pragma.c d0e7832bd99ea1c2695466894401f59fd4589ad98f93285a1d600877d0420070
F src/pragma.c 613d27816d26e9db585fd4a34a627cfb436dc5b63edd73546b0fdaacdfa33772
F src/pragma.h e690a356c18e98414d2e870ea791c1be1545a714ba623719deb63f7f226d8bb7
F src/prepare.c 371f6115cb69286ebc12c6f2d7511279c2e47d9f54f475d46a554d687a3b312c
F src/printf.c d3392b2a20ee314ddeef34fb43c904bf4619eb20ff9a9e07e3950a7e4dcd6912
@ -2162,8 +2162,8 @@ F vsixtest/vsixtest.tcl 6a9a6ab600c25a91a7acc6293828957a386a8a93
F vsixtest/vsixtest.vcxproj.data 2ed517e100c66dc455b492e1a33350c1b20fbcdc
F vsixtest/vsixtest.vcxproj.filters 37e51ffedcdb064aad6ff33b6148725226cd608e
F vsixtest/vsixtest_TemporaryKey.pfx e5b1b036facdb453873e7084e1cae9102ccc67a0
P 0cc93b19de597866292e0696f89fbd0e22a6cbb374678f5cc096fb889210fe3c
R d2d796f1af82f58905d69562436e5dd5
P 91302d9b2720d6b5184e1c24db55d351544adfde4b3d2ddcdc1561f79f11985a
R f5703f8a3a60803127fbc9cadd6a43fe
U drh
Z d7a267289f8d852622ceaa2fe9f0686a
Z 926161dae17b79fd58ce2e39147c492e
# Remove this line to create a well-formed Fossil manifest.

View File

@ -1 +1 @@
91302d9b2720d6b5184e1c24db55d351544adfde4b3d2ddcdc1561f79f11985a
ed5afebc410e3d430e2428d35f027bffb218e5f11036a42f97b080153e89016e

View File

@ -2569,6 +2569,7 @@ void sqlite3Pragma(
sqlite3OpenTable(pParse, iTabCur, iDb, pTab, OP_OpenRead);
sqlite3VdbeAddOp2(v, OP_Rewind, iTabCur,
sqlite3VdbeCurrentAddr(v)+2+(opMask&1));
VdbeCoverage(v);
}
zSubSql = sqlite3MPrintf(db, "ANALYZE \"%w\".\"%w\"",
db->aDb[iDb].zDbSName, pTab->zName);
@ -2587,10 +2588,10 @@ void sqlite3Pragma(
/* In a schema with a large number of tables and indexes, scale back
** the analysis_limit to avoid excess run-time in the worst case.
*/
if( !db->mallocFailed && nBtree>100 ){
if( !db->mallocFailed && nLimit>0 && nBtree>100 ){
int iAddr, iEnd;
VdbeOp *aOp;
int nLimit = 100*SQLITE_DEFAULT_OPTIMIZE_LIMIT/nBtree;
nLimit = 100*nLimit/nBtree;
if( nLimit<100 ) nLimit = 100;
aOp = sqlite3VdbeGetOp(v, 0);
iEnd = sqlite3VdbeCurrentAddr(v);