From 2f9525b0ffa5790bddf612f9679a2a506ab0aed5 Mon Sep 17 00:00:00 2001 From: drh <> Date: Sun, 5 Feb 2023 00:24:42 +0000 Subject: [PATCH] Changes to the sqlite_dbpage virtual table to tag or remove unreachable branches. FossilOrigin-Name: 12a14711afa6cddbf64d5307fd239fc597027d4356a431ad75836025f4bad83c --- manifest | 14 +++++++------- manifest.uuid | 2 +- src/dbpage.c | 9 ++++----- 3 files changed, 12 insertions(+), 13 deletions(-) diff --git a/manifest b/manifest index aab429fb6d..5c932f94fa 100644 --- a/manifest +++ b/manifest @@ -1,5 +1,5 @@ -C Avoid\srunning\srbu\stests\sunder\spermutation\s"journaltest",\swhich\sdoes\snot\ssupport\swal.\sFix\ssome\sother\stest\sscript\sproblems. -D 2023-02-04T21:25:17.107 +C Changes\sto\sthe\ssqlite_dbpage\svirtual\stable\sto\stag\sor\sremove\sunreachable\nbranches. +D 2023-02-05T00:24:42.233 F .fossil-settings/empty-dirs dbb81e8fc0401ac46a1491ab34a7f2c7c0452f2f06b54ebb845d024ca8283ef1 F .fossil-settings/ignore-glob 35175cdfcf539b2318cb04a9901442804be81cd677d8b889fcc9149c21f239ea F LICENSE.md df5091916dbb40e6e9686186587125e1b2ff51f022cc334e886c19a0e9982724 @@ -568,7 +568,7 @@ F src/callback.c 4cd7225b26a97f7de5fee5ae10464bed5a78f2adefe19534cc2095b3a8ca484 F src/complete.c a3634ab1e687055cd002e11b8f43eb75c17da23e F src/ctime.c 20507cc0b0a6c19cd882fcd0eaeda32ae6a4229fb4b024cfdf3183043d9b703d F src/date.c 94ce83b4cd848a387680a5f920c9018c16655db778c4d36525af0a0f34679ac5 -F src/dbpage.c a7f93c8a849ecdc92c249a9058e23c046a5ee8c70955f33981412177fc2f9225 +F src/dbpage.c 06380a691d648e3920227ef26d40c50a25db78c96dc28dcb1e1803b64222b692 F src/dbstat.c ec92074baa61d883de58c945162d9e666c13cd7cf3a23bc38b4d1c4d0b2c2bef F src/delete.c 86573edae75e3d3e9a8b590d87db8e47222103029df4f3e11fa56044459b514e F src/expr.c 204af6a83c191f5ac19ec4af6ecc546f188cc2dd1c76fc5280982f710ec4b9c4 @@ -2048,8 +2048,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 db875cd6be3b6e0032325cf42e6846eb41a7f099eb4561baf402d914446b052d -R f32e115307aa3bba0c86edbf0076cdff -U dan -Z 07df44deee3876ff47bd4367db1f216b +P 92f018698a87ed32acc31d83f7246dbb7295867bd6a801b7984a16f97a5c7786 +R c5efaf927e05e2e8357ea2b9191faf66 +U drh +Z 5532ecb0e9d2398529e56b0786ba45ba # Remove this line to create a well-formed Fossil manifest. diff --git a/manifest.uuid b/manifest.uuid index e1f0dbbe67..fcbbab3594 100644 --- a/manifest.uuid +++ b/manifest.uuid @@ -1 +1 @@ -92f018698a87ed32acc31d83f7246dbb7295867bd6a801b7984a16f97a5c7786 \ No newline at end of file +12a14711afa6cddbf64d5307fd239fc597027d4356a431ad75836025f4bad83c \ No newline at end of file diff --git a/src/dbpage.c b/src/dbpage.c index 868b7109b3..930139b26b 100644 --- a/src/dbpage.c +++ b/src/dbpage.c @@ -246,7 +246,7 @@ static int dbpageFilter( pCsr->iDb = 0; } pBt = db->aDb[pCsr->iDb].pBt; - if( pBt==0 ) return SQLITE_OK; + if( NEVER(pBt==0) ) return SQLITE_OK; pCsr->pPager = sqlite3BtreePager(pBt); pCsr->szPage = sqlite3BtreeGetPageSize(pBt); pCsr->mxPgno = sqlite3BtreeLastPage(pBt); @@ -389,12 +389,11 @@ static int dbpageBegin(sqlite3_vtab *pVtab){ DbpageTable *pTab = (DbpageTable *)pVtab; sqlite3 *db = pTab->db; int i; - int rc = SQLITE_OK; - for(i=0; rc==SQLITE_OK && inDb; i++){ + for(i=0; inDb; i++){ Btree *pBt = db->aDb[i].pBt; - if( pBt ) rc = sqlite3BtreeBeginTrans(pBt, 1, 0); + (void)sqlite3BtreeBeginTrans(pBt, 1, 0); } - return rc; + return SQLITE_OK; }