From: drh <> Date: Sat, 13 Sep 2025 18:15:26 +0000 (+0000) Subject: Add --enable-dbstat and --enable-dbpage options to configure. Fix the X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=419b93adbfc3d767bd8b2507003d80c4af91088e;p=thirdparty%2Fsqlite.git Add --enable-dbstat and --enable-dbpage options to configure. Fix the ".dbtotxt" command in the CLI so that it uses the correct filename of the database it is rendering as text. FossilOrigin-Name: e04e6e681891020f78237fa6dc11bc2e2022c569b04ac96cb333bf59f1662cd1 --- diff --git a/autosetup/sqlite-config.tcl b/autosetup/sqlite-config.tcl index 9390a76531..44bfe7cfd3 100644 --- a/autosetup/sqlite-config.tcl +++ b/autosetup/sqlite-config.tcl @@ -65,7 +65,7 @@ array set sqliteConfig [subst [proj-strip-hash-comments { # The list of feature --flags which the --all flag implies. This # requires special handling in a few places. # - all-flag-enables {fts4 fts5 rtree geopoly session} + all-flag-enables {fts4 fts5 rtree geopoly session dbpage dbstat} # # Default value for the --all flag. Can hypothetically be modified @@ -220,6 +220,8 @@ proc sqlite-configure {buildMode configScript} { geopoly => {Enable the GEOPOLY extension} rtree => {Enable the RTREE extension} session => {Enable the SESSION extension} + dbpage => {Enable the sqlite3_dbpage extension} + dbstat => {Enable the sqlite3_dbstat extension} all=$::sqliteConfig(all-flag-default) => {$allFlagHelp} largefile=1 => {This legacy flag has no effect on the library but may influence @@ -786,6 +788,8 @@ proc sqlite-handle-common-feature-flags {} { } scanstatus -DSQLITE_ENABLE_STMT_SCANSTATUS {} column-metadata -DSQLITE_ENABLE_COLUMN_METADATA {} + dbpage -DSQLITE_ENABLE_DBPAGE_VTAB {} + dbstat -DSQLITE_ENABLE_DBSTAT_VTAB {} }] { if {$boolFlag ni $::autosetup(options)} { # Skip flags which are in the canonical build but not diff --git a/main.mk b/main.mk index 6304a0ad30..f2f187a176 100644 --- a/main.mk +++ b/main.mk @@ -978,7 +978,6 @@ FUZZCHECK_OPT += \ -DSQLITE_ENABLE_BYTECODE_VTAB \ -DSQLITE_ENABLE_DBPAGE_VTAB \ -DSQLITE_ENABLE_DBSTAT_VTAB \ - -DSQLITE_ENABLE_BYTECODE_VTAB \ -DSQLITE_ENABLE_DESERIALIZE \ -DSQLITE_ENABLE_EXPLAIN_COMMENTS \ -DSQLITE_ENABLE_FTS3_PARENTHESIS \ diff --git a/manifest b/manifest index aecda78b1e..a00c3297a2 100644 --- a/manifest +++ b/manifest @@ -1,5 +1,5 @@ -C Enhance\sthe\sintegerValue()\sroutine\sin\sthe\sCLI\sso\sthat\swhen\sits\stext\sinput\nspecifies\san\sout-of-range\sinteger,\sthe\sroutine\sreturns\sthe\snearest\sinteger\nthat\sis\srepresentable\sas\s64-bit\stwos-complement. -D 2025-09-13T17:53:14.695 +C Add\s--enable-dbstat\sand\s--enable-dbpage\soptions\sto\sconfigure.\s\sFix\sthe\n".dbtotxt"\scommand\sin\sthe\sCLI\sso\sthat\sit\suses\sthe\scorrect\sfilename\sof\nthe\sdatabase\sit\sis\srendering\sas\stext. +D 2025-09-13T18:15:26.632 F .fossil-settings/binary-glob 61195414528fb3ea9693577e1980230d78a1f8b0a54c78cf1b9b24d0a409ed6a x F .fossil-settings/empty-dirs dbb81e8fc0401ac46a1491ab34a7f2c7c0452f2f06b54ebb845d024ca8283ef1 F .fossil-settings/ignore-glob 35175cdfcf539b2318cb04a9901442804be81cd677d8b889fcc9149c21f239ea @@ -47,7 +47,7 @@ F autosetup/find_tclconfig.tcl e64886ffe3b982d4df42cd28ed91fe0b5940c2c5785e126c1 F autosetup/jimsh0.c a57c16e65dcffc9c76e496757cb3f7fb47e01ecbd1631a0a5e01751fc856f049 F autosetup/pkg-config.tcl 4e635bf39022ff65e0d5434339dd41503ea48fc53822c9c5bde88b02d3d952ba F autosetup/proj.tcl ec30c4bc301b6e9eb937655744a7315f863f804fc66400d975bcf9352ac96a1d -F autosetup/sqlite-config.tcl e06b0f64079c4b303a0544f0619f95a1f1f164cddca4068372949eac4149b6ee +F autosetup/sqlite-config.tcl b274cecb070f7e1b85c87b2e00afb0a3f3a28f373d8cd67d34ba40fa81482be7 F autosetup/system.tcl 51d4be76cd9a9074704b584e5c9cbba616202c8468cf9ba8a4f8294a7ab1dba9 F autosetup/teaish/README.txt b40071e6f8506500a2f7f71d5fc69e0bf87b9d7678dd9da1e5b4d0acbf40b1ca F autosetup/teaish/core.tcl aee092fc71986d1272b835ea7492bb55ffc213a289502e4f14da80cf67b7e3c3 @@ -665,7 +665,7 @@ F ext/wasm/tests/opfs/sahpool/sahpool-pausing.js f264925cfc82155de38cecb3d204c36 F ext/wasm/tests/opfs/sahpool/sahpool-worker.js bd25a43fc2ab2d1bafd8f2854ad3943ef673f7c3be03e95ecf1612ff6e8e2a61 F ext/wasm/wasmfs.make 411dd94b40406572caddf88392a1ccc4deed0f88d260516e59ca6e0c887ee861 F magic.txt 5ade0bc977aa135e79e3faaea894d5671b26107cc91e70783aa7dc83f22f3ba0 -F main.mk d865589aa95918787659459f7dddd0680f99034e7b111fc161035d736c670a47 +F main.mk 20fe7a151708fc6b1f8cd0fdcc73622701cff5959131cfb73e1f75d33e687bf8 F mptest/config01.test 3c6adcbc50b991866855f1977ff172eb6d901271 F mptest/config02.test 4415dfe36c48785f751e16e32c20b077c28ae504 F mptest/crash01.test 61e61469e257df0850df4293d7d4d6c2af301421 @@ -742,7 +742,7 @@ F src/random.c 606b00941a1d7dd09c381d3279a058d771f406c5213c9932bbd93d5587be4b9c F src/resolve.c f8d1d011aba0964ff1bdccd049d4d2c2fec217efd90d202a4bb775e926b2c25d F src/rowset.c 8432130e6c344b3401a8874c3cb49fefe6873fec593294de077afea2dce5ec97 F src/select.c b95181711d59c36d9789e67f76c4cfec64b99f9629a50be5e6566e117b87d957 -F src/shell.c.in 694e67b4d8c09a27b5d55696973b0511974a9337906222006529989e40218156 +F src/shell.c.in 458c1a24d19251db547770fac50ae9c94dca42c310f8ecc937e3c587cd76ac8d F src/sqlite.h.in 5732519a2acb09066032ceac21f25996eb3f28f807a4468e30633c7c70faae1c F src/sqlite3.rc 015537e6ac1eec6c7050e17b616c2ffe6f70fca241835a84a4f0d5937383c479 F src/sqlite3ext.h 3f0c4ed6934e7309a61c6f3c30f70a30a5b869f785bb3d9f721a36c5e4359126 @@ -2174,8 +2174,8 @@ F tool/version-info.c 3b36468a90faf1bbd59c65fd0eb66522d9f941eedd364fabccd7227350 F tool/warnings-clang.sh bbf6a1e685e534c92ec2bfba5b1745f34fb6f0bc2a362850723a9ee87c1b31a7 F tool/warnings.sh 1ad0169b022b280bcaaf94a7fa231591be96b514230ab5c98fbf15cd7df842dd F tool/win/sqlite.vsix deb315d026cc8400325c5863eef847784a219a2f -P ead8a3a94e0f349bcdced6a62af0349b0b7b731137c8d33e2ef0e7eecd107c1f -R b1fa16bbc1f849c3ca9135d719410333 +P 5d50279fcb66b479e76586b729f36d389b28940476ff70d61b0066a5d5d3ad0c +R ec35661bf38cafb9e1c47c2c88b185c2 U drh -Z a6d11ba07cbae9bdd6ab42dfdcc5fd47 +Z 41c6f38722d3c29f335c793466d9b943 # Remove this line to create a well-formed Fossil manifest. diff --git a/manifest.uuid b/manifest.uuid index c2f8fe9761..768138d377 100644 --- a/manifest.uuid +++ b/manifest.uuid @@ -1 +1 @@ -5d50279fcb66b479e76586b729f36d389b28940476ff70d61b0066a5d5d3ad0c +e04e6e681891020f78237fa6dc11bc2e2022c569b04ac96cb333bf59f1662cd1 diff --git a/src/shell.c.in b/src/shell.c.in index fc496f5194..08bc810f0a 100644 --- a/src/shell.c.in +++ b/src/shell.c.in @@ -6888,7 +6888,7 @@ static int shell_dbtotxt_command(ShellState *p, int nArg, char **azArg){ sqlite3_finalize(pStmt); pStmt = 0; if( nPage<1 ) goto dbtotxt_error; - rc = sqlite3_prepare_v2(p->db, "PRAGMA databases", -1, &pStmt, 0); + rc = sqlite3_prepare_v2(p->db, "PRAGMA database_list", -1, &pStmt, 0); if( rc ) goto dbtotxt_error; if( sqlite3_step(pStmt)!=SQLITE_ROW ){ zTail = "unk.db"; @@ -6899,6 +6899,7 @@ static int shell_dbtotxt_command(ShellState *p, int nArg, char **azArg){ #if defined(_WIN32) if( zTail==0 ) zTail = strrchr(zFilename, '\\'); #endif + if( zTail && zTail[1]!=0 ) zTail++; } zName = strdup(zTail); shell_check_oom(zName);