From: drh Date: Tue, 12 Feb 2019 22:58:32 +0000 (+0000) Subject: Ensure that the nProgressLimit variable is always initialized in X-Git-Tag: version-3.28.0~182 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=82642f815bc9f31af3403fbbdf94d6f8d9ab3615;p=thirdparty%2Fsqlite.git Ensure that the nProgressLimit variable is always initialized in sqlite3VdbeExec(), even if the routine jumps to its exit processing early. FossilOrigin-Name: 167b91df77fff1a84791f6ab5f72239b90475475be690a838248119b6dd312f0 --- diff --git a/manifest b/manifest index 5c73685344..c48ba75e83 100644 --- a/manifest +++ b/manifest @@ -1,5 +1,5 @@ -C Enhancement\sthe\sprogress\scallback\smechanism\sso\sthat\sthe\sprogress\scallback\nis\salways\sinvoked\sat\sleast\sonce\sat\sthe\send\sof\sa\sprepared\sstatement\sif\sthe\s\nopcode\scount\shas\sbeen\sexceeded.\s\sThis\smakes\sthe\sprogress\scallback\smore\neffective\sat\slimiting\srun\stimes.\s\sThis\scheck-in\salso\sincludes\sand\sunrelated\nperformance\senhancement\sto\sOP_Column. -D 2019-02-12T21:04:33.203 +C Ensure\sthat\sthe\snProgressLimit\svariable\sis\salways\sinitialized\sin\nsqlite3VdbeExec(),\seven\sif\sthe\sroutine\sjumps\sto\sits\sexit\sprocessing\searly. +D 2019-02-12T22:58:32.377 F .fossil-settings/empty-dirs dbb81e8fc0401ac46a1491ab34a7f2c7c0452f2f06b54ebb845d024ca8283ef1 F .fossil-settings/ignore-glob 35175cdfcf539b2318cb04a9901442804be81cd677d8b889fcc9149c21f239ea F Makefile.in 178d8eb6840771149cee40b322d1b3be30d330198c522c903c1b66fb5a1bfca4 @@ -585,7 +585,7 @@ F src/upsert.c 0dd81b40206841814d46942a7337786932475f085716042d0cb2fc7791bf8ca4 F src/utf.c 810fbfebe12359f10bc2a011520a6e10879ab2a163bcb26c74768eab82ea62a5 F src/util.c 82a2e3f691a3b654be872e305dab1f455e565dedf5e6a90c818c1ab307c00432 F src/vacuum.c a9f389f41556c0ec310bc9169dc9476603c30a0a913ad92bfbc75c86886967ca -F src/vdbe.c f72cc550d2c63f6d98f00991e6ed18b25232d5b216c059db52aeb73002c8202b +F src/vdbe.c c67c8c46bea825421ee97511328fe1405537b586cbbe4db06e17c4ac5ab4dbed F src/vdbe.h 712bca562eaed1c25506b9faf9680bdc75fc42e2f4a1cd518d883fa79c7a4237 F src/vdbeInt.h a76d5eed62c76bcd8de7afd3147fac1bc40c5a870582664bcd7d071ef437c37f F src/vdbeapi.c 57a2d794a8833f269b878dbc24e955369bdb379af6c4e93ebc5ce1a20fa3daf4 @@ -1804,7 +1804,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 93ae382e97c23c90312739481e47ef7f9bc475a8382c063a2de2986c950c0aec -R 5a73d1580b6ec582f25521606ec44ea5 +P 68cce272e7f7cbc0c319ee8b7ff674d652cb1e95e903d99d848c41dff2b5d304 +R 1dd11fa4b345d5a202cdf255a23d5245 U drh -Z 5e5592ea1699abe7b2bf0590d6631ed0 +Z 5c1fab9a93beb29aa193da2ce5906eed diff --git a/manifest.uuid b/manifest.uuid index 7ef8d1855e..90a8aea4e5 100644 --- a/manifest.uuid +++ b/manifest.uuid @@ -1 +1 @@ -68cce272e7f7cbc0c319ee8b7ff674d652cb1e95e903d99d848c41dff2b5d304 \ No newline at end of file +167b91df77fff1a84791f6ab5f72239b90475475be690a838248119b6dd312f0 \ No newline at end of file diff --git a/src/vdbe.c b/src/vdbe.c index 7ade29cb78..880d16adfe 100644 --- a/src/vdbe.c +++ b/src/vdbe.c @@ -622,6 +622,15 @@ int sqlite3VdbeExec( assert( p->magic==VDBE_MAGIC_RUN ); /* sqlite3_step() verifies this */ sqlite3VdbeEnter(p); +#ifndef SQLITE_OMIT_PROGRESS_CALLBACK + if( db->xProgress ){ + u32 iPrior = p->aCounter[SQLITE_STMTSTATUS_VM_STEP]; + assert( 0 < db->nProgressOps ); + nProgressLimit = db->nProgressOps - (iPrior % db->nProgressOps); + }else{ + nProgressLimit = 0xffffffff; + } +#endif if( p->rc==SQLITE_NOMEM ){ /* This happens if a malloc() inside a call to sqlite3_column_text() or ** sqlite3_column_text16() failed. */ @@ -635,15 +644,6 @@ int sqlite3VdbeExec( db->busyHandler.nBusy = 0; if( db->u1.isInterrupted ) goto abort_due_to_interrupt; sqlite3VdbeIOTraceSql(p); -#ifndef SQLITE_OMIT_PROGRESS_CALLBACK - if( db->xProgress ){ - u32 iPrior = p->aCounter[SQLITE_STMTSTATUS_VM_STEP]; - assert( 0 < db->nProgressOps ); - nProgressLimit = db->nProgressOps - (iPrior % db->nProgressOps); - }else{ - nProgressLimit = 0xffffffff; - } -#endif #ifdef SQLITE_DEBUG sqlite3BeginBenignMalloc(); if( p->pc==0