Compare commits

...

88 Commits

Author SHA1 Message Date
jan.nijtmans 9983442f0d Add the ?ENCODING? parameter to the "db copy" command. If used, it will translate from the given encoding to UTF-8
FossilOrigin-Name: ac27c2f81654f8d6ce8ef084c98b408c8e9e96dbfccc24a4c8d3d8d5190d932d
2025-03-31 11:24:10 +00:00
stephan 227df626e9 Ensure that extension sources also inherit the debugging-related flags from --debug or --dev.
FossilOrigin-Name: 3e96b772a46638bc25e036de053d620ded3350871ee10e06fd6fe51429934b0d
2025-03-31 10:54:09 +00:00
stephan 8620b42245 Correct the ordering of the configure script's handling of the --dev and --debug flags so that --dev's forcing of --debug get picked up early enough.
FossilOrigin-Name: e48189ed33fa9d02b23c18255c7b4c6cab2a6d4b62f7c1edbb0a58ab329735fc
2025-03-31 10:29:06 +00:00
drh 084e61f5cb The --dev option on ./configure implies --debug and adds -DSQLITE_DEBUG.
FossilOrigin-Name: 67dbd9ff0f1e69e429cf3afaf19b84e8e95fc75035ac90cd0ae78d0d002980f8
2025-03-31 09:53:20 +00:00
stephan 39d14d4856 Minor shell-internal doc addition. No functional changes.
FossilOrigin-Name: 01b99c8a2819469568f369479c097cc8e3ed1f2478958460755b283dc7d11706
2025-03-29 11:50:25 +00:00
stephan 2d49219b1c Correct two tests in shell1.test which were broken by the addition of new output in [0f11087b8475].
FossilOrigin-Name: 909dd0a02a967baef46c3efdca42a0ab4e15003e34ce7e9af82fce5f17213d7b
2025-03-28 16:31:54 +00:00
stephan cd1cbd641c CLI shell: make (.output off) an alias for (.output /dev/null) or (.output nul), depending on the platform. Discussed in [forum:633979ce307f1cc6|forum post 633979ce307f1cc6].
FossilOrigin-Name: 0f11087b84753576425823e10a7eeff45af02f3c0135dee72dec5019c8127500
2025-03-28 15:36:49 +00:00
stephan 13a9fb0d21 Configure/make doc tweaks. No functional changes.
FossilOrigin-Name: dbcc03bd7a727f4643f18a814bb9fd9071c0355f98dd064286240f2af361ee7f
2025-03-28 14:32:01 +00:00
drh 257e026de9 Merge cygwin and tclsqlite fixes into trunk.
FossilOrigin-Name: 121f4d97f9a855131859d342bc2ade5f8c34ba7732029ae156d02cec7cb6dd85
2025-03-27 23:29:25 +00:00
stephan 5ee946f907 Add an explicit db close to fix a file-is-opened failure in session1.test in cygwin.
FossilOrigin-Name: c6e4e1cf2b70d2e603ea3faabd9cb5fbd9f5497672574283ace8c62984dfbb97
2025-03-27 18:42:51 +00:00
drh 460e4cb686 Rearrange #includes in FTS3 to avoid a harmless compiler warning.
FossilOrigin-Name: c5206cee83a4f1e59bfceda35cdfa528f9b4611eaf306da863ae83e9f93cdeb7
2025-03-27 18:22:11 +00:00
jan.nijtmans 1f3207a52a Fix for forum-post [/forum/forumpost/b5fde3596c|b5fde3596c]. Also fix encoding issue for non-ASCII characters.
Also includes a fix from Stephan Beal, about a missing <stdint.h> include.

FossilOrigin-Name: e60198001e12f85a5d6504ce72226dfceb8666fe5ec649237fa23ae20e8aa32d
2025-03-27 17:30:49 +00:00
jan.nijtmans d07045119d shell1.test: == => eq
FossilOrigin-Name: 99fdd19193056259d84768f46519328c300976b102f1b1e0b815720df01b28d0
2025-03-27 17:25:38 +00:00
jan.nijtmans 1588d3de37 More ==/!= => eq/ne fixes
FossilOrigin-Name: 2aa6c4fa6c9c47c7a8548ac3493bfb9ed4e4dec1b6dc4f3599a0373086b3e917
2025-03-27 14:37:07 +00:00
jan.nijtmans 87b90921b6 In Tcl, always use eq/ne for comparing strings, not ==/!=
FossilOrigin-Name: f96a5346e3e890adfdc94a682688c2c15893e50fbaf2a26e5ef39cda8b331ee4
2025-03-27 14:32:57 +00:00
jan.nijtmans eb2644024a Merge trunk. Some additional test-fixes for Cygwin
FossilOrigin-Name: b36adadfa202fb8951149561471c3e01085d31e1837c99806f308f234cd24a8e
2025-03-27 14:13:12 +00:00
drh 7b3477c776 Fix an off-by-one bug in the ".dbtotxt" command from the shell that results
in incorrect output.

FossilOrigin-Name: 2345094e879c5538bfea005785ce0848e6d565a49bcb48b323c258d00ccbe9b8
2025-03-27 10:59:18 +00:00
drh 87ceb6ba9e Reduce the delay caused by anti-virus retries in Windows when attempting to
open a database file with insufficient permission.

FossilOrigin-Name: d25c8a6222d4e3f20c137b1490572ad491d9c404ff12947d5867c3e00fcb615c
2025-03-26 22:23:22 +00:00
drh a6f6fa8675 On winOpen(), redo the read-only test on every retry attempt. Just
don't retry the winAccess() call.

FossilOrigin-Name: ccdd67ad9a508530ccfcec582410768c24bca4eb8b05939577fb99a50dd44b15
2025-03-26 17:05:29 +00:00
drh 4a6de7ff7c Further attempted improvements at fast-fail for an inaccessible
database file.

FossilOrigin-Name: cdeb21a312d4f1a9e3009a0baf0af33857c172f7bc22bca047dcd46a03e9c964
2025-03-26 15:51:05 +00:00
drh 517a0e04d1 Attempt to reduce the amount of retry time when trying to open
an inaccessible database file on Windows.  See
[forum:/forumpost/e7991420f54dca50|forum thread e7991420f5]

FossilOrigin-Name: 986e45912cde7cb8e6db8ba7a9364aef7187a23032be64ef6cd573163f56676d
2025-03-26 14:45:15 +00:00
stephan 22d502e33a Merge trunk into cygwin-fixes branch. Add .fossil-settings/binary-glob to squelch warnings about *.db files on Cygwin.
FossilOrigin-Name: a8328b921c5504eceacade417e16e713999eff63978caf3418fd79501590b1cb
2025-03-26 00:02:15 +00:00
stephan 6de1c9d559 Configure script internal cleanups. Factor out the superfluous proj-lshift_ and use lassign instead. Add -ro flag to proj-file-write.
FossilOrigin-Name: 1f98fc07fdf06d699ffbf1521b0b5e937a582017e4325bd994b488e06becbecc
2025-03-25 01:32:16 +00:00
drh b0c3118cad Clarify and reduce redundancy in an assert() in walChecksumBytes().
FossilOrigin-Name: 3c53abf5e6df446d569040042363265737aa10fc8aaa20b31c587100c557c5e7
2025-03-24 23:08:40 +00:00
dan e6e453def6 Test that the sqlite3changeset_apply() function is properly appling indirect changes.
FossilOrigin-Name: 1dadea3a79c3edd110b0b32b07287744300958fed31f2da11901a42b16f86669
2025-03-24 19:58:13 +00:00
dan 1b906dd920 Add test cases to session1.test.
FossilOrigin-Name: dda9d7cf319e74de7703bda1eb77e3e7aa7459d6fa1508cc1d62cdfc7985c368
2025-03-24 11:13:18 +00:00
stephan 49a015092e Correct a --force flag which should be -force in a TCL file delete call. Some TCL versions (like the one on my system) accepts either but others don't. Problem reported in [forum:c02224d862|forum post c02224d862].
FossilOrigin-Name: 172f4e4772d90f4737eddb43d97a566a6e3b92702c61e23391e43134737cc838
2025-03-23 23:04:48 +00:00
stephan f58b2c46d0 Remove tool/tclConfigShToAutoDef.sh, as that functionality was moved into autosetup/proj.tcl so that it can be reused in, e.g., autoconf/tea.
FossilOrigin-Name: c9c5a15d4d8141aae68d6643869f74879ae053cb86538b805058099af2cec16b
2025-03-23 22:49:00 +00:00
stephan 8d80ca2d1c Internal configure refactoring to support an ongoing conversion of ./autoconf/tea to autosetup.
FossilOrigin-Name: e1d483e342670092c3579f2f0975e49a0c74516ae34103a63b4cde156bf5e92b
2025-03-23 21:38:28 +00:00
drh 75484481c7 Fix the generate_series() enhancement from check-in [d50b784807333c54]
so that it works even if the number that "value" is being compared against
is a non-integer floating point number.  Bug reported by
[forum:/forumpost/0d5d63257e3ff4f6|forum post 0d5d63257].

FossilOrigin-Name: c113e31b818d16770bec1edc980f6833dfb27c4d74178e66a778fbb5671c3a13
2025-03-22 22:55:33 +00:00
stephan 3f911b12e6 Replace use of autosetup/lib/*.auto for sqlite-custom-... features to avoid the possibility of multiple files being loaded (in an unpredictable order) for that purpose. Instead look for autosetup/sqlite-custom.tcl and source it if it exists. The intent is that sqlite-custom.tcl only ever be added in vendor-specific branches and never in the trunk.
FossilOrigin-Name: f3c0071284fbe1c0a8c3fe73792a79f9df6be983e5c9bd1a7e2fe71ba7b2d400
2025-03-22 19:07:54 +00:00
stephan bf698fd69d In the post-configure validation, ensure than no more than one autosetup/lib/*.auto file is found, for reasons explained in the validation's error message.
FossilOrigin-Name: 50bbd69a684988a1df4c9c7616b76ae62bc4eb755cde18616de58aa0880fd4a7
2025-03-22 18:41:48 +00:00
stephan 0fce9c935f Slight corrections to the new docs in autosetup/README.md.
FossilOrigin-Name: 55029e41e03d9b61b8a53f86d7f69afe71459846f3a1a1723f6934e0d37ca77f
2025-03-22 17:56:20 +00:00
stephan 77dc2d8fb1 Document the new configuration customization approach and extend it to enable sqlite-custom-flags to return an empty string to denote that it does not require any new flags (it may still customize flag default values in such cases).
FossilOrigin-Name: b0c7800b0106e90cb7bf7e5d9f48d21f9b058eff6e42339a1621d713ab2dd03c
2025-03-22 17:28:29 +00:00
stephan d9535334c6 Teach mkautoconfamal.sh to avoid copying autosetup/local.tcl and autosetup/*.auto except for autosetup/lib/CURRENT-BRANCH-NAME.auto (if any), the intent being to use lib/CURRENT-BRANCH-NAME.auto for branch-specific configuration customizations.
FossilOrigin-Name: dfe24f13c446de5fdd736ed52fec0fca4637b4151ba008de7a598a2fc9398816
2025-03-22 17:00:32 +00:00
stephan 515b51f635 Add a mechanism to the configure script to allow certain client-specific builds to extend or override the configure options without having to edit sqlite-config.tcl, the goal being to reduce merge conflicts in those builds when updating sqlite-config.tcl from the canonical copy.
FossilOrigin-Name: bafab4ee5545c6cf6eafc5e352a7f25dfcbc7e58d4cc9064d05658c39de2af0d
2025-03-22 16:14:34 +00:00
stephan d877b56688 Configure script internal cleanups and re-orgs. No functional changes.
FossilOrigin-Name: f619e40fb05d3e09dca2ad9d9bbf38c66b4b93dd3d4e7c2071db28e671ee6a9c
2025-03-22 12:43:22 +00:00
stephan 51aef0e4da In the autoconf bundle, do not strip binaries during installation, for parity with the canonical build and the legacy build. Discussed in [forum:9a67df63eda9925c|forum post 9a67df63eda9925c]. A potential TODO here is to add a configure flag which either enables or disables stripping.
FossilOrigin-Name: 6d2e57bd34c562a9cd618c178c3f92b869bf5420907057b8d2438b16a7f91d46
2025-03-22 12:15:13 +00:00
stephan 28b7bfc30f Slightly simplify proj-current-proc-name.
FossilOrigin-Name: 6a0ca9f2360d29272d7be97fe9f516c3ac88864f3e729ba65da1ef6211908775
2025-03-21 22:14:30 +00:00
stephan e02fade10b Fix a multi-arg expr call in proj-current-proc-name (must be single-arg for portability).
FossilOrigin-Name: 914768f3f5d63a891e1cd578afc676960376fc28ee0fa452fcd32cec0ea5cdaf
2025-03-21 21:13:44 +00:00
drh 7f4efdcb65 Teach the CLI that VT100-escape codes that do things like change font
colors have zero-width for the purpose of laying out the columns of a
table.

FossilOrigin-Name: 2d0a8a6c38981552748ff5fc2eeba86590e0f116abac260a7fc9318de0a0dbda
2025-03-21 18:15:13 +00:00
stephan 11d5bea210 Flesh out the new proc-debug and its infrastructure a bit.
FossilOrigin-Name: ba7f1ff0d7d1d3fb79fc298d99fd27b65f639fb1691a1a9cdc9c006b8ff41212
2025-03-21 16:49:32 +00:00
stephan eb6997fbac Proxy configure's msg-debug with proc-debug, which works the same except that it prepends the name of the calling proc to the debug message. No functional changes.
FossilOrigin-Name: f0298c773d3490ad3a5b53d2ceeff1bd90e1a7bb5deeba2d24f681ec1bc10510
2025-03-21 16:06:16 +00:00
stephan 315de605af Teach the configure script to be able find a default installation of libreadline on Haiku OS.
FossilOrigin-Name: 260e9884118172ef76457a34042ace301f20abab4ced172f6b6135010c446a68
2025-03-20 13:41:08 +00:00
drh 4c13878ac2 Fix a problem in the sqlite_dbpage() table-valued function when it is
trying to truncate a file in locking-mode=EXCLUSIVE and the file was
obtained via sqlite3_deserialize().  Problem found by dbsqlfuzz.

FossilOrigin-Name: 346cf9794c6ce82ac32f7ccabc67240309306626709951593720abd198b103e3
2025-03-20 11:47:39 +00:00
stephan 339f9a33b4 Correct part of [505d9e49f7] and [7126a51ed8] to get sessioninvert tests working on cygwin.
FossilOrigin-Name: 83c34decbe336c76062e6b1bfe4c2e8f786841a4b6efa001747e786e872c8c71
2025-03-19 15:21:21 +00:00
stephan 18b250e9c9 Correct part of [04075517] which changed the implicit return value of a test function.
FossilOrigin-Name: 505d9e49f7af619eda9e46e7ed19c4446c64628233528e1ab3f70264e1640ace
2025-03-19 14:57:32 +00:00
stephan f715576a6c Add some explicit db close calls to work around a process-reaping timing problem on cygwin builds.
FossilOrigin-Name: 7126a51ed8a1b90b7f4cf3f1c13f7a1d560ff7a3ae73897ce8d9194df40356ed
2025-03-19 14:52:39 +00:00
stephan 52e2a79304 Test script patches from Jan Nijtmans: always use -DUSE_TCL_STUBS in buildtclext.tcl and improvements in how TRG is populated in testrunner.tcl.
FossilOrigin-Name: aa192203aa1aa188866fe00a5d40dc7b7c72b4f38b06da8708ed0a6c8b8638a6
2025-03-19 13:49:34 +00:00
stephan 21aeeb06fe Merge trunk into the cygwin-fixes branch for the shell test improvements on Windows. An MSC build's make test now has zero failures.
FossilOrigin-Name: 2de4efe10c2591192edca3833fc9e2fae10ebc925fb556f5b53ad483b491b5b3
2025-03-19 13:13:12 +00:00
stephan 178edbaa2f Avoid running test cases involving ANSI control characters or Unicode on Windows in a slave interpreter, as that combination does not work.
FossilOrigin-Name: c7fd71c77f1716c9c85d0f41a07ebd7c96f2e9d5e4c1392fefa1fb53f3cbb746
2025-03-19 11:53:46 +00:00
stephan 6e059d9dac Merge trunk into the cygwin-fixes branch.
FossilOrigin-Name: 34eadd374b3c0a8c9e1f5f4a1c60fda8f16b1c56213b8c4047f96390c676b695
2025-03-19 10:14:46 +00:00
drh 8db881d055 Change the generate_series() table-valued function so that its rowid is just an
alias for its value.  This allows it to be used as the RHS operand of a
RIGHT JOIN.  This fixes the issue raised by
[forum:/forumpost/1e17219c88|forum post 1e17219c88].

FossilOrigin-Name: 77db4d85e70fbf358ae2321c2601966666bdb4d971d7c113ce30a3e541458ee8
2025-03-18 20:15:16 +00:00
dan 31fd886576 Fix a problem that could occur when the RHS of an IN operator was a compound SELECT featuring an ORDER BY on a subquery that was flattened into one of the component SELECTs introduced by [baa83b460c677c21]. Forum post [/forumpost/1e17219c88].
FossilOrigin-Name: 7101ccd5331e36fd1a539f540e79ce0ce159be76ec422e1d9436eec6f3908c6e
2025-03-18 19:21:04 +00:00
stephan e435547beb Internal doc touchups in ext/wasm/mkwasmbuilds.c. No functional changes.
FossilOrigin-Name: 47d34260e74912eeae704bff7c4314b893af86ee66dd96a1bc6f450d3e290702
2025-03-18 13:52:53 +00:00
stephan ccda0f008a Very slight simplification of the run-fuzzcheck rules.
FossilOrigin-Name: c858a39fad30c46aec6a1f81b2d4e56c18ecf7f5cb6d2fe4a32c4b3bb1a6ed64
2025-03-18 12:31:09 +00:00
stephan a49265b717 General updates to autosetup/README.md.
FossilOrigin-Name: be8ad5cf579662c54b7e7bc492d8ca03b1f9032c5dad9a6b20590ca1ac00840b
2025-03-18 11:36:15 +00:00
stephan 17df9cd909 Update the docs in tool/mkccode.tcl to reflect that it's more generic than it was when the docs were written. Change the shebang line to use /bin/env tclsh instead of a hard-coded tclsh path.
FossilOrigin-Name: 9300f7f42dfd143f77fd51aa9e080099540854d36b6997ab1a16be7d77f78d8e
2025-03-18 10:28:56 +00:00
drh 7b99cd6063 Prevent integer overflow when parsing NEAR queries in FTS5.
FossilOrigin-Name: 1a5283d7dab210badb8a33eac29f44dc8c1c210ffb5ef84f43e348170aa406a6
2025-03-17 15:13:47 +00:00
stephan 1774ec3ad0 Add support for the --with-wasi-sdk configure flag to the autoconf build.
FossilOrigin-Name: 44880fa3f0748604ef50b942c28390e041138759efea1d076dfcaa1da48970cb
2025-03-17 14:59:55 +00:00
stephan d176ef5881 Fix a long-standing filename digest computation bug in the OPFS SAHPool VFS which caused all VFS-stored filenames to have a digest value of 0. See [/forumpost/042d53c928382021] and for full details.
FossilOrigin-Name: 493cbe74504e8eb1ca8f2edf49fdab6bebc7fe36ffab06932a4b8c5a4eea86cd
2025-03-16 14:05:42 +00:00
stephan ab68965794 Add --asan-fsanitize=... configure flag to the canonical build to optionally set -fsantize flags for the fuzzcheck-asan tool. Teach proj-check-fsanitiz to fail for flags which the compiler emits any warning for, for reasons described in its comments.
FossilOrigin-Name: 013730e9b92af39cb7fd2871df9b4bc81b8990f918892bd79370704421672da0
2025-03-16 13:09:21 +00:00
stephan 539442300c Configure-internal doc cleanups. No functional changes.
FossilOrigin-Name: be3a2e631100b711996b9524a54fc604966513a62d83fc916270a6226da7adab
2025-03-16 12:27:21 +00:00
stephan bafddb17d7 Consolidate some much-duplicated run-fuzzcheck recipe code in main.mk.
FossilOrigin-Name: c0d9b9fad3a2f23941927f1be2abded3bde2f2b04f7a5f3cc0a54a978020ebaa
2025-03-16 11:24:32 +00:00
drh fc293f7c0e Rework the run-fuzzcheck makefile target so that it better exploit parallelism.
Test case "<tt>make -j16 run-fuzzcheck FUZZDB=20250222.db</tt>"
went from 596 seconds down to 107 seconds.

FossilOrigin-Name: 18bda13e197e4b4ec7464b3e70012f71edc05f73d8b14bb48bad452f81c7e185
2025-03-16 00:13:29 +00:00
drh 42db4d043e Enhance the fuzzcheck testing tool with new command-line options:
--brief, and --slice M N.

FossilOrigin-Name: e64132723db0c4f2b9a58932a93beb1671e42006eebc1aeaa8f320e717043051
2025-03-15 23:42:32 +00:00
drh 6e5d59e8ef Make use of the C99 flexible array feature, when available, so that
the -fsanitize=bounds-strict option can be used, when available.
[forum:/forumpost/311dbf9a1cadfae6|Forum thread 311dbf9a1c].

FossilOrigin-Name: d4307a0d43f42e96ec06ad2c1d8d0f5c8ecae759bae8231b1998633089809f49
2025-03-15 19:55:19 +00:00
dan f212fb3362 Speed up parsing of very long fts3 query expressions.
FossilOrigin-Name: 2dd5b6895a3b23c2b9cbf0c1c1e802faf8f2b41ef60819eea25d609755266e64
2025-03-15 16:58:39 +00:00
stephan 9f8a238fb5 Configure-internal build cleanups (no functional changes). Add EXTRA_SRC to the deps of sqlite3.c.
FossilOrigin-Name: 8afb8bbce8654d6f76207fb136e79dc52b6724a71eae82a4c098690a68eb75a1
2025-03-15 15:19:42 +00:00
stephan 5390f95f07 Minor doc corrections for the sahpool-digest fix and merge in current trunk.
FossilOrigin-Name: 500f2e6ec74b4c0e4ac0365ba4e0d81ed6df8dd09dc0f8af65d294c3453f8865
2025-03-14 11:14:52 +00:00
stephan ff3c451428 Document that sqlite_update_hook() can unset the current hook by passing a NULL callback, to address [forum:652aef4747|forum post 652aef4747].
FossilOrigin-Name: 2b582c0097e3374beb280dfa6b03e0dacb9911da1bceb0dce0468e6b7291e74f
2025-03-12 11:41:12 +00:00
drh 72b5c6db35 Avoid running test cases involving ANSI control characters or Unicode
on Windows in a slave interpreter, as that combination does not work.

FossilOrigin-Name: f6745a7355c62ee64c08e23b795f437dd74add903b55e1255c1d03f9a811170d
2025-03-11 15:46:23 +00:00
stephan 1fc7844d40 Teach testrunner.tcl to distinguish Cygwin from Windows. This gets it running but then all downstream tests fail, at least in part because of the build target name discrepancies between the platform which requires .exe and those which do not.
FossilOrigin-Name: 2861788e479aea12354f2d34d8e6a2706d193642674ef1f4f852f24c877e0140
2025-03-11 11:24:52 +00:00
stephan e0fa42053f Merge trunk into the cygwin-fixes branch.
FossilOrigin-Name: f3d14433f24f89558e72a9085c950bc72440e9933d6b4ff59d6e603d25e39422
2025-03-10 17:35:00 +00:00
stephan b37f8b9714 Patch an unnecessary size_t-to-int conversion which warns on some compilers.
FossilOrigin-Name: 8681dfdb59d3258663ec176daafd7a52446a207db21fbd1a4d151508092dcbc5
2025-03-10 15:35:43 +00:00
stephan 4cd6c0b81b Ensure that the 'clean' target for Makefile.msc cleans up the testdir dir, analog to how the canonical makefile works, as stale files there have been leading to test failures.
FossilOrigin-Name: a591c018558af70e0ddfdd2d4d61905f030bac01df19ac9b204aed09d44517be
2025-03-10 15:27:17 +00:00
stephan 42e5ceb093 Reimplement pathname conversion on Cygwin. MSC test passes/failures are on par with trunk and 'make test' running on cygwin is down to a single failure.
FossilOrigin-Name: 57a4de09149663ac001848773c9dffe53e30f9263e4dacc792a0267401147d25
2025-03-10 15:15:13 +00:00
stephan 05ba11fc95 Tweak [6f24da264cf8d] so that it has no side-effects on autoconf/Makefile.msc.
FossilOrigin-Name: d3d322f122e88ea7d7f086f1c7d3ba8ab5ba7c2899d6d1e18b0b593001f01dcf
2025-03-10 14:10:46 +00:00
stephan 49a5da1138 Add tf.bat target to Makefile.msc to facilitate running of individual test scripts via testfixture.exe.
FossilOrigin-Name: 6f24da264cf8d4c9fef706e6ab89e8c002ac4abfb79516f65ff4eb806f864959
2025-03-10 09:54:01 +00:00
stephan 065c0a6120 Test app/script patches from Jan Nijtmans for cygwin. Add/replace many more sentinel arguments for TCL variadic functions which specifically need a NULL trailing argument. With this, 'make test' on cygwin runs to completion for me, with 134 of 329227 tests failing. MSC build fails the same 13 tests which fail for me in trunk.
FossilOrigin-Name: 84d8fcfca19cd183d05a702d0eb1742bfae462d3383a3db72741a48cefac1058
2025-03-08 06:53:06 +00:00
stephan 7b9407af90 os_win.c patches for Cygwin (described in the cygwin-fixes branch wiki page). Makefile.msc's test target on trunk fails the same 13 tests as this branch.
FossilOrigin-Name: 655c60d1926adb552d37441bf9857263eae92e3806a8524e8443b81fdfd8c258
2025-03-07 06:54:04 +00:00
stephan 908c0301d1 Merge trunk into the cygwin-fixes branch (which was inadvertently branched too early).
FossilOrigin-Name: a7863b2e2fbea0ea11c494016b99921f70aae09607868aa65af988cbd173b31a
2025-03-06 14:40:45 +00:00
stephan 8199c8d7a7 Cygwin-centric test script tweaks from Jan Nijtmans.
FossilOrigin-Name: 9868615b7d41179672dde2eafff878d50cf9d647c7050ccf5103e385fd182fc2
2025-03-06 13:49:27 +00:00
stephan b6503f1444 Cygwin-centric fixes from Jan Nijtmans.
FossilOrigin-Name: 205979813c7300debb5f1ba270583ef2f08e069d6d01865b5910702889a5c1ed
2025-03-06 13:38:07 +00:00
stephan 69eaadbee3 Merge trunk into the sahpool-digest branch.
FossilOrigin-Name: fc1eeb7d1f2880907b0fe71a8c572dd7cd74a5d65ec0177332976ad2f8c2b216
2025-02-26 03:32:52 +00:00
stephan d2f7dfa619 More work on the sahpool digest fix. New/fixed versions can read legacy (no digest) files but the reverse is only possible in limited circumstances (when files originated from a legacy version). The burning question is whether the real fix would be to remove this digest check altogether, as it only applies in a very limited context, and the fact that it was broken for some 18 months unnoticed suggests that its value might not be worth the CPU cycles.
FossilOrigin-Name: 0df62b776c68bebb0e187b353b6f29b0a41a29f0a1c8d6728fa6b9f7ce0d13f7
2025-02-26 03:03:08 +00:00
stephan c97abeac0b Add a test app to assist in validating the SAHPool digest calculation fix.
FossilOrigin-Name: a1e304b8020025cc73a658bd8c7697d59b4f3ad96cac0a3e36553a3207d13dc6
2025-02-03 17:21:54 +00:00
stephan 40ce00b546 Initial work on a fix for the SAHPool VFS's effectively-no-op digest calculation, as reported in [https://github.com/sqlite/sqlite-wasm/issues/97|ticket #97 of the downstream npm subproject]. This requires more testing alongside databases created before this version to ensure that it's backwards-compatible.
FossilOrigin-Name: 9234c33f92d92bfddc6211c9c587f1072e70837c0ffe1416ef7d84d59bacd364
2025-02-03 16:26:30 +00:00
141 changed files with 2501 additions and 1100 deletions
+1
View File
@@ -0,0 +1 @@
*.db
+7 -5
View File
@@ -136,9 +136,7 @@ HAVE_WASI_SDK = @HAVE_WASI_SDK@
libsqlite3.DLL.install-rules = @SQLITE_DLL_INSTALL_RULES@
# -fsanitize flags for the fuzzcheck-asap app
CFLAGS.fuzzcheck.fsanitize = @CFLAGS_FUZZCHECK_FSANITIZE@
T.cc.sqlite = $(T.cc) @TARGET_DEBUG@
CFLAGS.fuzzcheck-asan.fsanitize = @CFLAGS_ASAN_FSANITIZE@
#
# Define -D_HAVE_SQLITE_CONFIG_H so that the code knows it
@@ -147,7 +145,12 @@ T.cc.sqlite = $(T.cc) @TARGET_DEBUG@
# main.mk will fill out T.cc.sqlite with additional flags common to
# all builds.
#
T.cc.sqlite += -D_HAVE_SQLITE_CONFIG_H -DBUILD_sqlite
T.cc.sqlite.extras = -D_HAVE_SQLITE_CONFIG_H -DBUILD_sqlite
#
# Intended to either be empty or be set to -g -DSQLITE_DEBUG=1.
#
T.cc.TARGET_DEBUG = @TARGET_DEBUG@
#
# $(JIMSH) and $(CFLAGS.jimsh) are documented in main.mk. $(JIMSH)
@@ -340,5 +343,4 @@ distclean: distclean-autosetup
version-info$(T.exe): $(TOP)/tool/version-info.c Makefile sqlite3.h
$(T.link) $(ST_OPT) -o $@ $(TOP)/tool/version-info.c
IS_CROSS_COMPILING = @IS_CROSS_COMPILING@
include $(TOP)/main.mk
+8 -1
View File
@@ -2593,6 +2593,11 @@ testfixture.exe: $(TESTFIXTURE_SRC) $(TESTFIXTURE_DEP) $(SQLITE3H) $(LIBRESOBJS)
$(TESTFIXTURE_SRC) \
/link $(LDFLAGS) $(LTLINKOPTS) $(TCLLIBPATHS) $(LTLIBPATHS) $(LIBRESOBJS) $(TCLLIBS) $(LTLIBS) $(TLIBS)
# A small helper for manually running individual tests
tf.bat: testfixture.exe Makefile.msc
echo @set PATH=$(LIBTCLPATH);%PATH% > $@
echo .\testfixture.exe %* >> $@
extensiontest: testfixture.exe testloadext.dll
@set PATH=$(LIBTCLPATH);$(PATH)
.\testfixture.exe $(TOP)\test\loadext.test $(TESTOPTS)
@@ -2844,7 +2849,9 @@ clean:
del /Q lsm.dll lsmtest.exe 2>NUL
del /Q atrc.exe changesetfuzz.exe dbtotxt.exe index_usage.exe 2>NUL
del /Q testloadext.dll 2>NUL
del /Q testfixture.exe test.db 2>NUL
del /Q testfixture.exe test.db tf.bat 2>NUL
del /Q /S testdir 2>/NUL
-rmdir /Q /S testdir 2>NUL
del /Q LogEst.exe fts3view.exe rollback-test.exe showdb.exe dbdump.exe 2>NUL
del /Q changeset.exe 2>NUL
del /Q showjournal.exe showstat4.exe showwal.exe speedtest1.exe 2>NUL
+6 -3
View File
@@ -12,7 +12,6 @@
#
# JimTCL: https://jim.tcl.tk
#
use sqlite-config
sqlite-configure canonical {
proj-if-opt-truthy dev {
@@ -25,8 +24,9 @@ sqlite-configure canonical {
# -------------^^^^^^^ intentionally using [get-env] instead of
# [proj-get-env] here because [sqlite-setup-default-cflags] uses
# [proj-get-env] and we want this to supercede that.
sqlite-munge-cflags
sqlite-munge-cflags; # straighten out -DSQLITE_ENABLE/OMIT flags
}
sqlite-handle-debug
sqlite-check-common-bins ;# must come before [sqlite-handle-wasi-sdk]
sqlite-handle-wasi-sdk ;# must run relatively early, as it changes the environment
sqlite-check-common-system-deps
@@ -46,7 +46,10 @@ sqlite-configure canonical {
define LINK_TOOLS_DYNAMICALLY [proj-opt-was-provided dynlink-tools]
define CFLAGS_FUZZCHECK_FSANITIZE [proj-check-fsanitize {address bounds-strict}]
if {[set fsan [join [opt-val asan-fsanitize] ","]] in {auto ""}} {
set fsan address,bounds-strict
}
define CFLAGS_ASAN_FSANITIZE [proj-check-fsanitize [split $fsan ", "]]
sqlite-handle-tcl
sqlite-handle-emsdk
+12 -9
View File
@@ -50,6 +50,7 @@ CC = @CC@
ENABLE_LIB_SHARED = @ENABLE_LIB_SHARED@
ENABLE_LIB_STATIC = @ENABLE_LIB_STATIC@
HAVE_WASI_SDK = @HAVE_WASI_SDK@
CFLAGS = @CFLAGS@ @CPPFLAGS@
#
@@ -71,11 +72,8 @@ LDFLAGS.rt = @LDFLAGS_RT@
LDFLAGS.icu = @LDFLAGS_ICU@
CFLAGS.icu = @CFLAGS_ICU@
# When cross-compiling, we need to avoid the -s flag because it only
# works on the build host's platform.
INSTALL.strip.1 = $(INSTALL)
INSTALL.strip.0 = $(INSTALL) -s
INSTALL.strip = $(INSTALL.strip.@IS_CROSS_COMPILING@)
# INSTALL reminder: we specifically do not strip binaries,
# as discussed in https://sqlite.org/forum/forumpost/9a67df63eda9925c.
INSTALL.noexec = $(INSTALL) -m 0644
install-dir.bin = $(DESTDIR)$(bindir)
@@ -195,6 +193,8 @@ install-dll-unix-generic: install-dll-out-implib
install-dll-msys: install-dll-out-implib $(install-dir.bin)
$(INSTALL) $(libsqlite3.DLL) "$(install-dir.bin)"
# ----------------------------------------------^^^ yes, bin
# Each of {msys,mingw,cygwin} uses a different name for the DLL, but
# that is already accounted for via $(libsqlite3.DLL).
install-dll-mingw: install-dll-msys
install-dll-cygwin: install-dll-msys
@@ -236,11 +236,14 @@ sqlite3$(T.exe): $(TOP)/shell.c $(sqlite3-shell-deps.$(ENABLE_STATIC_SHELL))
$(CFLAGS) $(CFLAGS.readline) $(CFLAGS.icu) \
$(LDFLAGS) $(LDFLAGS.readline)
all: sqlite3$(T.exe)
sqlite3$(T.exe)-1:
sqlite3$(T.exe)-0: sqlite3$(T.exe)
all: sqlite3$(T.exe)-$(HAVE_WASI_SDK)
install-shell: sqlite3$(T.exe) $(install-dir.bin)
$(INSTALL.strip) sqlite3$(T.exe) "$(install-dir.bin)"
install: install-shell
install-shell-0: sqlite3$(T.exe) $(install-dir.bin)
$(INSTALL) sqlite3$(T.exe) "$(install-dir.bin)"
install-shell-1:
install: install-shell-$(HAVE_WASI_SDK)
install-headers: $(TOP)/sqlite3.h $(install-dir.include)
$(INSTALL.noexec) $(TOP)/sqlite3.h $(TOP)/sqlite3ext.h "$(install-dir.include)"
+12 -1
View File
@@ -5,6 +5,17 @@
# "autoconf" bundle of the SQLite project.
use sqlite-config
sqlite-configure autoconf {
sqlite-check-common-bins
sqlite-handle-debug
sqlite-check-common-bins ;# must come before [sqlite-handle-wasi-sdk]
sqlite-handle-wasi-sdk ;# must run relatively early, as it changes the environment
sqlite-check-common-system-deps
proj-define-for-opt static-shell ENABLE_STATIC_SHELL \
"Link library statically into the CLI shell?"
if {![opt-bool shared] && ![opt-bool static-shell]} {
proj-opt-set shared 1
proj-indented-notice {
NOTICE: ignoring --disable-shared because --disable-static-shell
was specified.
}
}
}
+117 -44
View File
@@ -14,7 +14,9 @@ build infrastructure. It is not an [Autosetup][] reference.
- Symbolic Names of Feature Flags
- Do Not Update Global Shared State
- [Updating Autosetup](#updating)
- [Patching Autosetup for Project-local changes](#patching)
- ***[Patching Autosetup for Project-local changes](#patching)***
- [Branch-specific Customization](#branch-customization)
------------------------------------------------------------------------
@@ -42,12 +44,13 @@ following files:
(e.g. Fossil), and personal projects of SQLite's developers. It is
essentially an amalgamation of a decade's worth of autosetup-related
utility code.
- [auto.def][]: the primary driver for the `./configure` process.
When we talk about "the configure script," we're referring to
this file.
- [sqlite-config.tcl][]: utility code which is too project-specific
for `proj.tcl`. We split this out of `auto.def` so that it can be
used by both `auto.def` and...
- [auto.def][]: the primary driver for the `./configure` process.
When we talk about "the configure script," we're technically
referring to this file, though it actually contains very little
of the TCL code.
- [autoconf/auto.def][]: the main driver script for the "autoconf"
bundle's configure script. It is essentially a slightly trimmed-down
version of the main `auto.def` file. The `autoconf` dir was ported
@@ -61,11 +64,11 @@ Autosetup API Tips
This section briefly covers only APIs which are frequently useful in
day-to-day maintenance and might not be immediately recognized as such
obvious from a casual perusal of the relevant TCL files. The complete
docs of those with `proj-` prefix can be found in [proj.tcl][] and
those with an `sqlite-` prefix are in [sqlite-config.tcl][]. The
others are scattered around [the TCL files in
./autosetup](/dir/autosetup).
from a casual perusal of the relevant TCL files. The complete docs of
those with `proj-` prefix can be found in [proj.tcl][] and those with
an `sqlite-` prefix are in [sqlite-config.tcl][]. The others are part
of Autosetup's core packages and are scattered around [the TCL files
in ./autosetup](/dir/autosetup).
In (mostly) alphabetical order:
@@ -83,19 +86,14 @@ In (mostly) alphabetical order:
Works like `get-env` but will, if that function finds no match,
look for a file named `./.env-$VAR` and, if found, return its
trimmed contents. This can be used, e.g., to set a developer's
local preferences for the default `CFLAGS`.
- **`define-for-opt flag defineName ?checkingMsg? ?yesVal=1? ?noVal=0?`**\
`[define $defineName]` to either `$yesVal` or `$noVal`, depending on
whether `--$flag` is truthy or not. `$checkingMsg` is a
human-readable description of the check being made, e.g. "enable foo?"
If no `checkingMsg` is provided, the operation is silent.\
Potential TODO: change the final two args to `-yes` and `-no`
flags. They're rarely needed, though: search [auto.def][] for
`TSTRNNR_OPTS` for an example of where they are used.
local preferences for the default `CFLAGS`.\
Tip: adding `-O0` to `.env-CFLAGS` reduces rebuild times
considerably at the cost of performance in `make devtest` and the
like.
- **`proj-fatal msg`**\
Emits `$msg` to stderr and exits with non-zero.
Emits `$msg` to stderr and exits with non-zero. Its differences from
autosetup's `user-error` are purely cosmetic.
- **`proj-if-opt-truthy flag thenScript ?elseScript?`**\
Evals `thenScript` if the given `--flag` is truthy, else it
@@ -117,7 +115,10 @@ In (mostly) alphabetical order:
else 0. This distinction can be used to determine, e.g., whether
`--with-readline` was provided or whether we're searching for
readline by default. In the former case, failure to find it should
be treated as fatal, where in the latter case it's not.
be treated as fatal, where in the latter case it's not.\
Unlike most functions which deal with `--flags`, this one does not
validate that `$FLAG` is a registered flag so will not fail fatally
if `$FLAG` is not registered as an Autosetup option.
- **`proj-val-truthy value`**\
Returns 1 if `$value` is "truthy," See `proj-opt-truthy` for the definition
@@ -139,6 +140,15 @@ In (mostly) alphabetical order:
The shell-specific counterpart of `sqlite-add-feature-flag` which
only adds the given flag(s) to the CLI-shell-specific CFLAGS.
- **`sqlite-configure BUILD-NAME {script}`**\
This is where all configure `--flags` are defined for all known
build modes ("canonical" or "autoconf"). After processing all flags,
this function runs `$script`, which contains the build-mode-specific
configuration bits, and then runs any finalization bits which are
common to all build modes. The `auto.def` files are intended to contain
exactly two commands:
`use sqlite-config; sqlite-configure BUILD-NAME {script}`
- **`user-notice msg`**\
Queues `$msg` to be sent to stderr, but does not emit it until
either `show-notices` is called or the next time autosetup would
@@ -152,13 +162,18 @@ In (mostly) alphabetical order:
Ensuring TCL Compatibility
========================================================================
It is important that any TCL files used by the configure process
remain compatible with both [JimTCL][] and the canonical TCL. Though
JimTCL has outstanding compatibility with canonical TCL, it does have
a few corners with incompatibilities, e.g. regular expressions. If a
script runs in JimTCL without using any JimTCL-specific features, then
it's a certainty that it will run in canonical TCL as well. The
opposite, however, is not _always_ the case.
One of the significant benefits of using Autosetup is that (A) this
project uses many TCL scripts in the build process and (B) Autosetup
comes with a TCL interpreter named [JimTCL][].
It is important that any TCL files used by the configure process and
makefiles remain compatible with both [JimTCL][] and the canonical
TCL. Though JimTCL has outstanding compatibility with canonical TCL,
it does have a few corners with incompatibilities, e.g. regular
expressions. If a script runs in JimTCL without using any
JimTCL-specific features, then it's a certainty that it will run in
canonical TCL as well. The opposite, however, is not _always_ the
case.
When [`./configure`](/file/configure) is run, it goes through a
bootstrapping process to find a suitable TCL with which to run the
@@ -187,14 +202,17 @@ compatibility across TCL implementations:
before looking for a system-level `tclsh`. Be aware, though, that
`make distclean` will remove that file.
**Note that `jimsh0` is distinctly different from the `jimsh`** which
gets built for code-generation purposes. The latter requires
**Note that `./jimsh0` is distinctly different from the `./jimsh`**
which gets built for code-generation purposes. The latter requires
non-default build flags to enable features which are
platform-dependent, most notably to make its `[file normalize]` work.
This means, for example, that the configure script and its utility
APIs must not use `[file normalize]`, but autosetup provides a
TCL-only implementation of `[file-normalize]` (note the dash) for
portable use in the configure script.
portable use in the configure script. Contrariwise, code-generation
scripts invoked via `make` may use `[file normalize]`, as they'll use
`./jimsh` or `tclsh` instead of `./jimsh0`.
Known TCL Incompatibilities
------------------------------------------------------------------------
@@ -221,6 +239,7 @@ A summary of known incompatibilities in JimTCL
- `regsub` does not support the `\y` flag. A workaround is demonstrated
in [](/info/c2e5dd791cce3ec4).
<a name="conventions"></a>
Design Conventions
========================================================================
@@ -247,8 +266,9 @@ dots are not permitted.
The `X.y` convention is used in the makefiles primarily because the
person who did the initial port finds that considerably easier on the
eyes and fingers. In practice, the `X_Y` form of such exports is used
exactly once in [Makefile.in][], where it's translated into into `X.y`
form for consumption by [Makefile.in][] and [main.mk][]. For example:
exactly once in [Makefile.in][], where it's translated from `@X_Y@`
into into `X.y` form for consumption by [Makefile.in][] and
[main.mk][]. For example:
>
```
@@ -265,9 +285,9 @@ of taste, for which there is no accounting.)
Do Not Update Global Shared State
------------------------------------------------------------------------
In both the legacy Autotools-driven build and in common Autosetup
usage, feature tests performed by the configure script may amend
global flags such as `LIBS`, `LDFLAGS`, and `CFLAGS`[^as-cflags]. That's
In both the legacy Autotools-driven build and common Autosetup usage,
feature tests performed by the configure script may amend global flags
such as `LIBS`, `LDFLAGS`, and `CFLAGS`[^as-cflags]. That's
appropriate for a makefile which builds a single deliverable, but less
so for makefiles which produce multiple deliverables. Drawbacks of
that approach include:
@@ -275,8 +295,8 @@ that approach include:
- It's unlikely that every single deliverable will require the same
core set of those flags.
- It can be difficult to determine the origin of any given change to
that global state because those changes are hidden behind voodoo performed
outside the immediate visibility of the configure script's
that global state because those changes are hidden behind voodoo
performed outside the immediate visibility of the configure script's
maintainer.
- It can force the maintainers of the configure script to place tests
in a specific order so that the resulting flags get applied at
@@ -357,17 +377,70 @@ Patching Autosetup for Project-local Changes
Autosetup reserves the flag name **`--debug`** for its own purposes,
and its own special handling of `--enable-...` flags makes `--debug`
an alias for `--enable-debug`. As we have a long history of using
`--enable-debug` for this project's own purposes, we patch autosetup
to use the name `--autosetup-debug` in place of `--debug`. That
requires (as of this writing) four small edits in
[](/file/autosetup/autosetup), as demonstrated in [check-in
3296c8d3](/info/3296c8d3).
an alias for `--enable-debug`. As this project has a long history of
using `--enable-debug`, we patch autosetup to use the name
`--autosetup-debug` in place of `--debug`. That requires (as of this
writing) four small edits in [](/file/autosetup/autosetup), as
demonstrated in [check-in 3296c8d3](/info/3296c8d3).
If autosetup is upgraded and this patch is _not_ applied the invoking
`./configure` will fail loudly because of the declaration of the
`debug` flag in `auto.def` - duplicated flags are not permitted.
<a name="branch-customization"></a>
Branch-specific Customization
========================================================================
Certain vendor-specific branches require slight configure script
customization. Rather than editing `sqlite-config.tcl` for this,
which frequently leads to merge conflicts, the following approach
is recommended:
In the vendor-specific branch, create a file named
`autosetup/sqlite-custom.tcl`.
That file should contain the following content...
If flag customization is required, add:
>
```
proc sqlite-custom-flags {} {
# If any existing --flags require different default values
# then call:
options-defaults {
flag-name new-default-value
...
}
# ^^^ That will replace the default value but will not update
# the --help text, which may lead to some confusion:
# https://github.com/msteveb/autosetup/issues/77
return {
{*} {
new-flag-name => {Help text}
...
}
}; #see below
}
```
That function must return either an empty string or a list in the form
used internally by `sqlite-config.tcl:sqlite-configure`.
Next, define:
>
```
proc sqlite-custom-handle-flags {} {
... do any custom flag handling here ...
}
```
That function, if defined, will be called relatively late in the
configure process, before any filtered files are generated but after
all other significant processing.
[Autosetup]: https://msteveb.github.io/autosetup/
[auto.def]: /file/auto.def
+126 -41
View File
@@ -64,6 +64,7 @@ proc proj-warn {msg} {
show-notices
puts stderr "WARNING: $msg"
}
########################################################################
# @proj-error msg
#
@@ -75,22 +76,22 @@ proc proj-fatal {msg} {
}
########################################################################
# @proj-assert script
# @proj-assert script ?message?
#
# Kind of like a C assert: if uplevel (eval) of [expr {$script}] is
# false, a fatal error is triggered. The error message, by default,
# includes the body of the failed assertion, but if $descr is set then
# includes the body of the failed assertion, but if $msg is set then
# that is used instead.
proc proj-assert {script {descr ""}} {
proc proj-assert {script {msg ""}} {
if {1 == [get-env proj-assert 0]} {
msg-result [proj-bold "asserting: $script"]
}
set x "expr \{ $script \}"
if {![uplevel 1 $x]} {
if {"" eq $descr} {
set descr $script
if {"" eq $msg} {
set msg $script
}
proj-fatal "Assertion failed: $descr"
proj-fatal "Assertion failed: $msg"
}
}
@@ -111,6 +112,7 @@ proc proj-bold {str} {
# @proj-indented-notice ?-error? ?-notice? msg
#
# Takes a multi-line message and emits it with consistent indentation.
# It does not perform any line-wrapping of its own.
#
# If the -notice flag it used then it emits using [user-notice], which
# means its rendering will (A) go to stderr and (B) be delayed until
@@ -163,30 +165,13 @@ proc proj-is-cross-compiling {} {
}
########################################################################
# proj-lshift_ shifts $count elements from the list named $listVar
# and returns them as a new list. On empty input, returns "".
# @proj-strip-hash-comments value
#
# Modified slightly from: https://wiki.tcl-lang.org/page/lshift
proc proj-lshift_ {listVar {count 1}} {
upvar 1 $listVar l
if {![info exists l]} {
# make the error message show the real variable name
error "can't read \"$listVar\": no such variable"
}
if {![llength $l]} {
# error Empty
return ""
}
set r [lrange $l 0 [incr count -1]]
set l [lreplace $l [set l 0] $count]
return $r
}
########################################################################
# Expects to receive string input, which it splits on newlines, strips
# out any lines which begin with any number of whitespace followed by
# a '#', and returns a value containing the [append]ed results of each
# remaining line with a \n between each.
# remaining line with a \n between each. It does not strip out
# comments which appear after the first non-whitespace character.
proc proj-strip-hash-comments {val} {
set x {}
foreach line [split $val \n] {
@@ -221,8 +206,8 @@ proc proj-cflags-without-werror {{var CFLAGS}} {
#
# - Does not make any global changes to the LIBS define.
#
# - Strips out -W... warning flags from CFLAGS before running the
# test, as these feature tests will often fail if -Werror is used.
# - Strips out the -Werror flag from CFLAGS before running the test,
# as these feature tests will often fail if -Werror is used.
#
# Returns the result of cc-check-function-in-lib (i.e. true or false).
# The resulting linker flags are stored in the [define] named
@@ -476,16 +461,16 @@ proc proj-opt-define-bool {args} {
set invert 0
if {[lindex $args 0] eq "-v"} {
set invert 1
set args [lrange $args 1 end]
lassign $args - optName defName descr
} else {
lassign $args optName defName descr
}
set optName [proj-lshift_ args]
set defName [proj-lshift_ args]
set descr [proj-lshift_ args]
if {"" eq $descr} {
set descr $defName
}
puts "optName=$optName defName=$defName descr=$descr"
set rc 0
msg-checking "$descr ... "
msg-checking "[join $descr] ... "
if {[proj-opt-truthy $optName]} {
if {0 eq $invert} {
set rc 1
@@ -591,7 +576,7 @@ proc proj-file-content {args} {
set trim 1
lassign $args - fname
}
set fp [open $fname r]
set fp [open $fname rb]
set rc [read $fp]
close $fp
if {$trim} { return [string trim $rc] }
@@ -604,7 +589,7 @@ proc proj-file-content {args} {
# Returns the contents of the given file as an array of lines, with
# the EOL stripped from each input line.
proc proj-file-content-list {fname} {
set fp [open $fname r]
set fp [open $fname rb]
set rc {}
while { [gets $fp line] >= 0 } {
lappend rc $line
@@ -613,6 +598,31 @@ proc proj-file-content-list {fname} {
return $rc
}
########################################################################
# @proj-file-write ?-ro? fname content
#
# Works like autosetup's [writefile] but explicitly uses binary mode
# to avoid EOL translation on Windows. If $fname already exists, it is
# overwritten, even if it's flagged as read-only.
proc proj-file-write {args} {
if {"-ro" eq [lindex $args 0]} {
lassign $args ro fname content
} else {
set ro ""
lassign $args fname content
}
file delete -force -- $fname; # in case it's read-only
set f [open $fname wb]
puts -nonewline $f $content
close $f
if {"" ne $ro} {
catch {
exec chmod -w $fname
#file attributes -w $fname; #jimtcl has no 'attributes'
}
}
}
########################################################################
# @proj-check-compile-commands ?configFlag?
#
@@ -679,12 +689,17 @@ proc proj-make-from-dot-in {args} {
}
foreach f $filename {
set f [string trim $f]
catch { exec chmod u+w $f }
if {[file exists $f]} {
catch { exec chmod u+w $f }
}
make-template $f.in $f
if {$touch} {
proj-touch $f
}
catch { exec chmod -w $f }
catch {
exec chmod -w $f
#file attributes -w $f; #jimtcl has no 'attributes'
}
}
}
@@ -742,7 +757,7 @@ proc proj-looks-like-windows {{key host}} {
# These apply only to the local OS, not a cross-compilation target,
# as the above check potentially can.
if {$::autosetup(iswin)} { return 1 }
if {[find-an-executable cygpath] ne "" || $::tcl_platform(os)=="Windows NT"} {
if {[find-an-executable cygpath] ne "" || $::tcl_platform(os) eq "Windows NT"} {
return 1
}
}
@@ -1037,12 +1052,22 @@ proc proj-check-soname {{libname "libfoo.so.0"}} {
# Checks whether CC supports -fsanitize=X, where X is each entry of
# the given list of flags. If any of those flags are supported, it
# returns the string "-fsanitize=X..." where X... is a comma-separated
# list of all supported flags. If none of the given options are
# supported then it returns an empty string.
# list of all flags from the original set which are supported. If none
# of the given options are supported then it returns an empty string.
#
# Example:
#
# set f [proj-check-fsanitize {address bounds-check just-testing}]
#
# Will, on many systems, resolve to "-fsanitize=address,bounds-check",
# but may also resolve to "-fsanitize=address".
proc proj-check-fsanitize {{opts {address bounds-strict}}} {
set sup {}
foreach opt $opts {
cc-with {} {
# -nooutput is used because -fsanitize=hwaddress will otherwise
# pass this test on x86_64, but then warn at build time that
# "hwaddress is not supported for this target".
cc-with {-nooutput 1} {
if {[cc-check-flags "-fsanitize=$opt"]} {
lappend sup $opt
}
@@ -1353,3 +1378,63 @@ proc proj-env-file {flag {dflt ""}} {
proc proj-get-env {var {dflt ""}} {
return [get-env $var [proj-env-file $var $dflt]]
}
########################################################################
# @proj-current-proc-name
#
# Returns the name of the _calling_ proc from ($lvl + 1) levels up the
# call stack (where the caller's level will be 1 up from _this_
# call). It is not legal to call this from the top scope.
proc proj-current-proc-name {{lvl 0}} {
#uplevel [expr {$lvl + 1}] {lindex [info level 0] 0}
lindex [info level [expr {-$lvl - 1}]] 0
}
########################################################################
# Converts parts of tclConfig.sh to autosetup [define]s.
#
# Expects to be passed the name of a value tclConfig.sh or an empty
# string. It converts certain parts of that file's contents to
# [define]s (see the code for the whole list). If $tclConfigSh is an
# empty string then it [define]s the various vars as empty strings.
proc proj-tclConfig-sh-to-autosetup {tclConfigSh} {
set shBody {}
set tclVars {
TCL_INCLUDE_SPEC
TCL_LIB_SPEC
TCL_STUB_LIB_SPEC
TCL_EXEC_PREFIX
TCL_PREFIX
TCL_VERSION
}
# Build a small shell script which proxies the $tclVars from
# $tclConfigSh into autosetup code...
lappend shBody "if test x = \"x${tclConfigSh}\"; then"
foreach v $tclVars {
lappend shBody "$v= ;"
}
lappend shBody "else . \"${tclConfigSh}\"; fi"
foreach v $tclVars {
lappend shBody "echo define $v {\$$v} ;"
}
lappend shBody "exit"
set shBody [join $shBody "\n"]
#puts "shBody=$shBody\n"; exit
if {0} {
# This doesn't work but would be preferable to using a temp file...
set fd [open "| sh" "rw"]
#puts "fd = $fd"; exit
puts $fd $shBody
flush $fd
set rd [read $fd]
close $fd
puts "rd=$rd"; exit 1
eval $rd
} else {
set shName ".tclConfigSh.tcl"
proj-file-write $shName $shBody
eval [exec sh $shName $tclConfigSh]
file delete -force $shName
}
}
+241 -183
View File
@@ -1,6 +1,6 @@
# This file holds functions for autosetup which are specific to the
# sqlite build tree. They are in this file, instead of auto.def, so
# that they can be reused in the TEA sub-tree. This file requires
# that they can be reused in the autoconf sub-tree. This file requires
# functions from proj.tcl.
if {[string first " " $autosetup(srcdir)] != -1} {
@@ -11,11 +11,13 @@ if {[string first " " $autosetup(builddir)] != -1} {
user-error "The pathname of the build directory\
may not contain space characters"
}
#parray ::autosetup; exit 0
use proj
# We want this version info to be emitted up front, but we have to
# 'use system' for --prefix=... to work. Ergo, this bit is up here
# instead of in [sqlite-configure].
#
# We want the package version info to be emitted early on, but doing
# so requires a bit of juggling. We have to [use system] for
# --prefix=... to work and to emit the Host/Build system info, but we
# don't want those to interfere with --help output.
define PACKAGE_VERSION [proj-file-content -trim $::autosetup(srcdir)/VERSION]
if {"--help" ni $::argv} {
msg-result "Configuring SQLite version [get-define PACKAGE_VERSION]"
@@ -24,20 +26,27 @@ use system ; # Will output "Host System" and "Build System" lines
if {"--help" ni $::argv} {
msg-result "Source dir = $::autosetup(srcdir)"
msg-result "Build dir = $::autosetup(builddir)"
use cc cc-db cc-shared cc-lib pkg-config
}
#
# Object for communicating config-time state across various
# Object for communicating certain config-time state across various
# auto.def-related pieces.
#
array set sqliteConfig [proj-strip-hash-comments {
array set sqliteConfig [subst [proj-strip-hash-comments {
#
# Gets set by [sqlite-configure] (the main configure script driver).
build-mode unknown
#
# Gets set to 1 when using jimsh for code generation. May affect
# later decisions.
use-jim-for-codegen 0
#
# Set to 1 when cross-compiling This value may be changed by certain
# build options, so it's important that config code which checks for
# cross-compilation uses this var instead of
# [proj-is-cross-compiling].
is-cross-compiling [proj-is-cross-compiling]
#
# Pass msg-debug=1 to configure to enable obnoxiously loud output
# from [msg-debug].
msg-debug-enabled 0
@@ -50,26 +59,31 @@ array set sqliteConfig [proj-strip-hash-comments {
# (dump-defines-txt) but also a JSON file named after this option's
# value.
dump-defines-json ""
}]
#
# Set to 1 when cross-compiling This value may be changed by certain
# build options, so it's important that config code which checks for
# cross-compilation uses this var instead of
# [proj-is-cross-compiling].
#
set sqliteConfig(is-cross-compiling) [proj-is-cross-compiling]
}]]
########################################################################
# Processes all configure --flags for this build $buildMode must be
# either "canonical" or "autoconf", and others may be added in the
# Processes all configure --flags for this build, run build-specific
# config checks, then finalize the configure process. $buildMode must
# be one of (canonical, autoconf), and others may be added in the
# future. After bootstrapping, $configScript is eval'd in the caller's
# scope, then post-configuration finalization is run. $configScript is
# intended to hold configure code which is specific to the given
# $buildMode, with the caveat that _some_ build-specific code is
# encapsulated in the configuration finalization step.
#
# The intent is that all (or almost all) build-mode-specific
# configuration goes inside the $configScript argument to this
# function, and that an auto.def file contains only two commands:
#
# use sqlite-config
# sqlite-configure BUILD_NAME { build-specific configure script }
#
# There are snippets of build-mode-specific decision-making in
# [sqlite-configure-finalize]
proc sqlite-configure {buildMode configScript} {
set allBuildModes {canonical autoconf}
proj-assert {$::sqliteConfig(build-mode) eq "unknown"} \
"sqlite-configure must not be called more than once"
set allBuildModes {canonical autoconf tcl-extension}
if {$buildMode ni $allBuildModes} {
user-error "Invalid build mode: $buildMode. Expecting one of: $allBuildModes"
}
@@ -131,7 +145,7 @@ proc sqlite-configure {buildMode configScript} {
########################################################################
set allFlags {
# Structure: a list of M {Z} pairs, where M is a descriptive
# option group name and Z is a list of X Y pairs. X is a list of
# option group name and Z is a list of X Y pairs. X is a list of
# $buildMode name(s) to which the Y flags apply, or {*} to apply
# to all builds. Y is a {block} in the form expected by
# autosetup's [options] command. Each block which is applicable
@@ -151,7 +165,7 @@ proc sqlite-configure {buildMode configScript} {
# Options for how to build the library
build-modes {
{*} {
{canonical autoconf} {
shared=1 => {Disable build of shared library}
static=1 => {Disable build of static library}
}
@@ -165,12 +179,9 @@ proc sqlite-configure {buildMode configScript} {
{*} {
threadsafe=1 => {Disable mutexing}
with-tempstore:=no => {Use an in-RAM database for temporary tables: never,no,yes,always}
largefile=1
=> {This legacy flag has no effect on the library but may influence
the contents of the generated sqlite_cfg.h}
# ^^^ It's not clear that this actually does anything, as
# HAVE_LFS is not checked anywhere in the .c/.h/.in files.
load-extension=1 => {Disable loading of external extensions}
# ^^^ one of the downstream custom builds overrides the load-extension default to 0, which
# confuses the --help text generator. https://github.com/msteveb/autosetup/issues/77
math=1 => {Disable math functions}
json=1 => {Disable JSON functions}
memsys5 => {Enable MEMSYS5}
@@ -183,12 +194,22 @@ proc sqlite-configure {buildMode configScript} {
rtree => {Enable the RTREE extension}
session => {Enable the SESSION extension}
all => {Enable FTS4, FTS5, Geopoly, RTree, Sessions}
largefile=1
=> {This legacy flag has no effect on the library but may influence
the generated sqlite_cfg.h by adding #define HAVE_LFS}
}
}
# Options for TCL support
tcl {
{canonical} {
tcl=1
=> {Disable components which require TCL, including all tests.
This tree requires TCL for code generation but can use the in-tree
copy of autosetup/jimsh0.c for that. The SQLite TCL extension and the
test code require a canonical tclsh.}
}
{canonical tcl-extension} {
with-tcl:DIR
=> {Directory containing tclConfig.sh or a directory one level up from
that, from which we can derive a directory containing tclConfig.sh.
@@ -199,17 +220,12 @@ proc sqlite-configure {buildMode configScript} {
tclConfig.sh and (B) all TCL-based code generation. Warning: if
its containing dir has multiple tclsh versions, it may select the
wrong tclConfig.sh!}
tcl=1
=> {Disable components which require TCL, including all tests.
This tree requires TCL for code generation but can use the in-tree
copy of autosetup/jimsh0.c for that. The SQLite TCL extension and the
test code require a canonical tclsh.}
}
}
# Options for line-editing modes for the CLI shell
line-editing {
{*} {
{canonical autoconf} {
readline=1
=> {Disable readline support}
# --with-readline-lib is a backwards-compatible alias for
@@ -251,12 +267,12 @@ proc sqlite-configure {buildMode configScript} {
# Options for exotic/alternative build modes
alternative-builds {
{canonical} {
# Potential TODO: add --with-wasi-sdk support to the autoconf
# build
{canonical autoconf} {
with-wasi-sdk:=/opt/wasi-sdk
=> {Top-most dir of the wasi-sdk for a WASI build}
}
{canonical} {
with-emsdk:=auto
=> {Top-most dir of the Emscripten SDK installation.
Needed only by ext/wasm. Default=EMSDK env var.}
@@ -274,7 +290,7 @@ proc sqlite-configure {buildMode configScript} {
static-shell=1
=> {Link the sqlite3 shell app against the DLL instead of embedding sqlite3.c}
}
{*} {
{canonical autoconf} {
# A potential TODO without a current use case:
#rpath=1 => {Disable use of the rpath linker flag}
# soname: https://sqlite.org/src/forumpost/5a3b44f510df8ded
@@ -295,9 +311,9 @@ proc sqlite-configure {buildMode configScript} {
# out-implib: https://sqlite.org/forum/forumpost/0c7fc097b2
out-implib:=auto
=> {Enable use of --out-implib linker flag to generate an
"import library" for the DLL. The output's base name name is
specified by the value, with "auto" meaning to figure out a
name automatically. On some platforms this flag gets
"import library" for the DLL. The output's base name is
specified by this flag's value, with "auto" meaning to figure
out a name automatically. On some platforms this flag gets
automatically enabled if it is not provided. Use "none" to
explicitly disable this feature on such platforms.}
}
@@ -330,6 +346,10 @@ proc sqlite-configure {buildMode configScript} {
=> {Enable #line macros in the amalgamation}
dynlink-tools
=> {Dynamically link libsqlite3 to certain tools which normally statically embed it}
asan-fsanitize:=auto
=> {Comma- or space-separated list of -fsanitize flags for use with the
fuzzcheck-asan tool. Only those which the compiler claims to support
will actually be used. May be provided multiple times.}
}
{*} {
dump-defines=0
@@ -337,9 +357,31 @@ proc sqlite-configure {buildMode configScript} {
(for build debugging)}
}
}
}; # $allOpts
}; # $allFlags
# Filter allOpts to create the set of [options] legal for this build
set allFlags [proj-strip-hash-comments $allFlags]
# ^^^ lappend of [sqlite-custom-flags] introduces weirdness if
# we delay [proj-strip-hash-comments] until after that.
########################################################################
# sqlite-custom.tcl is intended only for vendor-branch-specific
# customization. See autosetup/README.md#branch-customization for
# details.
if {[file exists $::autosetup(libdir)/sqlite-custom.tcl]} {
uplevel 1 {source $::autosetup(libdir)/sqlite-custom.tcl}
}
if {[llength [info proc sqlite-custom-flags]] > 0} {
# sqlite-custom-flags is assumed to be imported via
# autosetup/sqlite-custom.tcl.
set scf [sqlite-custom-flags]
if {"" ne $scf} {
lappend allFlags sqlite-custom-flags $scf
}
}
# Filter allFlags to create the set of [options] legal for this build
set opts {}
foreach {group XY} [subst -nobackslashes -nocommands \
[proj-strip-hash-comments $allFlags]] {
@@ -359,90 +401,30 @@ proc sqlite-configure {buildMode configScript} {
dict incr xopts -level
return {*}$xopts $msg
}
sqlite-post-options-init
sqlite-configure-phase1 $buildMode
uplevel 1 $configScript
sqlite-configure-finalize
}; # sqlite-configure
########################################################################
# Performs late-stage config steps common to both the canonical and
# autoconf bundle builds.
proc sqlite-configure-finalize {} {
set buildMode $::sqliteConfig(build-mode)
set isCanonical [expr {$buildMode eq "canonical"}]
set isAutoconf [expr {$buildMode eq "autoconf"}]
define HAVE_LFS 0
if {[opt-bool largefile]} {
#
# Insofar as we can determine HAVE_LFS has no effect on the
# library. Perhaps it did back in the early 2000's. The
# --enable/disable-largefile flag is retained because it's
# harmless, but it doesn't do anything useful. It does have
# visible side-effects, though: the generated sqlite_cfg.h may (or
# may not) define HAVE_LFS.
#
cc-check-lfs
}
if {$isCanonical} {
if {![opt-bool static]} {
proj-indented-notice {
NOTICE: static lib build may be implicitly re-activated by
other components, e.g. some test apps.
}
}
} else {
proj-assert { $isAutoconf } "Invalid build mode"
proj-define-for-opt static-shell ENABLE_STATIC_SHELL \
"Link library statically into the CLI shell?"
if {![opt-bool shared] && ![opt-bool static-shell]} {
proj-opt-set shared 1
proj-indented-notice {
NOTICE: ignoring --disable-shared because --disable-static-shell
was specified.
}
}
}
proj-define-for-opt shared ENABLE_LIB_SHARED "Build shared library?"
proj-define-for-opt static ENABLE_LIB_STATIC "Build static library?"
sqlite-handle-debug
sqlite-handle-rpath
sqlite-handle-soname
sqlite-handle-threadsafe
sqlite-handle-tempstore
sqlite-handle-line-editing
sqlite-handle-load-extension
sqlite-handle-math
sqlite-handle-icu
sqlite-handle-env-quirks
sqlite-process-dot-in-files
sqlite-post-config-validation
sqlite-dump-defines
}; # sqlite-configure-finalize
########################################################################
# Runs some common initialization which must happen immediately after
# autosetup's [options] function is called. This is also a convenient
# place to put some generic pieces common to both the canonical
# top-level build and the "autoconf" build, but it's not intended to
# be a catch-all dumping ground for such.
proc sqlite-post-options-init {} {
define PACKAGE_NAME "sqlite"
# Runs "phase 1" of the configure process: after initial --flags
# handling but before the build-specific parts are run. $buildMode
# must be the mode which was passed to [sqlite-configure].
proc sqlite-configure-phase1 {buildMode} {
define PACKAGE_NAME sqlite
define PACKAGE_URL {https://sqlite.org}
define PACKAGE_BUGREPORT [get-define PACKAGE_URL]/forum
define PACKAGE_STRING "[get-define PACKAGE_NAME] [get-define PACKAGE_VERSION]"
#
# Carry values from hidden --flag aliases over to their canonical
# flag forms. This list must include only options which are common
# to both the top-level auto.def and autoconf/auto.def.
#
proj-xfer-options-aliases {
# Carry values from hidden --flag aliases over to their canonical
# flag forms. This list must include only options which are common
# to all build modes supported by [sqlite-configure].
with-readline-inc => with-readline-cflags
with-readline-lib => with-readline-ldflags
with-debug => debug
}
set ::sqliteConfig(msg-debug-enabled) [proj-val-truthy [get-env msg-debug 0]]
proc-debug "msg-debug is enabled"
sqlite-autoreconfig
proj-file-extensions
if {".exe" eq [get-define TARGET_EXEEXT]} {
@@ -452,8 +434,52 @@ proc sqlite-post-options-init {} {
define SQLITE_OS_UNIX 1
define SQLITE_OS_WIN 0
}
set ::sqliteConfig(msg-debug-enabled) [proj-val-truthy [get-env msg-debug 0]]
sqlite-setup-default-cflags
define HAVE_LFS 0
if {[opt-bool largefile]} {
#
# Insofar as we can determine HAVE_LFS has no effect on the
# library. Perhaps it did back in the early 2000's. The
# --enable/disable-largefile flag is retained because it's
# harmless, but it doesn't do anything useful. It does have
# visible side-effects, though: the generated sqlite_cfg.h may (or
# may not) define HAVE_LFS.
cc-check-lfs
}
}; # sqlite-configure-phase1
########################################################################
# Performs late-stage config steps common to all supported
# $::sqliteConfig(build-mode) values.
proc sqlite-configure-finalize {} {
sqlite-handle-rpath
sqlite-handle-soname
sqlite-handle-threadsafe
sqlite-handle-tempstore
sqlite-handle-load-extension
sqlite-handle-math
sqlite-handle-icu
if {[proj-opt-exists readline]} {
sqlite-handle-line-editing
}
if {[proj-opt-exists shared]} {
proj-define-for-opt shared ENABLE_LIB_SHARED "Build shared library?"
}
if {[proj-opt-exists static]} {
if {![proj-define-for-opt static ENABLE_LIB_STATIC "Build static library?"]} {
# This notice really only applies to the canonical build...
proj-indented-notice {
NOTICE: static lib build may be implicitly re-activated by
other components, e.g. some test apps.
}
}
}
sqlite-handle-env-quirks
sqlite-handle-common-feature-flags
sqlite-finalize-feature-flags
sqlite-process-dot-in-files; # do not [define] anything after this
sqlite-post-config-validation
sqlite-dump-defines
}
########################################################################
@@ -464,15 +490,20 @@ proc msg-debug {msg} {
puts stderr [proj-bold "** DEBUG: $msg"]
}
}
########################################################################
# A [msg-debug] proxy which prepends the name of the current proc to
# the debug message. It is not legal to call this from the global
# scope.
proc proc-debug {msg} {
msg-debug "\[[proj-current-proc-name 1]\]: $msg"
}
########################################################################
# Sets up the SQLITE_AUTORECONFIG define.
proc sqlite-autoreconfig {} {
#
# SQLITE_AUTORECONFIG contains make target rules for re-running the
# configure script with the same arguments it was initially invoked
# with. This can be used to automatically reconfigure
#
# with. This can be used to automatically reconfigure.
set squote {{arg} {
# Wrap $arg in single-quotes if it looks like it might need that
# to avoid mis-handling as a shell argument. We assume that $arg
@@ -507,6 +538,8 @@ proc sqlite-add-feature-flag {args} {
define-append OPT_FEATURE_FLAGS {*}$args
}
}
########################################################################
# Appends $args, if not empty, to OPT_SHELL.
proc sqlite-add-shell-opt {args} {
if {"" ne $args} {
@@ -544,14 +577,16 @@ proc sqlite-check-common-bins {} {
########################################################################
# Run checks for system-level includes and libs which are common to
# both the canonical build and the "autoconf" bundle.
#
# For the canonical build this must come after
# [sqlite-handle-wasi-sdk], as that function may change the
# environment in ways which affect this.
proc sqlite-check-common-system-deps {} {
#
# Check for needed/wanted data types
cc-with {-includes stdint.h} \
{cc-check-types int8_t int16_t int32_t int64_t intptr_t \
uint8_t uint16_t uint32_t uint64_t uintptr_t}
#
# Check for needed/wanted functions
cc-check-functions gmtime_r isnan localtime_r localtime_s \
malloc_usable_size strchrnul usleep utime pread pread64 pwrite pwrite64
@@ -566,7 +601,6 @@ proc sqlite-check-common-system-deps {} {
}
define LDFLAGS_RT [join [lsort -unique $ldrt] ""]
#
# Check for needed/wanted headers
cc-check-includes \
sys/types.h sys/stat.h dlfcn.h unistd.h \
@@ -588,7 +622,6 @@ proc sqlite-check-common-system-deps {} {
########################################################################
# Move -DSQLITE_OMIT... and -DSQLITE_ENABLE... flags from CFLAGS and
# CPPFLAGS to OPT_FEATURE_FLAGS and remove them from BUILD_CFLAGS.
# This is derived from the legacy build but is still practical.
proc sqlite-munge-cflags {} {
# Move CFLAGS and CPPFLAGS entries matching -DSQLITE_OMIT* and
# -DSQLITE_ENABLE* to OPT_FEATURE_FLAGS. This behavior is derived
@@ -658,7 +691,7 @@ proc sqlite-setup-default-cflags {} {
}
########################################################################
# Handle various SQLITE_ENABLE_... feature flags.
# Handle various SQLITE_ENABLE/OMIT_... feature flags.
proc sqlite-handle-common-feature-flags {} {
msg-result "Feature flags..."
foreach {boolFlag featureFlag ifSetEvalThis} {
@@ -718,7 +751,6 @@ proc sqlite-handle-common-feature-flags {} {
msg-result " - $boolFlag"
}
}
}
#########################################################################
@@ -735,16 +767,19 @@ proc sqlite-finalize-feature-flags {} {
define OPT_SHELL [lsort -unique $oFF]
msg-result "Shell options: [get-define OPT_SHELL]"
}
if {"" ne [set extraSrc [get-define AMALGAMATION_EXTRA_SRC ""]]} {
proj-assert {"canonical" eq $::sqliteConfig(build-mode)}
msg-result "Appending source files to amalgamation: $extraSrc"
}
}
########################################################################
# Checks for the --debug flag, defining SQLITE_DEBUG to 1 if it is
# true. TARGET_DEBUG gets defined either way, with content depending
# on whether --debug is true or false.
# Checks for the --debug flag and [define]s TARGET_DEBUG based on
# that. TARGET_DEBUG is unused in the autoconf build but that is
# arguably a bug.
proc sqlite-handle-debug {} {
msg-checking "SQLITE_DEBUG build? "
proj-if-opt-truthy debug {
define SQLITE_DEBUG 1
define TARGET_DEBUG {-g -DSQLITE_DEBUG=1 -DSQLITE_ENABLE_SELECTTRACE -DSQLITE_ENABLE_WHERETRACE -O0 -Wall}
proj-opt-set memsys5
msg-result yes
@@ -780,7 +815,7 @@ proc sqlite-handle-soname {} {
}
}
}
msg-debug "soname=$soname"
proc-debug "soname=$soname"
if {[proj-check-soname $soname]} {
define LDFLAGS_LIBSQLITE3_SONAME [get-define LDFLAGS_SONAME_PREFIX]$soname
msg-result "Setting SONAME using: [get-define LDFLAGS_LIBSQLITE3_SONAME]"
@@ -911,6 +946,11 @@ proc sqlite-handle-emsdk {} {
########################################################################
# Internal helper for [sqlite-check-line-editing]. Returns a list of
# potential locations under which readline.h might be found.
#
# On some environments this function may perform extra work to help
# sqlite-check-line-editing figure out how to find libreadline and
# friends. It will communicate those results via means other than the
# result value, e.g. by modifying configure --flags.
proc sqlite-get-readline-dir-list {} {
# Historical note: the dirs list, except for the inclusion of
# $prefix and some platform-specific dirs, originates from the
@@ -927,13 +967,24 @@ proc sqlite-get-readline-dir-list {} {
*-mingw64 {
lappend dirs /mingw64 /mingw
}
*-haiku {
lappend dirs /boot/system/develop/headers
if {[opt-val with-readline-ldflags] in {auto ""}} {
# If the user did not supply their own --with-readline-ldflags
# value, hijack that flag to inject options which are known to
# work on a default Haiku installation.
if {"" ne [glob -nocomplain /boot/system/lib/libreadline*]} {
proj-opt-set with-readline-ldflags {-L/boot/system/lib -lreadline}
}
}
}
}
lappend dirs /usr /usr/local /usr/local/readline /usr/contrib
set rv {}
foreach d $dirs {
if {[file isdir $d]} {lappend rv $d}
}
#msg-debug "sqlite-get-readline-dir-list dirs=$rv"
#proc-debug "dirs=$rv"
return $rv
}
@@ -1074,7 +1125,9 @@ proc sqlite-check-line-editing {} {
proj-warn "Skipping check for readline.h because we're cross-compiling."
} else {
set dirs [sqlite-get-readline-dir-list]
set subdirs "include/$editLibName"
set subdirs [list \
include/$editLibName \
readline]
if {"editline" eq $editLibName} {
lappend subdirs include/readline
# ^^^ editline, on some systems, does not have its own header,
@@ -1082,7 +1135,8 @@ proc sqlite-check-line-editing {} {
}
lappend subdirs include
set rlInc [proj-search-for-header-dir readline.h \
-dirs $dirs -subdirs $subdirs]
-dirs $dirs -subdirs $subdirs]
#proc-debug "rlInc=$rlInc"
if {"" ne $rlInc} {
if {[string match */readline $rlInc]} {
set rlInc [file dirname $rlInc]; # CLI shell: #include <readline/readline.h>
@@ -1107,7 +1161,8 @@ proc sqlite-check-line-editing {} {
set rlLib ""
if {"" ne $rlInc} {
set rlLib [opt-val with-readline-ldflags]
if {$rlLib eq "auto" || $rlLib eq ""} {
#proc-debug "rlLib=$rlLib"
if {$rlLib in {auto ""}} {
set rlLib ""
set libTerm ""
if {[proj-check-function-in-lib tgetent "$editLibName ncurses curses termcap"]} {
@@ -1175,9 +1230,10 @@ proc sqlite-check-line-editing {} {
}; # sqlite-check-line-editing
########################################################################
# Runs sqlite-check-line-editing and adds a message around it In the
# Runs sqlite-check-line-editing and adds a message around it. In the
# canonical build this must not be called before
# sqlite-determine-codegen-tcl.
# sqlite-determine-codegen-tcl for reasons now lost to history (and
# might not still be applicable).
proc sqlite-handle-line-editing {} {
msg-result "Line-editing support for the sqlite3 shell: [sqlite-check-line-editing]"
}
@@ -1217,7 +1273,7 @@ proc sqlite-handle-icu {} {
msg-result "Checking for ICU support..."
set icuConfigBin [opt-val with-icu-config]
set tryIcuConfigBin 1; # set to 0 if we end up using pkg-config
if {"auto" eq $icuConfigBin || "pkg-config" eq $icuConfigBin} {
if {$icuConfigBin in {auto pkg-config}} {
if {[pkg-config-init 0] && [pkg-config icu-io]} {
# Maintenance reminder: historical docs say to use both of
# (icu-io, icu-uc). icu-uc lacks a required lib and icu-io has
@@ -1271,7 +1327,9 @@ proc sqlite-handle-icu {} {
if {[opt-bool icu-collations]} {
msg-result "Enabling ICU collations."
sqlite-add-feature-flag -shell -DSQLITE_ENABLE_ICU_COLLATIONS
# Recall that shell.c builds with sqlite3.c
# Recall that shell.c builds with sqlite3.c except in the case
# of --disable-static-shell, a combination we do not
# specifically attempt to account for.
}
} elseif {[opt-bool icu-collations]} {
proj-warn "ignoring --enable-icu-collations because neither --with-icu-ldflags nor --with-icu-config provided any linker flags"
@@ -1325,7 +1383,7 @@ proc sqlite-handle-load-extension {} {
if {$found} {
msg-result "Loadable extension support enabled."
} else {
msg-result "Disabling loadable extension support. Use --enable-load-extensions to enable them."
msg-result "Disabling loadable extension support. Use --enable-load-extension to enable them."
sqlite-add-feature-flag {-DSQLITE_OMIT_LOAD_EXTENSION=1}
}
return $found
@@ -1341,7 +1399,7 @@ proc sqlite-handle-math {} {
define LDFLAGS_MATH [get-define lib_ceil]
undefine lib_ceil
sqlite-add-feature-flag {-DSQLITE_ENABLE_MATH_FUNCTIONS}
msg-result "Enabling math SQL functions [get-define LDFLAGS_MATH]"
msg-result "Enabling math SQL functions"
} {
define LDFLAGS_MATH ""
msg-result "Disabling math SQL functions"
@@ -1409,14 +1467,15 @@ proc sqlite-handle-dll-basename {} {
# [define]s LDFLAGS_OUT_IMPLIB to either an empty string or to a
# -Wl,... flag for the platform-specific --out-implib flag, which is
# used for building an "import library .dll.a" file on some platforms
# (e.g. msys2, mingw). Returns 1 if supported, else 0.
# (e.g. msys2, mingw). SQLITE_OUT_IMPLIB is defined to the name of the
# import lib or an empty string. Returns 1 if supported, else 0.
#
# The name of the import library is [define]d in SQLITE_OUT_IMPLIB.
#
# If the configure flag --out-implib is not used (or programmatically
# set) then this is a no-op (but see [sqliet-handle-env-quirks]). If
# that flag is used but the capability is not available, a fatal error
# is triggered.
# set) then this simply sets the above-listed defines to empty strings
# (but see [sqlite-handle-env-quirks]). If that flag is used but the
# capability is not available, a fatal error is triggered.
#
# This feature is specifically opt-in because it's supported on far
# more platforms than actually need it and enabling it causes creation
@@ -1493,7 +1552,7 @@ proc sqlite-env-is-unix-on-windows {{envTuple ""}} {
#
# [define]s SQLITE_DLL_INSTALL_RULES to a symbolic name suffix for a
# set of "make install" rules to use for installation of the DLL
# deliverable. The makefile is tasked with with providing rules named
# deliverable. The makefile is tasked with providing rules named
# install-dll-NAME which runs the installation for that set, as well
# as providing a rule named install-dll which resolves to
# install-dll-NAME (perhaps indirectly, depending on whether the DLL
@@ -1505,13 +1564,13 @@ proc sqlite-env-is-unix-on-windows {{envTuple ""}} {
#
# On platforms where an "import library" is conventionally used but
# --out-implib was not explicitly used, automatically add that flag.
# This conventionally applies to the "Unix on Windows" environments
# like msys and cygwin.
# This conventionally applies only to the "Unix on Windows"
# environments like msys and cygwin.
#
# 3) --dll-basename:
#
# On the same platforms addressed by --out-implib, if --dll-basename
# is not specified, --dll-basename=auto is implied.
# is not explicitly specified, --dll-basename=auto is implied.
proc sqlite-handle-env-quirks {} {
set instName unix-generic; # name of installation rules set
set autoDll 0; # true if --out-implib/--dll-basename should be implied
@@ -1551,27 +1610,17 @@ proc sqlite-handle-env-quirks {} {
sqlite-handle-dll-basename
sqlite-handle-out-implib
sqlite-handle-mac-cversion
if {[llength [info proc sqlite-custom-handle-flags]] > 0} {
# sqlite-custom-handle-flags is assumed to be imported via a
# client-specific import: autosetup/sqlite-custom.tcl.
sqlite-custom-handle-flags
}
}
########################################################################
# Perform some late-stage work and generate the configure-process
# output file(s).
proc sqlite-process-dot-in-files {} {
########################################################################
# When cross-compiling, we have to avoid using the -s flag to
# /usr/bin/install:
# https://sqlite.org/forum/forumpost/9a67df63eda9925c
define IS_CROSS_COMPILING $::sqliteConfig(is-cross-compiling)
# Finish up handling of the various feature flags here because it's
# convenient for both the canonical build and autoconf bundles that
# it be done here.
sqlite-handle-common-feature-flags
sqlite-finalize-feature-flags
if {"" ne [set extraSrc [get-define AMALGAMATION_EXTRA_SRC ""]]} {
msg-result "Appending source files to amalgamation: $extraSrc"
}
########################################################################
# "Re-export" the autoconf-conventional --XYZdir flags into something
# which is more easily overridable from a make invocation. See the docs
@@ -1583,7 +1632,15 @@ proc sqlite-process-dot-in-files {} {
# (e.g. [proj-check-rpath]) may do so before we "mangle" them here.
proj-remap-autoconf-dir-vars
proj-make-from-dot-in -touch Makefile sqlite3.pc
set srcdir $::autosetup(srcdir)/
foreach f {Makefile sqlite3.pc} {
if {[file exists $srcdir/$f.in]} {
# ^^^ we do this only so that this block can be made to work for
# multiple builds. e.g. the tea build (under construction) does
# not hae sqlite3.pc.in.
proj-make-from-dot-in -touch $f
}
}
make-config-header sqlite_cfg.h \
-bare {SIZEOF_* HAVE_DECL_*} \
-none {HAVE_CFLAG_* LDFLAGS_* SH_* SQLITE_AUTORECONFIG
@@ -1652,7 +1709,8 @@ proc sqlite-handle-wasi-sdk {} {
tcl
threadsafe
} {
if {[opt-bool $opt]} {
if {[proj-opt-exists $opt] && [opt-bool $opt]} {
# -^^^^ not all builds define all of these flags
msg-result " --disable-$opt"
proj-opt-set $opt 0
}
@@ -1729,12 +1787,10 @@ proc sqlite-check-tcl {} {
define TCLLIBDIR "" ; # Installation dir for TCL extension lib
define TCL_CONFIG_SH ""; # full path to tclConfig.sh
# Clear out all vars which would be set by tclConfigToAutoDef.sh, so
# that the late-config validation of @VARS@ works even if
# --disable-tcl is used.
foreach k {TCL_INCLUDE_SPEC TCL_LIB_SPEC TCL_STUB_LIB_SPEC TCL_EXEC_PREFIX TCL_VERSION} {
define $k ""
}
# Clear out all vars which would harvest from tclConfig.sh so that
# the late-config validation of @VARS@ works even if --disable-tcl
# is used.
proj-tclConfig-sh-to-autosetup ""
file delete -force ".tclenv.sh"; # ensure no stale state from previous configures.
if {![opt-bool tcl]} {
@@ -1755,14 +1811,14 @@ proc sqlite-check-tcl {} {
if {"prefix" eq $with_tcl} {
set with_tcl [get-define prefix]
}
msg-debug "sqlite-check-tcl: use_tcl ${use_tcl}"
msg-debug "sqlite-check-tcl: with_tclsh=${with_tclsh}"
msg-debug "sqlite-check-tcl: with_tcl=$with_tcl"
proc-debug "use_tcl ${use_tcl}"
proc-debug "with_tclsh=${with_tclsh}"
proc-debug "with_tcl=$with_tcl"
if {"" eq $with_tclsh && "" eq $with_tcl} {
# If neither --with-tclsh nor --with-tcl are provided, try to find
# a workable tclsh.
set with_tclsh [proj-first-bin-of tclsh9.0 tclsh8.6 tclsh]
msg-debug "sqlite-check-tcl: with_tclsh=${with_tclsh}"
set with_tclsh [proj-first-bin-of tclsh9.1 tclsh9.0 tclsh8.6 tclsh]
proc-debug "with_tclsh=${with_tclsh}"
}
set doConfigLookup 1 ; # set to 0 to test the tclConfig.sh-not-found cases
@@ -1776,7 +1832,7 @@ proc sqlite-check-tcl {} {
#msg-result "Using tclsh: $with_tclsh"
}
if {$doConfigLookup &&
[catch {exec $with_tclsh $srcdir/tool/find_tclconfig.tcl} result] == 0} {
[catch {exec $with_tclsh $::autosetup(libdir)/find_tclconfig.tcl} result] == 0} {
set with_tcl $result
}
if {"" ne $with_tcl && [file isdir $with_tcl]} {
@@ -1787,7 +1843,7 @@ proc sqlite-check-tcl {} {
}
}
set cfg ""
set tclSubdirs {tcl9.0 tcl8.6 lib}
set tclSubdirs {tcl9.1 tcl9.0 tcl8.6 lib}
while {$use_tcl} {
if {"" ne $with_tcl} {
# Ensure that we can find tclConfig.sh under ${with_tcl}/...
@@ -1833,9 +1889,7 @@ proc sqlite-check-tcl {} {
# Export a subset of tclConfig.sh to the current TCL-space. If $cfg
# is an empty string, this emits empty-string entries for the
# various options we're interested in.
eval [exec sh "$srcdir/tool/tclConfigShToAutoDef.sh" "$cfg"]
# ---------^^ a Windows/msys workaround, without which it cannot
# exec a .sh file: https://sqlite.org/forum/forumpost/befb352a42a7cd6d
proj-tclConfig-sh-to-autosetup $cfg
if {"" eq $with_tclsh && $cfg ne ""} {
# We have tclConfig.sh but no tclsh. Attempt to locate a tclsh
@@ -2004,10 +2058,14 @@ proc sqlite-determine-codegen-tcl {} {
}; # sqlite-determine-codegen-tcl
########################################################################
# Runs sqlite-check-tcl and sqlite-determine-codegen-tcl.
proc sqlite-handle-tcl {} {
# Runs sqlite-check-tcl and, if $alsoCheckCodeGen is true,
# sqlite-determine-codegen-tcl (intended only for the canonical
# build).
proc sqlite-handle-tcl {{alsoCheckCodeGen 1}} {
sqlite-check-tcl
msg-result "TCL for code generation: [sqlite-determine-codegen-tcl]"
if {$alsoCheckCodeGen} {
msg-result "TCL for code generation: [sqlite-determine-codegen-tcl]"
}
}
########################################################################
+1 -1
View File
@@ -28,7 +28,7 @@
static int dbHandleFromObj(Tcl_Interp *interp, Tcl_Obj *pObj, sqlite3 **pDb){
Tcl_CmdInfo info;
if( 0==Tcl_GetCommandInfo(interp, Tcl_GetString(pObj), &info) ){
Tcl_AppendResult(interp, "no such handle: ", Tcl_GetString(pObj), 0);
Tcl_AppendResult(interp, "no such handle: ", Tcl_GetString(pObj), NULL);
return TCL_ERROR;
}
-6
View File
@@ -295,12 +295,6 @@
# define SQLITE_CORE 1
#endif
#include <assert.h>
#include <stdlib.h>
#include <stddef.h>
#include <stdio.h>
#include <string.h>
#include <stdarg.h>
#include "fts3.h"
#ifndef SQLITE_CORE
+7
View File
@@ -14,6 +14,13 @@
#ifndef _FTSINT_H
#define _FTSINT_H
#include <assert.h>
#include <stdlib.h>
#include <stddef.h>
#include <stdio.h>
#include <string.h>
#include <stdarg.h>
#if !defined(NDEBUG) && !defined(SQLITE_DEBUG)
# define NDEBUG 1
#endif
+35 -11
View File
@@ -161,6 +161,23 @@ int sqlite3Fts3OpenTokenizer(
*/
static int fts3ExprParse(ParseContext *, const char *, int, Fts3Expr **, int *);
/*
** Search buffer z[], size n, for a '"' character. Or, if enable_parenthesis
** is defined, search for '(' and ')' as well. Return the index of the first
** such character in the buffer. If there is no such character, return -1.
*/
static int findBarredChar(const char *z, int n){
int ii;
for(ii=0; ii<n; ii++){
if( (z[ii]=='"')
|| (sqlite3_fts3_enable_parentheses && (z[ii]=='(' || z[ii]==')'))
){
return ii;
}
}
return -1;
}
/*
** Extract the next token from buffer z (length n) using the tokenizer
** and other information (column names etc.) in pParse. Create an Fts3Expr
@@ -185,16 +202,9 @@ static int getNextToken(
int rc;
sqlite3_tokenizer_cursor *pCursor;
Fts3Expr *pRet = 0;
int i = 0;
/* Set variable i to the maximum number of bytes of input to tokenize. */
for(i=0; i<n; i++){
if( sqlite3_fts3_enable_parentheses && (z[i]=='(' || z[i]==')') ) break;
if( z[i]=='"' ) break;
}
*pnConsumed = i;
rc = sqlite3Fts3OpenTokenizer(pTokenizer, pParse->iLangid, z, i, &pCursor);
*pnConsumed = n;
rc = sqlite3Fts3OpenTokenizer(pTokenizer, pParse->iLangid, z, n, &pCursor);
if( rc==SQLITE_OK ){
const char *zToken;
int nToken = 0, iStart = 0, iEnd = 0, iPosition = 0;
@@ -202,6 +212,17 @@ static int getNextToken(
rc = pModule->xNext(pCursor, &zToken, &nToken, &iStart, &iEnd, &iPosition);
if( rc==SQLITE_OK ){
/* Check that this tokenization did not gobble up any " characters. Or,
** if enable_parenthesis is true, that it did not gobble up any
** open or close parenthesis characters either. If it did, call
** getNextToken() again, but pass only that part of the input buffer
** up to the first such character. */
int iBarred = findBarredChar(z, iEnd);
if( iBarred>=0 ){
pModule->xClose(pCursor);
return getNextToken(pParse, iCol, z, iBarred, ppExpr, pnConsumed);
}
nByte = sizeof(Fts3Expr) + SZ_FTS3PHRASE(1) + nToken;
pRet = (Fts3Expr *)sqlite3Fts3MallocZero(nByte);
if( !pRet ){
@@ -236,7 +257,11 @@ static int getNextToken(
}
*pnConsumed = iEnd;
}else if( i && rc==SQLITE_DONE ){
}else if( n && rc==SQLITE_DONE ){
int iBarred = findBarredChar(z, n);
if( iBarred>=0 ){
*pnConsumed = iBarred;
}
rc = SQLITE_OK;
}
@@ -1239,7 +1264,6 @@ static void fts3ExprTestCommon(
}
if( rc!=SQLITE_OK && rc!=SQLITE_NOMEM ){
sqlite3Fts3ExprFree(pExpr);
sqlite3_result_error(context, "Error parsing expression", -1);
}else if( rc==SQLITE_NOMEM || !(zBuf = exprToString(pExpr, 0)) ){
sqlite3_result_error_nomem(context);
+3 -3
View File
@@ -219,7 +219,7 @@ static int SQLITE_TCLAPI fts3_near_match_cmd(
rc = Tcl_ListObjGetElements(interp, pPhrase, &nToken, &apToken);
if( rc!=TCL_OK ) goto near_match_out;
if( nToken>NM_MAX_TOKEN ){
Tcl_AppendResult(interp, "Too many tokens in phrase", 0);
Tcl_AppendResult(interp, "Too many tokens in phrase", NULL);
rc = TCL_ERROR;
goto near_match_out;
}
@@ -547,7 +547,7 @@ static int SQLITE_TCLAPI fts3_test_varint_cmd(
if( w!=w2 || nByte!=nByte2 ){
char *zErr = sqlite3_mprintf("error testing %lld", w);
Tcl_ResetResult(interp);
Tcl_AppendResult(interp, zErr, 0);
Tcl_AppendResult(interp, zErr, NULL);
return TCL_ERROR;
}
@@ -557,7 +557,7 @@ static int SQLITE_TCLAPI fts3_test_varint_cmd(
if( (int)w!=i || nByte!=nByte2 ){
char *zErr = sqlite3_mprintf("error testing %lld (32-bit)", w);
Tcl_ResetResult(interp);
Tcl_AppendResult(interp, zErr, 0);
Tcl_AppendResult(interp, zErr, NULL);
return TCL_ERROR;
}
}
+2 -1
View File
@@ -2015,7 +2015,8 @@ void sqlite3Fts5ParseSetDistance(
);
return;
}
nNear = nNear * 10 + (p->p[i] - '0');
if( nNear<214748363 ) nNear = nNear * 10 + (p->p[i] - '0');
/* ^^^^^^^^^^^^^^^--- Prevent integer overflow */
}
}else{
nNear = FTS5_DEFAULT_NEARDIST;
+47 -18
View File
@@ -60,8 +60,7 @@
** step HIDDEN
** );
**
** The virtual table also has a rowid, logically equivalent to n+1 where
** "n" is the ascending integer in the aforesaid production definition.
** The virtual table also has a rowid which is an alias for the value.
**
** Function arguments in queries against this virtual table are translated
** into equality constraints against successive hidden columns. In other
@@ -116,6 +115,7 @@ SQLITE_EXTENSION_INIT1
#include <assert.h>
#include <string.h>
#include <limits.h>
#include <math.h>
#ifndef SQLITE_OMIT_VIRTUALTABLE
/*
@@ -276,6 +276,7 @@ static int seriesConnect(
int rc;
/* Column numbers */
#define SERIES_COLUMN_ROWID (-1)
#define SERIES_COLUMN_VALUE 0
#define SERIES_COLUMN_START 1
#define SERIES_COLUMN_STOP 2
@@ -363,13 +364,11 @@ static int seriesColumn(
#endif
/*
** Return the rowid for the current row, logically equivalent to n+1 where
** "n" is the ascending integer in the aforesaid production definition.
** The rowid is the same as the value.
*/
static int seriesRowid(sqlite3_vtab_cursor *cur, sqlite_int64 *pRowid){
series_cursor *pCur = (series_cursor*)cur;
sqlite3_uint64 n = pCur->ss.uSeqIndexNow;
*pRowid = (sqlite3_int64)((n<LARGEST_UINT64)? n+1 : 0);
*pRowid = pCur->ss.iValueNow;
return SQLITE_OK;
}
@@ -482,25 +481,52 @@ static int seriesFilter(
** constraints on the "value" column.
*/
if( idxNum & 0x0080 ){
iMin = iMax = sqlite3_value_int64(argv[i++]);
if( sqlite3_value_numeric_type(argv[i])==SQLITE_FLOAT ){
double r = sqlite3_value_double(argv[i++]);
if( r==ceil(r) ){
iMin = iMax = (sqlite3_int64)r;
}else{
returnNoRows = 1;
}
}else{
iMin = iMax = sqlite3_value_int64(argv[i++]);
}
}else{
if( idxNum & 0x0300 ){
iMin = sqlite3_value_int64(argv[i++]);
if( idxNum & 0x0200 ){
if( iMin==LARGEST_INT64 ){
returnNoRows = 1;
if( sqlite3_value_numeric_type(argv[i])==SQLITE_FLOAT ){
double r = sqlite3_value_double(argv[i++]);
if( idxNum & 0x0200 && r==ceil(r) ){
iMin = (sqlite3_int64)ceil(r+1.0);
}else{
iMin++;
iMin = (sqlite3_int64)ceil(r);
}
}else{
iMin = sqlite3_value_int64(argv[i++]);
if( idxNum & 0x0200 ){
if( iMin==LARGEST_INT64 ){
returnNoRows = 1;
}else{
iMin++;
}
}
}
}
if( idxNum & 0x3000 ){
iMax = sqlite3_value_int64(argv[i++]);
if( idxNum & 0x2000 ){
if( iMax==SMALLEST_INT64 ){
returnNoRows = 1;
if( sqlite3_value_numeric_type(argv[i])==SQLITE_FLOAT ){
double r = sqlite3_value_double(argv[i++]);
if( (idxNum & 0x2000)!=0 && r==floor(r) ){
iMax = (sqlite3_int64)(r-1.0);
}else{
iMax--;
iMax = (sqlite3_int64)floor(r);
}
}else{
iMax = sqlite3_value_int64(argv[i++]);
if( idxNum & 0x2000 ){
if( iMax==SMALLEST_INT64 ){
returnNoRows = 1;
}else{
iMax--;
}
}
}
}
@@ -657,7 +683,10 @@ static int seriesBestIndex(
continue;
}
if( pConstraint->iColumn<SERIES_COLUMN_START ){
if( pConstraint->iColumn==SERIES_COLUMN_VALUE && pConstraint->usable ){
if( (pConstraint->iColumn==SERIES_COLUMN_VALUE ||
pConstraint->iColumn==SERIES_COLUMN_ROWID)
&& pConstraint->usable
){
switch( op ){
case SQLITE_INDEX_CONSTRAINT_EQ:
case SQLITE_INDEX_CONSTRAINT_IS: {
+1 -1
View File
@@ -171,7 +171,7 @@ foreach {ttt state} {
# * Set the state db permissions to the same as those on the db file.
#
db close
if {$::tcl_platform(platform)=="unix"} {
if {$::tcl_platform(platform) eq "unix"} {
forcedelete test.db
sqlite3 db test.db
+2 -2
View File
@@ -139,7 +139,7 @@ static int SQLITE_TCLAPI test_sqlite3rbu_cmd(
}else{
Tcl_SetObjResult(interp, Tcl_NewStringObj(sqlite3ErrName(rc), -1));
if( zErrmsg ){
Tcl_AppendResult(interp, " - ", zErrmsg, 0);
Tcl_AppendResult(interp, " - ", zErrmsg, NULL);
sqlite3_free(zErrmsg);
}
ret = TCL_ERROR;
@@ -399,7 +399,7 @@ static int SQLITE_TCLAPI test_sqlite3rbu_internal_test(
db = sqlite3rbu_db(0, 0);
if( db!=0 ){
Tcl_AppendResult(interp, "sqlite3rbu_db(0, 0)!=0", 0);
Tcl_AppendResult(interp, "sqlite3rbu_db(0, 0)!=0", NULL);
return TCL_ERROR;
}
+1 -1
View File
@@ -58,7 +58,7 @@ static int xSqlCallback(void *pSqlArg, const char *zSql){
static int getDbPointer(Tcl_Interp *interp, Tcl_Obj *pObj, sqlite3 **pDb){
Tcl_CmdInfo info;
if( 0==Tcl_GetCommandInfo(interp, Tcl_GetString(pObj), &info) ){
Tcl_AppendResult(interp, "no such handle: ", Tcl_GetString(pObj), 0);
Tcl_AppendResult(interp, "no such handle: ", Tcl_GetString(pObj), NULL);
return TCL_ERROR;
}
*pDb = *(sqlite3 **)info.objClientData;
Regular → Executable
+117 -1
View File
@@ -684,8 +684,124 @@ do_test $tn.14.4 {
list [catch {sqlite3session_config invalid 123} msg] $msg
} {1 SQLITE_MISUSE}
#-------------------------------------------------------------------------
reset_db
do_execsql_test $tn.15.0 {
CREATE TABLE records(
idx INTEGER PRIMARY KEY AUTOINCREMENT,
tbl TEXT NOT NULL,
pk TEXT NOT NULL,
value TEXT,
UNIQUE(tbl, pk)
);
CREATE TABLE changes(
idx INTEGER PRIMARY KEY AUTOINCREMENT,
tbl TEXT NOT NULL,
pk TEXT NOT NULL,
op TEXT DEFAULT ('='),
path TEXT DEFAULT ('$'),
value TEXT,
UNIQUE(tbl, pk)
);
CREATE TRIGGER changes_after_insert
AFTER INSERT ON changes
FOR EACH ROW
BEGIN
INSERT INTO records(tbl, pk, value)
VALUES (NEW.tbl, NEW.pk, NEW.value)
ON CONFLICT(tbl, pk) DO UPDATE SET value = NEW.value;
END;
CREATE VIEW data_view AS
SELECT *, '=' AS op, '$' AS path FROM records
WHERE tbl = 'data';
CREATE TRIGGER data_insert
INSTEAD OF INSERT ON data_view
BEGIN
INSERT INTO changes(tbl, pk, op, path, value)
VALUES (NEW.tbl, NEW.pk, NEW.op, NEW.path, NEW.value);
END;
CREATE TRIGGER data_update
INSTEAD OF UPDATE ON data_view
BEGIN
INSERT INTO changes(tbl, pk, op, path, value)
VALUES (NEW.tbl, NEW.pk, NEW.op, NEW.path, NEW.value);
END;
CREATE TRIGGER data_delete
INSTEAD OF DELETE ON data_view
BEGIN
INSERT INTO changes(tbl, pk, op, path, value)
VALUES (NEW.tbl, NEW.pk, NEW.op, NEW.path, NEW.value);
END;
}
do_test $tn.15.1 {
set C [changeset_from_sql {
INSERT INTO data_view (tbl, pk, value) VALUES
('data', '1', 'First'),
('data', '2', 'Second');
}]
changeset_to_list $C
} [list \
{INSERT changes 1 X..... {} {i 1 t data t 1 n {} n {} t First}} \
{INSERT changes 1 X..... {} {i 2 t data t 2 n {} n {} t Second}} \
{INSERT records 1 X... {} {i 1 t data t 1 t First}} \
{INSERT records 1 X... {} {i 2 t data t 2 t Second}} \
]
forcedelete test.db2
sqlite3 db2 test.db2
do_test $tn.15.2 {
db2 eval {
CREATE TABLE records(
idx INTEGER PRIMARY KEY AUTOINCREMENT,
tbl TEXT NOT NULL,
pk TEXT NOT NULL,
value TEXT,
UNIQUE(tbl, pk)
);
CREATE TABLE changes(
idx INTEGER PRIMARY KEY AUTOINCREMENT,
tbl TEXT NOT NULL,
pk TEXT NOT NULL,
op TEXT DEFAULT ('='),
path TEXT DEFAULT ('$'),
value TEXT,
UNIQUE(tbl, pk)
);
CREATE TRIGGER changes_after_insert
AFTER INSERT ON changes
FOR EACH ROW
BEGIN
INSERT INTO records(tbl, pk, value)
VALUES (NEW.tbl, NEW.pk, NEW.value)
ON CONFLICT(tbl, pk) DO UPDATE SET value = NEW.value;
END;
}
sqlite3changeset_apply db2 $C ""
db2 eval {
SELECT * FROM records;
}
} [list 1 data 1 First 2 data 2 Second]
do_test $tn.15.3 {
db2 eval {
SELECT * FROM changes;
}
} {1 data 1 {} {} First 2 data 2 {} {} Second}
db2 close
}]
}
finish_test
Regular → Executable
+1 -1
View File
@@ -72,5 +72,5 @@ do_execsql_test -db db2 1.3 {
}
db2 close
finish_test
Regular → Executable
+2
View File
@@ -155,6 +155,8 @@ do_test 3.2 {
compare_db db db2
} {}
db2 close
#-------------------------------------------------------------------------
#
reset_db
+7 -7
View File
@@ -34,7 +34,7 @@ struct TestStreamInput {
static int dbHandleFromObj(Tcl_Interp *interp, Tcl_Obj *pObj, sqlite3 **pDb){
Tcl_CmdInfo info;
if( 0==Tcl_GetCommandInfo(interp, Tcl_GetString(pObj), &info) ){
Tcl_AppendResult(interp, "no such handle: ", Tcl_GetString(pObj), 0);
Tcl_AppendResult(interp, "no such handle: ", Tcl_GetString(pObj), NULL);
return TCL_ERROR;
}
@@ -130,7 +130,7 @@ static int SQLITE_TCLAPI test_sql_exec_changeset(
rc = sql_exec_changeset(db, zSql, &nChangeset, &pChangeset);
if( rc!=SQLITE_OK ){
Tcl_ResetResult(interp);
Tcl_AppendResult(interp, "error in sql_exec_changeset()", 0);
Tcl_AppendResult(interp, "error in sql_exec_changeset()", NULL);
return TCL_ERROR;
}
@@ -166,7 +166,7 @@ static int test_session_error(Tcl_Interp *interp, int rc, char *zErr){
extern const char *sqlite3ErrName(int);
Tcl_SetObjResult(interp, Tcl_NewStringObj(sqlite3ErrName(rc), -1));
if( zErr ){
Tcl_AppendResult(interp, " - ", zErr, 0);
Tcl_AppendResult(interp, " - ", zErr, NULL);
sqlite3_free(zErr);
}
return TCL_ERROR;
@@ -435,7 +435,7 @@ static int SQLITE_TCLAPI test_sqlite3session(
}
if( 0==Tcl_GetCommandInfo(interp, Tcl_GetString(objv[2]), &info) ){
Tcl_AppendResult(interp, "no such handle: ", Tcl_GetString(objv[2]), 0);
Tcl_AppendResult(interp, "no such handle: ", Tcl_GetString(objv[2]), NULL);
return TCL_ERROR;
}
db = *(sqlite3 **)info.objClientData;
@@ -832,7 +832,7 @@ static int SQLITE_TCLAPI testSqlite3changesetApply(
return TCL_ERROR;
}
if( 0==Tcl_GetCommandInfo(interp, Tcl_GetString(objv[1]), &info) ){
Tcl_AppendResult(interp, "no such handle: ", Tcl_GetString(objv[1]), 0);
Tcl_AppendResult(interp, "no such handle: ", Tcl_GetString(objv[1]), NULL);
return TCL_ERROR;
}
db = *(sqlite3 **)info.objClientData;
@@ -924,7 +924,7 @@ static int SQLITE_TCLAPI test_sqlite3changeset_apply_replace_all(
return TCL_ERROR;
}
if( 0==Tcl_GetCommandInfo(interp, Tcl_GetString(objv[1]), &info) ){
Tcl_AppendResult(interp, "no such handle: ", Tcl_GetString(objv[2]), 0);
Tcl_AppendResult(interp, "no such handle: ", Tcl_GetString(objv[2]), NULL);
return TCL_ERROR;
}
db = *(sqlite3 **)info.objClientData;
@@ -1551,7 +1551,7 @@ static int SQLITE_TCLAPI test_changegroup_cmd(
TestChangeIter *pIter = 0;
const char *zIter = Tcl_GetString(objv[2]);
if( 0==Tcl_GetCommandInfo(interp, zIter, &cmdInfo) ){
Tcl_AppendResult(interp, "no such iter: ", Tcl_GetString(objv[2]), 0);
Tcl_AppendResult(interp, "no such iter: ", Tcl_GetString(objv[2]), NULL);
return TCL_ERROR;
}
+69 -10
View File
@@ -79,6 +79,48 @@ globalThis.sqlite3ApiBootstrap.initializers.push(function(sqlite3){
capi.SQLITE_OPEN_MAIN_JOURNAL |
capi.SQLITE_OPEN_SUPER_JOURNAL |
capi.SQLITE_OPEN_WAL;
const FLAG_COMPUTE_DIGEST_V2 = capi.SQLITE_OPEN_MEMORY
/* Part of the fix for
https://github.com/sqlite/sqlite-wasm/issues/97
Summary: prior to version 3.50.0 computeDigest() always computes
a value of [0,0] due to overflows, so it does not do anything
useful. Fixing it invalidates old persistent files, so we
instead only fix it for files created or updated since the bug
was discovered and fixed.
This flag determines whether we use the broken legacy
computeDigest() or the v2 variant. We only use this flag for
newly-created/overwritten files. Pre-existing files have the
broken digest stored in them so need to continue to use that.
What this means, in terms of db file compatibility between
versions:
- DBs created with versions older than this fix (<3.50.0)
can be read by post-fix versions. Such DBs which are written
to in-place (not replaced) by newer versions can still be read
by older versions, as the affected digest is only modified
when the SAH slot is assigned to a given filename.
- DBs created with post-fix versions will, when read by a pre-fix
version, be seen as having a "bad digest" and will be
unceremoniously replaced by that pre-fix version. When swapping
back to a post-fix version, that version will see that the file
entry is missing the FLAG_COMPUTE_DIGEST_V2 bit so will treat it
as a legacy file.
This flag is stored in the same memory as the various
SQLITE_OPEN_... flags and we must be careful here to not use a
flag bit which is otherwise relevant for the VFS.
SQLITE_OPEN_MEMORY is handled by sqlite3_open_v2() and friends,
not the VFS, so we'll repurpose that one. If we take a
currently-unused bit and it ends up, at some later point, being
used, we would have to invalidate existing VFS files in order to
move to another bit. Similarly, if the SQLITE_OPEN_MEMORY bit
were ever reassigned (which it won't be!), we'd invalidate all
VFS-side files.
*/;
/** Subdirectory of the VFS's space where "opaque" (randomly-named)
files are stored. Changing this effectively invalidates the data
@@ -329,6 +371,7 @@ globalThis.sqlite3ApiBootstrap.initializers.push(function(sqlite3){
xOpen: function f(pVfs, zName, pFile, flags, pOutFlags){
const pool = getPoolForVfs(pVfs);
try{
flags &= ~FLAG_COMPUTE_DIGEST_V2;
pool.log(`xOpen ${wasm.cstrToJs(zName)} ${flags}`);
// First try to open a path that already exists in the file system.
const path = (zName && wasm.peek8(zName))
@@ -624,7 +667,8 @@ globalThis.sqlite3ApiBootstrap.initializers.push(function(sqlite3){
const fileDigest = new Uint32Array(HEADER_DIGEST_SIZE / 4);
sah.read(fileDigest, {at: HEADER_OFFSET_DIGEST});
const compDigest = this.computeDigest(this.#apBody);
const compDigest = this.computeDigest(this.#apBody, flags);
//warn("getAssociatedPath() flags",'0x'+flags.toString(16), "compDigest", compDigest);
if(fileDigest.every((v,i) => v===compDigest[i])){
// Valid digest
const pathBytes = this.#apBody.findIndex((v)=>0===v);
@@ -633,6 +677,7 @@ globalThis.sqlite3ApiBootstrap.initializers.push(function(sqlite3){
// leaving stale db data laying around.
sah.truncate(HEADER_OFFSET_DATA);
}
//warn("getAssociatedPath() flags",'0x'+flags.toString(16), "compDigest", compDigest,"pathBytes",pathBytes);
return pathBytes
? textDecoder.decode(this.#apBody.subarray(0,pathBytes))
: '';
@@ -655,10 +700,17 @@ globalThis.sqlite3ApiBootstrap.initializers.push(function(sqlite3){
if(HEADER_MAX_PATH_SIZE <= enc.written + 1/*NUL byte*/){
toss("Path too long:",path);
}
if(path && flags){
/* When creating or re-writing files, update their digest, if
needed, to v2. We continue to use v1 for the (!path) case
(empty files) because there's little reason not to use a
digest of 0 for empty entries. */
flags |= FLAG_COMPUTE_DIGEST_V2;
}
this.#apBody.fill(0, enc.written, HEADER_MAX_PATH_SIZE);
this.#dvBody.setUint32(HEADER_OFFSET_FLAGS, flags);
const digest = this.computeDigest(this.#apBody);
const digest = this.computeDigest(this.#apBody, flags);
//console.warn("setAssociatedPath(",path,") digest",digest);
sah.write(this.#apBody, {at: 0});
sah.write(digest, {at: HEADER_OFFSET_DIGEST});
sah.flush();
@@ -679,15 +731,22 @@ globalThis.sqlite3ApiBootstrap.initializers.push(function(sqlite3){
metadata for each file as a validation check. Changing this
algorithm invalidates all existing databases for this VFS, so
don't do that.
See the docs for FLAG_COMPUTE_DIGEST_V2 for more details.
*/
computeDigest(byteArray){
let h1 = 0xdeadbeef;
let h2 = 0x41c6ce57;
for(const v of byteArray){
h1 = 31 * h1 + (v * 307);
h2 = 31 * h2 + (v * 307);
computeDigest(byteArray, fileFlags){
if( fileFlags & FLAG_COMPUTE_DIGEST_V2 ){
let h1 = 0xdeadbeef;
let h2 = 0x41c6ce57;
for(const v of byteArray){
h1 = Math.imul(h1 ^ v, 2654435761);
h2 = Math.imul(h2 ^ v, 104729);
}
return new Uint32Array([h1>>>0, h2>>>0]);
}else{
/* this is what the buggy legacy computation worked out to */
return new Uint32Array([0,0]);
}
return new Uint32Array([h1>>>0, h2>>>0]);
}
/**
+4 -3
View File
@@ -45,6 +45,7 @@
** "sqlite3-wasmfs" build, only "esm" (ES6 Module) is legal.
*/
#define JS_BUILD_MODES vanilla esm bundler-friendly node
/* Separator to help eyeballs find the different sections */
static const char * zBanner =
"\n########################################################################\n";
@@ -140,8 +141,8 @@ static void mk_prologue(void){
** mk_lib_mode().
**
** Maintenance reminder: do not combine flags within this enum,
** e.g. LIBMODE_BUNDLER_FRIEND=0x02|LIBMODE_ESM, as that will lead to
** breakage in some of the flag checks.
** e.g. LIBMODE_BUNDLER_FRIENDLY=0x02|LIBMODE_ESM, as that will lead
** to breakage in some of the flag checks.
*/
enum LibModeFlags {
/* Indicates an ESM module build. */
@@ -208,7 +209,7 @@ static void mk_pre_post(const char *zName /* build name */,
pf("$(eval $(call SQLITE.CALL.C-PP.FILTER,$(extern-post-js.js.in),$(extern-post-js.js.%s-%s),"
"$(c-pp.D.%s-%s)))\n", zNM, zNM);
/* Combine flags for use with emcc... */
/* Combined flags for use with emcc... */
pf("pre-post-common.flags.%s-%s := "
"$(pre-post-common.flags) "
"--post-js=$(post-js.js.%s-%s) "
+1 -1
View File
@@ -3506,7 +3506,7 @@ globalThis.sqlite3InitModule = sqlite3InitModule;
});
db.exec([
"create table t(a);",
"insert into t(a) values(1),(2),(3);",
"insert into t(a) values(1),(2),(1);",
"select auxtest(1,a), auxtest(1,a) from t order by a"
]);
}finally{
@@ -0,0 +1,94 @@
/*
2025-01-31
The author disclaims copyright to this source code. In place of a
legal notice, here is a blessing:
* May you do good and not evil.
* May you find forgiveness for yourself and forgive others.
* May you share freely, never taking more than you give.
***********************************************************************
This file is part of testing the OPFS SAHPool VFS's computeDigest()
fix. See ./digest.html for the details.
*/
const clog = console.log.bind(console);
const wPost = (type,...args)=>postMessage({type, payload:args});
const log = (...args)=>{
clog("Worker:",...args);
wPost('log',...args);
}
const hasOpfs = ()=>{
return globalThis.FileSystemHandle
&& globalThis.FileSystemDirectoryHandle
&& globalThis.FileSystemFileHandle
&& globalThis.FileSystemFileHandle.prototype.createSyncAccessHandle
&& navigator?.storage?.getDirectory;
};
if( !hasOpfs() ){
wPost('error',"OPFS not detected");
throw new Error("OPFS not detected");
}
clog("Importing sqlite3...");
const searchParams = new URL(self.location.href).searchParams;
importScripts(searchParams.get('sqlite3.dir') + '/sqlite3.js');
const runTests = function(sqlite3, poolUtil){
const fname = '/my.db';
let db = new poolUtil.OpfsSAHPoolDb(fname);
let n = (new Date()).valueOf();
try {
db.exec([
"create table if not exists t(a);"
]);
db.exec({
sql: "insert into t(a) values(?)",
bind: n++
});
log(fname,"record count: ",db.selectValue("select count(*) from t"));
}finally{
db.close();
}
db = new poolUtil.OpfsSAHPoolDb(fname);
try {
db.exec({
sql: "insert into t(a) values(?)",
bind: n++
});
log(fname,"record count: ",db.selectValue("select count(*) from t"));
}finally{
db.close();
}
const fname2 = '/my2.db';
db = new poolUtil.OpfsSAHPoolDb(fname2);
try {
db.exec([
"create table if not exists t(a);"
]);
db.exec({
sql: "insert into t(a) values(?)",
bind: n++
});
log(fname2,"record count: ",db.selectValue("select count(*) from t"));
}finally{
db.close();
}
};
globalThis.sqlite3InitModule().then(async function(sqlite3){
log("sqlite3 version:",sqlite3.version);
const sahPoolConfig = {
name: 'opfs-sahpool-digest',
clearOnInit: false,
initialCapacity: 6
};
return sqlite3.installOpfsSAHPoolVfs(sahPoolConfig).then(poolUtil=>{
log('vfs acquired');
runTests(sqlite3, poolUtil);
});
});
+151
View File
@@ -0,0 +1,151 @@
<!doctype html>
<html lang="en-us">
<head>
<meta charset="utf-8">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<link rel="shortcut icon" href="data:image/x-icon;," type="image/x-icon">
<link rel="stylesheet" href="../../../common/emscripten.css"/>
<link rel="stylesheet" href="../../../common/testing.css"/>
<title>sqlite3 tester: OpfsSAHPool Digest</title>
<style></style>
</head>
<body><h1 id='color-target'></h1>
<p>
This is a test app for the digest calculation of the OPFS
SAHPool VFS. It requires running it with a new database created using
v3.49.0 or older, then running it again with a newer version, then
again with 3.49.0 or older.
</p>
<div class='input-wrapper'>
<input type='checkbox' id='cb-log-reverse'>
<label for='cb-log-reverse'>Reverse log order?</label>
</div>
<div id='test-output'></div>
<script>
/*
2025-02-03
The author disclaims copyright to this source code. In place of a
legal notice, here is a blessing:
* May you do good and not evil.
* May you find forgiveness for yourself and forgive others.
* May you share freely, never taking more than you give.
***********************************************************************
This is a bugfix test for the OPFS SAHPool VFS. It requires
setting up a database created using v3.49.0 or older, then
running it again with a newer version. In that case, the newer
version should be able to read the older version's db files
just fine. Revering back to the old version should also still
work - it should be able to read databases modified by the
newer version. However, a database _created_ by a version with
this fix will _not_ be legible by a version which predates
this fix, in which case the older version will see that VFS
file slot as corrupt and will clear it for re-use.
This is unfortunately rather cumbersome to test properly,
and essentially impossible to automate.
*/
(function(){
'use strict';
document.querySelector('h1').innerHTML =
document.querySelector('title').innerHTML;
const mapToString = (v)=>{
switch(typeof v){
case 'number': case 'string': case 'boolean':
case 'undefined': case 'bigint':
return ''+v;
default: break;
}
if(null===v) return 'null';
if(v instanceof Error){
v = {
message: v.message,
stack: v.stack,
errorClass: v.name
};
}
return JSON.stringify(v,undefined,2);
};
const normalizeArgs = (args)=>args.map(mapToString);
const logTarget = document.querySelector('#test-output');
const logClass = function(cssClass,...args){
const ln = document.createElement('div');
if(cssClass){
for(const c of (Array.isArray(cssClass) ? cssClass : [cssClass])){
ln.classList.add(c);
}
}
ln.append(document.createTextNode(normalizeArgs(args).join(' ')));
logTarget.append(ln);
};
const cbReverse = document.querySelector('#cb-log-reverse');
//cbReverse.setAttribute('checked','checked');
const cbReverseKey = 'tester1:cb-log-reverse';
const cbReverseIt = ()=>{
logTarget.classList[cbReverse.checked ? 'add' : 'remove']('reverse');
//localStorage.setItem(cbReverseKey, cbReverse.checked ? 1 : 0);
};
cbReverse.addEventListener('change', cbReverseIt, true);
/*if(localStorage.getItem(cbReverseKey)){
cbReverse.checked = !!(+localStorage.getItem(cbReverseKey));
}*/
cbReverseIt();
const log = (...args)=>{
//console.log(...args);
logClass('',...args);
}
const warn = (...args)=>{
console.warn(...args);
logClass('warning',...args);
}
const error = (...args)=>{
console.error(...args);
logClass('error',...args);
};
const toss = (...args)=>{
error(...args);
throw new Error(args.join(' '));
};
const endOfWork = (passed=true)=>{
const eH = document.querySelector('#color-target');
const eT = document.querySelector('title');
if(passed){
log("End of work chain. If you made it this far, you win.");
eH.innerText = 'PASS: '+eH.innerText;
eH.classList.add('tests-pass');
eT.innerText = 'PASS: '+eT.innerText;
}else{
eH.innerText = 'FAIL: '+eH.innerText;
eH.classList.add('tests-fail');
eT.innerText = 'FAIL: '+eT.innerText;
}
};
log("Running opfs-sahpool digest tests...");
const W1 = new Worker('digest-worker.js?sqlite3.dir=../../../jswasm');
W1.onmessage = function({data}){
//log("onmessage:",data);
switch(data.type){
case 'log':
log('worker says:', ...data.payload);
break;
case 'error':
error('worker says:', ...data.payload);
endOfWork(false);
break;
case 'initialized':
log(data.workerId, ': Worker initialized',...data.payload);
break;
}
};
})();
</script>
</body>
</html>
+119 -10
View File
@@ -187,6 +187,9 @@ CFLAGS.readline ?= -I$(prefix)/include
# during installation, which may break the build of targets which are
# built after others are installed.
#
# Maintenance reminder: we specifically do not strip binaries, as
# discussed in https://sqlite.org/forum/forumpost/9a67df63eda9925c.
#
INSTALL ?= install
#
# $(ENABLE_LIB_SHARED) =
@@ -367,13 +370,18 @@ INSTALL.noexec = $(INSTALL) -m 0644
#
T.compile = $(T.cc) $(T.compile.extras)
#
# Optionally set by the configure script to include -DSQLITE_DEBUG=1
#
T.cc.TARGET_DEBUG ?=
#
# $(T.cc.sqlite) is $(T.cc) plus any flags which are desired for the
# library as a whole, but not necessarily needed for every binary. It
# will normally get initially populated with flags by the
# configure-generated makefile.
#
T.cc.sqlite ?= $(T.cc)
T.cc.sqlite ?= $(T.cc) $(T.cc.sqlite.extras) $(T.cc.TARGET_DEBUG)
#
# $(CFLAGS.intree_includes) = -I... flags relevant specifically to
@@ -389,7 +397,7 @@ T.cc.sqlite += $(CFLAGS.intree_includes)
#
# $(T.cc.extension) = compiler invocation for loadable extensions.
#
T.cc.extension = $(T.compile) -I. -I$(TOP)/src -DSQLITE_CORE
T.cc.extension = $(T.compile) -I. -I$(TOP)/src $(T.cc.TARGET_DEBUG) -DSQLITE_CORE
#
# $(T.link) = compiler invocation for when the target will be an
@@ -1107,7 +1115,7 @@ sqlite3.h: $(MAKE_SANITY_CHECK) $(TOP)/src/sqlite.h.in \
$(B.tclsh) $(TOP)/tool/mksqlite3h.tcl $(TOP) -o sqlite3.h
sqlite3.c: .target_source sqlite3.h $(TOP)/tool/mksqlite3c.tcl src-verify$(B.exe) \
$(B.tclsh)
$(B.tclsh) $(EXTRA_SRC)
$(B.tclsh) $(TOP)/tool/mksqlite3c.tcl $(AMALGAMATION_GEN_FLAGS) $(EXTRA_SRC)
cp tsrc/sqlite3ext.h .
cp $(TOP)/ext/session/sqlite3session.h .
@@ -1478,7 +1486,7 @@ all: so
# The link named libsqlite3.so.0 is provided in an attempt to reduce
# downstream disruption when performing upgrades from pre-3.48 to a
# version 3.48 or higher. That name is considered a legacy remnant
# and will eventually be removed from this installation process.
# and may eventually be removed from this installation process.
#
# Historically libtool installed the library like so:
#
@@ -1539,6 +1547,8 @@ install-dll-unix-generic: install-dll-out-implib
install-dll-msys: install-dll-out-implib $(install-dir.bin)
$(INSTALL) $(libsqlite3.DLL) "$(install-dir.bin)"
# ----------------------------------------------^^^ yes, bin
# Each of {msys,mingw,cygwin} uses a different name for the DLL, but
# that is already accounted for via $(libsqlite3.DLL).
install-dll-mingw: install-dll-msys
install-dll-cygwin: install-dll-msys
@@ -2169,10 +2179,10 @@ fuzzy: fuzzcheck$(T.exe)
xbin: fuzzcheck$(T.exe)
# -fsanitize=... flags for fuzzcheck-asan.
CFLAGS.fuzzcheck.fsanitize ?= -fsanitize=address
CFLAGS.fuzzcheck-asan.fsanitize ?= -fsanitize=address
fuzzcheck-asan$(T.exe): $(FUZZCHECK_SRC) sqlite3.c sqlite3.h $(FUZZCHECK_DEP)
$(T.link) -o $@ $(CFLAGS.fuzzcheck.fsanitize) $(FUZZCHECK_OPT) $(FUZZCHECK_SRC) \
$(T.link) -o $@ $(CFLAGS.fuzzcheck-asan.fsanitize) $(FUZZCHECK_OPT) $(FUZZCHECK_SRC) \
sqlite3.c $(LDFLAGS.libsqlite3)
fuzzy: fuzzcheck-asan$(T.exe)
xbin: fuzzcheck-asan$(T.exe)
@@ -2192,11 +2202,110 @@ xbin: fuzzcheck-ubsan$(T.exe)
#
# FUZZDB=test/fuzzdata*.db make run-fuzzcheck
#
run-fuzzcheck: fuzzcheck$(T.exe) fuzzcheck-asan$(T.exe) fuzzcheck-ubsan$(T.exe)
# The original rules for this target were like this:
#
# run-fuzzcheck: fuzzcheck$(T.exe) fuzzcheck-asan$(T.exe) fuzzcheck-ubsan$(T.exe)
# @if test "$(FUZZDB)" = ""; then echo 'ERROR: No FUZZDB specified. Rerun with FUZZDB=filename'; exit 1; fi
# ./fuzzcheck$(T.exe) --spinner $(FUZZDB)
# ./fuzzcheck-asan$(T.exe) --spinner $(FUZZDB)
# ./fuzzcheck-ubsan$(T.exe) --spinner $(FUZZDB)
#
# What follows is a decomposition of these rules in a way that allows make
# to run things in parallel when using the -jN option.
#
FUZZDB-check:
@if test "$(FUZZDB)" = ""; then echo 'ERROR: No FUZZDB specified. Rerun with FUZZDB=filename'; exit 1; fi
./fuzzcheck$(T.exe) --spinner $(FUZZDB)
./fuzzcheck-asan$(T.exe) --spinner $(FUZZDB)
./fuzzcheck-ubsan$(T.exe) --spinner $(FUZZDB)
run-fuzzcheck: run-fuzzcheck-n0
run-fuzzcheck-n0: FUZZDB-check fuzzcheck$(T.exe)
./fuzzcheck$(T.exe) --slice 0 10 $(FUZZDB)
run-fuzzcheck: run-fuzzcheck-n1
run-fuzzcheck-n1: FUZZDB-check fuzzcheck$(T.exe)
./fuzzcheck$(T.exe) --slice 1 10 $(FUZZDB)
run-fuzzcheck: run-fuzzcheck-n2
run-fuzzcheck-n2: FUZZDB-check fuzzcheck$(T.exe)
./fuzzcheck$(T.exe) --slice 2 10 $(FUZZDB)
run-fuzzcheck: run-fuzzcheck-n3
run-fuzzcheck-n3: FUZZDB-check fuzzcheck$(T.exe)
./fuzzcheck$(T.exe) --slice 3 10 $(FUZZDB)
run-fuzzcheck: run-fuzzcheck-n4
run-fuzzcheck-n4: FUZZDB-check fuzzcheck$(T.exe)
./fuzzcheck$(T.exe) --slice 4 10 $(FUZZDB)
run-fuzzcheck: run-fuzzcheck-n5
run-fuzzcheck-n5: FUZZDB-check fuzzcheck$(T.exe)
./fuzzcheck$(T.exe) --slice 5 10 $(FUZZDB)
run-fuzzcheck: run-fuzzcheck-n6
run-fuzzcheck-n6: FUZZDB-check fuzzcheck$(T.exe)
./fuzzcheck$(T.exe) --slice 6 10 $(FUZZDB)
run-fuzzcheck: run-fuzzcheck-n7
run-fuzzcheck-n7: FUZZDB-check fuzzcheck$(T.exe)
./fuzzcheck$(T.exe) --slice 7 10 $(FUZZDB)
run-fuzzcheck: run-fuzzcheck-n8
run-fuzzcheck-n8: FUZZDB-check fuzzcheck$(T.exe)
./fuzzcheck$(T.exe) --slice 8 10 $(FUZZDB)
run-fuzzcheck: run-fuzzcheck-n9
run-fuzzcheck-n9: FUZZDB-check fuzzcheck$(T.exe)
./fuzzcheck$(T.exe) --slice 9 10 $(FUZZDB)
run-fuzzcheck: run-fuzzcheck-a0
run-fuzzcheck-a0: FUZZDB-check fuzzcheck-asan$(T.exe)
./fuzzcheck-asan$(T.exe) --slice 0 10 $(FUZZDB)
run-fuzzcheck: run-fuzzcheck-a1
run-fuzzcheck-a1: FUZZDB-check fuzzcheck-asan$(T.exe)
./fuzzcheck-asan$(T.exe) --slice 1 10 $(FUZZDB)
run-fuzzcheck: run-fuzzcheck-a2
run-fuzzcheck-a2: FUZZDB-check fuzzcheck-asan$(T.exe)
./fuzzcheck-asan$(T.exe) --slice 2 10 $(FUZZDB)
run-fuzzcheck: run-fuzzcheck-a3
run-fuzzcheck-a3: FUZZDB-check fuzzcheck-asan$(T.exe)
./fuzzcheck-asan$(T.exe) --slice 3 10 $(FUZZDB)
run-fuzzcheck: run-fuzzcheck-a4
run-fuzzcheck-a4: FUZZDB-check fuzzcheck-asan$(T.exe)
./fuzzcheck-asan$(T.exe) --slice 4 10 $(FUZZDB)
run-fuzzcheck: run-fuzzcheck-a5
run-fuzzcheck-a5: FUZZDB-check fuzzcheck-asan$(T.exe)
./fuzzcheck-asan$(T.exe) --slice 5 10 $(FUZZDB)
run-fuzzcheck: run-fuzzcheck-a6
run-fuzzcheck-a6: FUZZDB-check fuzzcheck-asan$(T.exe)
./fuzzcheck-asan$(T.exe) --slice 6 10 $(FUZZDB)
run-fuzzcheck: run-fuzzcheck-a7
run-fuzzcheck-a7: FUZZDB-check fuzzcheck-asan$(T.exe)
./fuzzcheck-asan$(T.exe) --slice 7 10 $(FUZZDB)
run-fuzzcheck: run-fuzzcheck-a8
run-fuzzcheck-a8: FUZZDB-check fuzzcheck-asan$(T.exe)
./fuzzcheck-asan$(T.exe) --slice 8 10 $(FUZZDB)
run-fuzzcheck: run-fuzzcheck-a9
run-fuzzcheck-a9: FUZZDB-check fuzzcheck-asan$(T.exe)
./fuzzcheck-asan$(T.exe) --slice 9 10 $(FUZZDB)
run-fuzzcheck: run-fuzzcheck-u0
run-fuzzcheck-u0: FUZZDB-check fuzzcheck-ubsan$(T.exe)
./fuzzcheck-ubsan$(T.exe) --slice 0 10 $(FUZZDB)
run-fuzzcheck: run-fuzzcheck-u1
run-fuzzcheck-u1: FUZZDB-check fuzzcheck-ubsan$(T.exe)
./fuzzcheck-ubsan$(T.exe) --slice 1 10 $(FUZZDB)
run-fuzzcheck: run-fuzzcheck-u2
run-fuzzcheck-u2: FUZZDB-check fuzzcheck-ubsan$(T.exe)
./fuzzcheck-ubsan$(T.exe) --slice 2 10 $(FUZZDB)
run-fuzzcheck: run-fuzzcheck-u3
run-fuzzcheck-u3: FUZZDB-check fuzzcheck-ubsan$(T.exe)
./fuzzcheck-ubsan$(T.exe) --slice 3 10 $(FUZZDB)
run-fuzzcheck: run-fuzzcheck-u4
run-fuzzcheck-u4: FUZZDB-check fuzzcheck-ubsan$(T.exe)
./fuzzcheck-ubsan$(T.exe) --slice 4 10 $(FUZZDB)
run-fuzzcheck: run-fuzzcheck-u5
run-fuzzcheck-u5: FUZZDB-check fuzzcheck-ubsan$(T.exe)
./fuzzcheck-ubsan$(T.exe) --slice 5 10 $(FUZZDB)
run-fuzzcheck: run-fuzzcheck-u6
run-fuzzcheck-u6: FUZZDB-check fuzzcheck-ubsan$(T.exe)
./fuzzcheck-ubsan$(T.exe) --slice 6 10 $(FUZZDB)
run-fuzzcheck: run-fuzzcheck-u7
run-fuzzcheck-u7: FUZZDB-check fuzzcheck-ubsan$(T.exe)
./fuzzcheck-ubsan$(T.exe) --slice 7 10 $(FUZZDB)
run-fuzzcheck: run-fuzzcheck-u8
run-fuzzcheck-u8: FUZZDB-check fuzzcheck-ubsan$(T.exe)
./fuzzcheck-ubsan$(T.exe) --slice 8 10 $(FUZZDB)
run-fuzzcheck: run-fuzzcheck-u9
run-fuzzcheck-u9: FUZZDB-check fuzzcheck-ubsan$(T.exe)
./fuzzcheck-ubsan$(T.exe) --slice 9 10 $(FUZZDB)
ossshell$(T.exe): $(TOP)/test/ossfuzz.c $(TOP)/test/ossshell.c sqlite3.c sqlite3.h
$(T.link) -o $@ $(FUZZCHECK_OPT) $(TOP)/test/ossshell.c \
+147 -141
View File
@@ -1,11 +1,12 @@
C Work\saround\scompilers\sthat\sdo\snot\sunderstand\sflexible\sarrays,\sin\sthe\nrecovery\sextension\sand\sin\sthe\sfuzzcheck\stest\smodule.
D 2025-03-15T19:00:46.484
C Add\sthe\s?ENCODING?\sparameter\sto\sthe\s"db\scopy"\scommand.\sIf\sused,\sit\swill\stranslate\sfrom\sthe\sgiven\sencoding\sto\sUTF-8
D 2025-03-31T11:24:10.202
F .fossil-settings/binary-glob 61195414528fb3ea9693577e1980230d78a1f8b0a54c78cf1b9b24d0a409ed6a x
F .fossil-settings/empty-dirs dbb81e8fc0401ac46a1491ab34a7f2c7c0452f2f06b54ebb845d024ca8283ef1
F .fossil-settings/ignore-glob 35175cdfcf539b2318cb04a9901442804be81cd677d8b889fcc9149c21f239ea
F LICENSE.md e108e1e69ae8e8a59e93c455654b8ac9356a11720d3345df2a4743e9590fb20d
F Makefile.in 2788f5a3c36e26817707003170871936d44f46c5b45f8cbefe07c9f1a51a8988
F Makefile.in 34794659ddf442225267c4c9b743b7817d2321be88d5eb44d87f35443dc284b6
F Makefile.linux-generic bd3e3cacd369821a6241d4ea1967395c962dfe3057e38cb0a435cee0e8b789d0
F Makefile.msc ef04498c7e227a0f459b105bb4952f26cc985d1d6340a367e62d5a79c4689dfb
F Makefile.msc bb2cc6f75bbcb2d690fbdd1489914a2febd5e99bad9c77538cb3330d304694c6
F README.md a953c0cffd6e4f2501a306c00ee2b6e1e6630c25031e094629307fe99dd003d1
F VERSION 001dea55eb8304ec9130b6b44a32d3fc349f279d45a7e224fc0730c3cb8e2372
F art/icon-243x273.gif 9750b734f82fdb3dc43127753d5e6fbf3b62c9f4e136c2fbf573b2f57ea87af5
@@ -14,13 +15,13 @@ F art/sqlite370.eps aa97a671332b432a54e1d74ff5e8775be34200c2
F art/sqlite370.ico af56c1d00fee7cd4753e8631ed60703ed0fc6e90
F art/sqlite370.jpg d512473dae7e378a67e28ff96a34da7cb331def2
F art/sqlite370.svg 40b7e2fe8aac3add5d56dd86ab8d427a4eca5bcb3fe4f8946cb3794e1821d531
F auto.def 3eae53b31c798490a4af13ab8f14948f176c742f4778cc58d8b1f6d6d2e01a62
F auto.def 80e6d7f7172fcfc53c67e9304c80482637aee04d3370f172f82d1244ff1f19ef
F autoconf/Makefile.fallback 22fe523eb36dfce31e0f6349f782eb084e86a5620b2b0b4f84a2d6133f53f5ac
F autoconf/Makefile.in 6c98c82f52aa27a5c586080cf7c61c811174c2b6d8b8de33fd657d78d541dd7d
F autoconf/Makefile.in 66d98d473556c4e2daf7252355f4b5db129091800027f280082804eb4c45784f
F autoconf/Makefile.msc 5bc67d3912444c40c6f96d003e5c90663e51abb83d204a520110b1b2038dcd8b
F autoconf/README.first f1d3876e9a7852c22f275a6f06814e64934cecbc0b5b9617d64849094c1fd136
F autoconf/README.txt 1a32296d8bbdd67110c79d224c92c05545a0b5bd0c272950025fe3c7c7b49580
F autoconf/auto.def 8d81c1d728d8462a9b6c1ca0714013bbb097aee0ae5e79309d7939cead98e295
F autoconf/auto.def b140692fe36c1661a6fe4185fe0076e8fa27a3cdc556b92f252f9ca68ce9d855
F autoconf/tea/Makefile.in ba0556fee8da09c066bad85a4457904e46ee2c2eabaa309c0e83a78f2f151a8e
F autoconf/tea/README.txt 6c396709b45eb2b3be0ae6dc7e40a140d231962e3a2354da6c4dd48b1d9999bc
F autoconf/tea/aclocal.m4 52c47aac44ce0ddb1f918b6993e8beb8eee88f43
@@ -37,7 +38,7 @@ F autoconf/tea/win/rules.vc 94a18c3e453535459b4a643983acca52fb8756e79055bd2ad4b0
F autoconf/tea/win/targets.vc 96a25a1fa6e9e9cfb348fd3760a5395b4ce8acafc8ed10f0412937ec200d5dbd
F autosetup/LICENSE 41a26aebdd2cd185d1e2b210f71b7ce234496979f6b35aef2cbf6b80cbed4ce4
F autosetup/README.autosetup a78ff8c4a3d2636a4268736672a74bf14a82f42687fcf0631a70c516075c031e
F autosetup/README.md b306314e8a87ccf873cb5b2a360c4a27bbf841df5b76f3acbd65322cff165476
F autosetup/README.md f324bb9f9bf1cc787122034df53fbfdfed28ee2657e6652b763d992ab0d04829
F autosetup/autosetup 74a9782b68d07934510190fbd03fc6ad92e63f0ea3b5cbffa5f0bd271ad60f01 x
F autosetup/autosetup-config.guess dfa101c5e8220e864d5e9c72a85e87110df60260d36cb951ad0a85d6d9eaa463 x
F autosetup/autosetup-config.sub a38fb074d0dece01cf919e9fb534a26011608aa8fa606490864295328526cd73 x
@@ -47,10 +48,11 @@ F autosetup/cc-db.tcl 6e0ed90146197a5a05b245e649975c07c548e30926b218ca3e1d4dc034
F autosetup/cc-lib.tcl 493c5935b5dd3bf9bd4eca89b07c8b1b1a9356d61783035144e21795facf7360
F autosetup/cc-shared.tcl 4f024e94a47f427ba61de1739f6381ef0080210f9fae89112d5c1de1e5460d78
F autosetup/cc.tcl c0fcc50ca91deff8741e449ddad05bcd08268bc31177e613a6343bbd1fd3e45f
F autosetup/find_tclconfig.tcl e64886ffe3b982d4df42cd28ed91fe0b5940c2c5785e126c1821baf61bc86a7e
F autosetup/jimsh0.c a57c16e65dcffc9c76e496757cb3f7fb47e01ecbd1631a0a5e01751fc856f049
F autosetup/pkg-config.tcl 4e635bf39022ff65e0d5434339dd41503ea48fc53822c9c5bde88b02d3d952ba
F autosetup/proj.tcl 409dd44d07b2bc9ee98778619f6c0d0123e79f16a0dc726463e037d10f45745e
F autosetup/sqlite-config.tcl 831985320d98002fcd5ea064cae8a49f8afcd9685d83178ef1ebb79189b5045c
F autosetup/proj.tcl cac07d75249fa127500b8e96080dc807e9ae97fe98d29e84a17bc28f4628e93f
F autosetup/sqlite-config.tcl b9ab4e0305833757cdc9ba8d366434f31e5ee46083230f5b3343ff09bc2ea0d7
F autosetup/system.tcl 51d4be76cd9a9074704b584e5c9cbba616202c8468cf9ba8a4f8294a7ab1dba9
F configure 9a00b21dfd13757bbfb8d89b30660a89ec1f8f3a79402b8f9f9b6fc475c3303a x
F contrib/sqlitecon.tcl eb4c6578e08dd353263958da0dc620f8400b869a50d06e271ab0be85a51a08d3
@@ -73,23 +75,23 @@ F ext/expert/expert.c d548d603a4cc9e61f446cc179c120c6713511c413f82a4a32b1e1e69d3
F ext/expert/expert1.test 1d2da6606623b57bb47064e02140823ce1daecd4cacbf402c73ad3473d7f000c
F ext/expert/sqlite3expert.c cf4b1e5584862f486a4c6014ddb081831f1c512065dcf35644638d57179979d6
F ext/expert/sqlite3expert.h ca81efc2679a92373a13a3e76a6138d0310e32be53d6c3bfaedabd158ea8969b
F ext/expert/test_expert.c b767b2039a0df707eb3147e86bcf68b252d8455d9a41774b1a836cd052ceca70
F ext/expert/test_expert.c c395134bd6d4efa594a7d26578a1cb624c4027b79b4b5fcd44736c5ef1f5f725
F ext/fts3/README.content b9078d0843a094d86af0d48dffbff13c906702b4c3558012e67b9c7cc3bf59ee
F ext/fts3/README.syntax b72477722e9b4fe43f8403227d790a1c94221bfad15c27863a4b36d1052e892b
F ext/fts3/README.tokenizers b92bdeb8b46503f0dd301d364efc5ef59ef9fa8e2758b8e742f39fa93a2e422d
F ext/fts3/README.txt 8c18f41574404623b76917b9da66fcb0ab38328d
F ext/fts3/fts3.c fd2a8642fa4701ef5dd6bce7947ecb3c7ae472e1d44022772454a8b74a13155d
F ext/fts3/fts3.c 4f02858ab845a97bedf06e6cc1fba49a81fe5e00a26df68d0ad0f00a5814fa70
F ext/fts3/fts3.h 3a10a0af180d502cecc50df77b1b22df142817fe
F ext/fts3/fts3Int.h ad51347fa5a5a49f6c3bd40a961eafd08f1e410f60b64dea06f115697a2ad9fe
F ext/fts3/fts3Int.h 53f00a0d037c81174af1089ad7776563dcbccb5ed4697405256d3d4260d9fccc
F ext/fts3/fts3_aux.c 7eab82a9cf0830f6551ba3abfdbe73ed39e322a4d3940ee82fbf723674ecd9f3
F ext/fts3/fts3_expr.c 8a20522514c6e93c2935e90b7d269a8819111a6a17a5a91513cd4efcc37c1757
F ext/fts3/fts3_expr.c 5c13796638d8192c388777166075cdc8bc4b6712024cd5b72c31acdbefce5984
F ext/fts3/fts3_hash.c d9dba473741445789330c7513d4f65737c92df23c3212784312931641814672a
F ext/fts3/fts3_hash.h 39cf6874dc239d6b4e30479b1975fe5b22a3caaf
F ext/fts3/fts3_icu.c 305ce7fb6036484085b5556a9c8e62acdc7763f0f4cdf5fd538212a9f3720116
F ext/fts3/fts3_porter.c 024417020c57dd1ab39816f5fe6cf45222a857b78a1f6412f040ada1ceabd4ff
F ext/fts3/fts3_snippet.c 55506af9c656d06ad6acef0735b67749d199617421f2e66c5b7101745b9cf1ba
F ext/fts3/fts3_term.c 6a96027ad364001432545fe43322b6af04ed28bb5619ec51af1f59d0710d6d69
F ext/fts3/fts3_test.c 7a9cb3d61774134211bf4bfdf1adcb581a1a0377f2d050a121ae7ab44baef0e3
F ext/fts3/fts3_test.c cc329471e573f95a6ea9fbca87e89dcfa1d355591c80172ffcd759ac521d25d8
F ext/fts3/fts3_tokenize_vtab.c 7fd9ef364f257b97218b9c331f2378e307375c592f70fd541f714e747d944962
F ext/fts3/fts3_tokenizer.c defede96b5dd5d658edfae77355b9c31ea65236eedc7bbe1adbc50d645cca5bc
F ext/fts3/fts3_tokenizer.h 64c6ef6c5272c51ebe60fc607a896e84288fcbc3
@@ -110,7 +112,7 @@ F ext/fts5/fts5Int.h bffbd0acdcdf509899681f4e1cfeef1c955030acd9fe15ff9082410f80c
F ext/fts5/fts5_aux.c da4a7a9a11ec15c6df0699d908915a209bcde48f0b04101461316b59f71abffb
F ext/fts5/fts5_buffer.c f1e6d0324d7c55329d340673befc26681a372a4d36086caa8d1ec7d7c53066c7
F ext/fts5/fts5_config.c e7d8dd062b44a66cd77e5a0f74f23a2354cd1f3f8575afb967b2773c3384f7f8
F ext/fts5/fts5_expr.c 887a611b34094c828ff5fb19bbc50a6b1bbfd28791db01b0c8bf722e3c9f437a
F ext/fts5/fts5_expr.c be9e5f7f11d87e7bd3680832c93c13050fe351994b5052b0215c2ef40312c23a
F ext/fts5/fts5_hash.c a6266cedd801ab7964fa9e74ebcdda6d30ec6a96107fa24148ec6b7b5b80f6e0
F ext/fts5/fts5_index.c d171f2a507abccb3d524bf461b01f0d3971a9bf221be622ac7c671a991cb62ee
F ext/fts5/fts5_main.c 57933c18efe1058d8871199875c7a59744dabc3904f3aefbf9ff4a4e11fc79e2
@@ -436,7 +438,7 @@ F ext/misc/regexp.c 388e7f237307c7dfbfb8dde44e097946f6c437801d63f0d7ad63f3320d4e
F ext/misc/remember.c add730f0f7e7436cd15ea3fd6a90fd83c3f706ab44169f7f048438b7d6baa69c
F ext/misc/rot13.c 51ac5f51e9d5fd811db58a9c23c628ad5f333c173f1fc53c8491a3603d38556c
F ext/misc/scrub.c 2a44b0d44c69584c0580ad2553f6290a307a49df4668941d2812135bfb96a946
F ext/misc/series.c 69e0d2b5d193c67bdfee5baf79c10ec24a61a40212c7ca9c219edf7afa24305f
F ext/misc/series.c 0c285a21821e71b473e701cb52f6cbd708f76aa1adeb30644909a718ba4f0ba5
F ext/misc/sha1.c cb5002148c2661b5946f34561701e9105e9d339b713ec8ac057fd888b196dcb9
F ext/misc/shathree.c fd22d70620f86a0467acfdd3acd8435d5cb54eb1e2d9ff36ae44e389826993df
F ext/misc/showauth.c 732578f0fe4ce42d577e1c86dc89dd14a006ab52
@@ -501,12 +503,12 @@ F ext/rbu/rbusave.test 588b618dad9d65c4b13d03a79931de82213503fedc26bdf5789c996ec
F ext/rbu/rbusplit.test a6dedd23cf37bcf2e8646d9d7139846e96d60d92f9bc6d6ba6ca8c24c0bd1f72
F ext/rbu/rbutemplimit.test 4980df2d4b74f4dd982add8f78809106154ef5a3c4bdce747422ab0b0481e029
F ext/rbu/rbuvacuum.test 542561741ff2b262e3694bc6012b44694ee62c545845319a06f323783b15311e
F ext/rbu/rbuvacuum2.test ae097d04feb041446a74fac94b24bffeb3fdd60e32b848c5611e507ab702b81b
F ext/rbu/rbuvacuum2.test 1a9bd41f127be2826de2a65204df9118525a8af8d16e61e6bc63ba3ac0010a23
F ext/rbu/rbuvacuum3.test 3ce42695fdf21aaa3499e857d7d4253bc499ad759bcd6c9362042c13cd37d8de
F ext/rbu/rbuvacuum4.test ffccd22f67e2d0b380d2889685742159dfe0d19a3880ca3d2d1d69eefaebb205
F ext/rbu/sqlite3rbu.c c208f72f20784bf2f39244b6cdf8019724a706e1246be289e7621c42aad54695
F ext/rbu/sqlite3rbu.h e3a5bf21e09ca93ce4e8740e00d6a853e90a697968ec0ea98f40826938bdb68e
F ext/rbu/test_rbu.c b9727c3394307d058e806c1da0f8bb7b24daf3c6bb94cb10cca88ea4d5c806c0
F ext/rbu/test_rbu.c 8b6e64e486c28c41ef29f6f4ea6be7b3091958987812784904f5e903f6b56418
F ext/recover/dbdata.c 5295f4f922b60d7035b6b9fd5846b13071b9d97ed7fad8496837bb7640d24771
F ext/recover/recover1.test e16d78e94183562abff569967b18b7c77451d7044365516cd0fe14713a284851
F ext/recover/recover_common.tcl a61306c1eb45c0c3fc45652c35b2d4ec19729e340bdf65a272ce4c229cefd85a
@@ -525,7 +527,7 @@ F ext/recover/recoverslowidx.test c90d59c46bb8924a973ac6fbc38f3163cee38cc240256a
F ext/recover/recoversql.test e66d01f95302a223bcd3fd42b5ee58dc2b53d70afa90b0d00e41e4b8eab20486
F ext/recover/sqlite3recover.c 56c216332ea91233d6d820d429f3384adbec9ecedda67aa98186b691d427cc57
F ext/recover/sqlite3recover.h 011c799f02deb70ab685916f6f538e6bb32c4e0025e79bfd0e24ff9c74820959
F ext/recover/test_recover.c 072260d7452a3b81aba995b2b3269e7ec2aa7f06725544ba4c25b1b0a1dbc61a
F ext/recover/test_recover.c 3d0fb1df7823f5bc22a0b93955034d16a2dfa2eb1e443e9a0123a77f120599a3
F ext/repair/README.md 92f5e8aae749a4dae14f02eea8e1bb42d4db2b6ce5e83dbcdd6b1446997e0c15
F ext/repair/checkfreelist.c e21f06995ff4efdc1622dcceaea4dcba2caa83ca2f31a1607b98a8509168a996
F ext/repair/checkindex.c 7639b4f8928f82c10b950169e60cc45a7f6798df0b299771d17bef025736f657
@@ -576,7 +578,7 @@ F ext/rtree/visual01.txt e9c2564083bcd30ec51b07f881bffbf0e12b50a3f6fced0c222c5c1
F ext/session/changeset.c 7a1e6a14c7e92d36ca177e92e88b5281acd709f3b726298dc34ec0fb58869cb5
F ext/session/changesetfuzz.c 227076ab0ae4447d742c01ee88a564da6478bbf26b65108bf8fac9cd8b0b24aa
F ext/session/changesetfuzz1.test 15b629004e58d5ffcc852e6842a603775bb64b1ce51254831f3d12b113b616cd
F ext/session/session1.test cc7e58976c2cc6263fb7ef0c5125a98eafc2f213c75929f986768d2dbc224725
F ext/session/session1.test 5d2502922d38a1579076863827342379a1609ca6bae78c40691a2be1ed1be2aa x
F ext/session/session2.test ee83bb973b9ce17ccce4db931cdcdae65eb40bbb22089b2fe6aa4f6be3b9303f
F ext/session/session3.test 2cc1629cfb880243aec1a7251145e07b78411d851b39b2aa1390704550db8e6a
F ext/session/session4.test 823f6f018fcbb8dacf61e2960f8b3b848d492b094f8b495eae1d9407d9ab7219
@@ -600,12 +602,12 @@ F ext/session/sessionat.test 00c8badb35e43a2f12a716d2734a44d614ff62361979b6b8541
F ext/session/sessionbig.test 47c381e7acfabeef17d98519a3080d69151723354d220afa2053852182ca7adf
F ext/session/sessionblob.test 87faf667870b72f08e91969abd9f52a383ab7b514506ee194d64a39d8faff00a
F ext/session/sessionchange.test 77c4702050f24270b58070e2cf01c95c3d232a3ef164b70f31974b386ce69903
F ext/session/sessionconflict.test 8b8cbd98548e2e636ddc17d0986276f60e833fb865617dd4f88ea5bbe3a16b96
F ext/session/sessionconflict.test 19e4a53795c4c930bfec49e809311e09b2a9e202d9446e56d7a8b139046a0c07 x
F ext/session/sessiondiff.test e89f7aedcdd89e5ebac3a455224eb553a171e9586fc3e1e6a7b3388d2648ba8d
F ext/session/sessionfault.test c2b43d01213b389a3f518e90775fca2120812ba51e50444c4066962263e45c11
F ext/session/sessionfault2.test b0d6a7c1d7398a7e800d84657404909c7d385965ea8576dc79ed344c46fbf41c
F ext/session/sessionfault3.test ce0b5d182133935c224d72507dbf1c5be1a1febf7e85d0b0fbd6d2f724b32b96
F ext/session/sessioninvert.test 04075517a9497a80d39c495ba6b44f3982c7371129b89e2c52219819bc105a25
F ext/session/sessioninvert.test 9018f6a7387ac745084b6374c5e1aa14d648b372e6e1181cfab3df632b662d26 x
F ext/session/sessionmem.test f2a735db84a3e9e19f571033b725b0b2daf847f3f28b1da55a0c1a4e74f1de09
F ext/session/sessionnoact.test 4c7ae5c7d351cb5323bca62b6b095592ad24bd90a6713c178b62ab0063d23e19
F ext/session/sessionnoop.test a9366a36a95ef85f8a3687856ebef46983df399541174cb1ede2ee53b8011bc7
@@ -617,7 +619,7 @@ F ext/session/sessionstat1.test 5e718d5888c0c49bbb33a7a4f816366db85f59f6a4f97544
F ext/session/sessionwor.test 6fd9a2256442cebde5b2284936ae9e0d54bde692d0f5fd009ecef8511f4cf3fc
F ext/session/sqlite3session.c 8011b9531c7dd8dce55226def022f3303ce40d0b45966877f2c35185f4b1c3fc
F ext/session/sqlite3session.h aa5de3ec8ef0e5313e9f65dafd69e8ba292d170f07b57da9200c040068dab061
F ext/session/test_session.c 12e0a2c15fd60f92da4bb29c697c9177ff0c0dbcdc5129a54c47e999f147937a
F ext/session/test_session.c af162108e8dc40cb9fe0e876e0155cecabcb49e82e5939677d21451e36160283
F ext/wasm/EXPORTED_FUNCTIONS.fiddle.in 27450c8b8c70875a260aca55435ec927068b34cef801a96205adb81bdcefc65c
F ext/wasm/GNUmakefile 24d7e6f446528fa67f5ade6c3c7d7e46e1ac52649d6264cbe24539c1dab608e1
F ext/wasm/README-dist.txt f01081a850ce38a56706af6b481e3a7878e24e42b314cfcd4b129f0f8427066a
@@ -645,7 +647,7 @@ F ext/wasm/api/sqlite3-api-worker1.c-pp.js f646a65257973b8c4481f8a6a216370b85644
F ext/wasm/api/sqlite3-license-version-header.js 0c807a421f0187e778dc1078f10d2994b915123c1223fe752b60afdcd1263f89
F ext/wasm/api/sqlite3-opfs-async-proxy.js 9654b565b346dc609b75d15337f20acfa7af7d9d558da1afeb9b6d8eaa404966
F ext/wasm/api/sqlite3-vfs-helper.c-pp.js 3f828cc66758acb40e9c5b4dcfd87fd478a14c8fb7f0630264e6c7fa0e57515d
F ext/wasm/api/sqlite3-vfs-opfs-sahpool.c-pp.js 16d80af915bfd2529824b999b304425503094eedf34fb113d0791e002b13e5cf
F ext/wasm/api/sqlite3-vfs-opfs-sahpool.c-pp.js 0f68a64e508598910e7c01214ae27d603dfc8baec6a184506fafac603a901931
F ext/wasm/api/sqlite3-vfs-opfs.c-pp.js 4ab0704ee198de7d1059eccedc7703c931510b588d10af0ee36ea5b3ebbac284
F ext/wasm/api/sqlite3-vtab-helper.c-pp.js e809739d71e8b35dfe1b55d24d91f02d04239e6aef7ca1ea92a15a29e704f616
F ext/wasm/api/sqlite3-wasm.c 6a4cd40267eaf08400895c5b9de39c56976c3b97b3c1bbe53fc2e80fa074e9c7
@@ -680,7 +682,7 @@ F ext/wasm/index-dist.html 56132399702b15d70c474c3f1952541e25cb0922942868f70daf1
F ext/wasm/index.html bcaa00eca521b372a6a62c7e7b17a870b0fcdf3e418a5921df1fd61e5344080d
F ext/wasm/jaccwabyt/jaccwabyt.js 6e4f26d0edb5c2e7d381b7eff1924832a040a12274afab2d1e1789027e9f6c5c
F ext/wasm/jaccwabyt/jaccwabyt.md 1128e3563e7eff90b5a373395251fc76cb32386fad1fea6075b0f34a8f1b9bdf
F ext/wasm/mkwasmbuilds.c 082b7372db68c2d4cd9f55e7cde8eb1b83e9569e520984e6b08cb62606f3bf38
F ext/wasm/mkwasmbuilds.c 6e0b22002bc520b7af053681571a96d30049a51f7f1389e81c524e8d420f5d40
F ext/wasm/module-symbols.html dc476b403369b26a1a23773e13b80f41b9a49f0825e81435fe3600a7cfbbe337
F ext/wasm/scratchpad-wasmfs.html a3d7388f3c4b263676b58b526846e9d02dfcb4014ff29d3a5040935286af5b96
F ext/wasm/scratchpad-wasmfs.mjs 66034b9256b218de59248aad796760a1584c1dd842231505895eff00dbd57c63
@@ -696,16 +698,18 @@ F ext/wasm/test-opfs-vfs.html 1f2d672f3f3fce810dfd48a8d56914aba22e45c6834e262555
F ext/wasm/test-opfs-vfs.js 1618670e466f424aa289859fe0ec8ded223e42e9e69b5c851f809baaaca1a00c
F ext/wasm/tester1-worker.html ebc4b820a128963afce328ecf63ab200bd923309eb939f4110510ab449e9814c
F ext/wasm/tester1.c-pp.html 1c1bc78b858af2019e663b1a31e76657b73dc24bede28ca92fbe917c3a972af2
F ext/wasm/tester1.c-pp.js f3a3cbf0207287c4caa9f84b4e2934804e4b5720c71eaf143f33c8122bd3c9f2
F ext/wasm/tester1.c-pp.js 419717b16e12703487a7ccf3ea4e63d693bdfbf7657e55a7e6c559bbccf027d3
F ext/wasm/tests/opfs/concurrency/index.html 657578a6e9ce1e9b8be951549ed93a6a471f4520a99e5b545928668f4285fb5e
F ext/wasm/tests/opfs/concurrency/test.js d08889a5bb6e61937d0b8cbb78c9efbefbf65ad09f510589c779b7cc6a803a88
F ext/wasm/tests/opfs/concurrency/worker.js 0a8c1a3e6ebb38aabbee24f122693f1fb29d599948915c76906681bb7da1d3d2
F ext/wasm/tests/opfs/sahpool/digest-worker.js b0ab6218588f1f0a6d15a363b493ceaf29bfb87804d9e0165915a9996377cf79
F ext/wasm/tests/opfs/sahpool/digest.html 206d08a34dc8bd570b2581d3d9ab3ecad3201b516a598dd096dcf3cf8cd81df8
F ext/wasm/tests/opfs/sahpool/index.html be736567fd92d3ecb9754c145755037cbbd2bca01385e2732294b53f4c842328
F ext/wasm/tests/opfs/sahpool/sahpool-pausing.js f264925cfc82155de38cecb3d204c36e0f6991460fff0cb7c15079454679a4e2
F ext/wasm/tests/opfs/sahpool/sahpool-worker.js bd25a43fc2ab2d1bafd8f2854ad3943ef673f7c3be03e95ecf1612ff6e8e2a61
F ext/wasm/wasmfs.make 68999f5bd8c489239592d59a420f8c627c99169bbd6fa16a404751f757b9f702
F magic.txt 5ade0bc977aa135e79e3faaea894d5671b26107cc91e70783aa7dc83f22f3ba0
F main.mk 09d801f71ac6e84dd6f6afda009b76c2a712cb02edac50c4bcfdae1027dfb4da
F main.mk c35bf589abc5baa7dc4bc44d7f666b82bbc6891fa67486c95d942af9343870b5
F mptest/config01.test 3c6adcbc50b991866855f1977ff172eb6d901271
F mptest/config02.test 4415dfe36c48785f751e16e32c20b077c28ae504
F mptest/crash01.test 61e61469e257df0850df4293d7d4d6c2af301421
@@ -729,7 +733,7 @@ F src/build.c 3fe9b9d0f411cc2139a2d5ffa1c9b555417f89332f4dbf7f8e311c2e69e40c81
F src/callback.c acae8c8dddda41ee85cfdf19b926eefe830f371069f8aadca3aa39adf5b1c859
F src/complete.c a3634ab1e687055cd002e11b8f43eb75c17da23e
F src/date.c 9db4d604e699a73e10b8e85a44db074a1f04c0591a77e2abfd77703f50dce1e9
F src/dbpage.c 2e677acb658a29965e55398bbc61161cb7819da538057c8032adac7ab8e4a8c0
F src/dbpage.c fcb1aafe00872a8aff9a7aa0ef7ff1b01e5817ec7bbd521f8f3e1e674ac8d609
F src/dbstat.c 73362c0df0f40ad5523a6f5501224959d0976757b511299bf892313e79d14f5c
F src/delete.c 03a77ba20e54f0f42ebd8eddf15411ed6bdb06a2c472ac4b6b336521bf7cea42
F src/expr.c 61c3baab38f1b50eb4696e1f37c8f7ae1d1ecbfc1a35d446cfd1886624784131
@@ -767,8 +771,8 @@ F src/os_common.h 6c0eb8dd40ef3e12fe585a13e709710267a258e2c8dd1c40b1948a1d14582e
F src/os_kv.c 4d39e1f1c180b11162c6dc4aa8ad34053873a639bac6baae23272fc03349986a
F src/os_setup.h 6011ad7af5db4e05155f385eb3a9b4470688de6f65d6166b8956e58a3d872107
F src/os_unix.c 410185df4900817c218c0efdb8064b3481af88cb3f7cea7392f820b6eebc7889
F src/os_win.c ab9912a2c1cb39a6429b8de919a5b63ad1c7775e511d748391c57bf9ad03bd29
F src/os_win.h 7b073010f1451abe501be30d12f6bc599824944a
F src/os_win.c caab8bc13f1d64a2ba6b8af35d660ffe25083df3493d9082d7a461a5e9950a50
F src/os_win.h 4c247cdb6d407c75186c94a1e84d5a22cbae4adcec93fcae8d2bc1f956fd1f19
F src/pager.c 9fbb541b46125dfa8914827575e6bb4d15048caa008073b1709112d495d7983b
F src/pager.h 6137149346e6c8a3ddc1eeb40aee46381e9bc8b0fcc6dda8a1efde993c2275b8
F src/parse.y e426d7323311554c75b0aebc426d0fe3c88d9777ffefed236f343ad9e661dc4c
@@ -781,8 +785,8 @@ F src/printf.c 33fc0d7643c848a098afdcb6e1db6de12379d47084b1cd0912cfce1d09345e44
F src/random.c 606b00941a1d7dd09c381d3279a058d771f406c5213c9932bbd93d5587be4b9c
F src/resolve.c 20e1fbe8f840ffc0cd835e33f68a802a22e34faa918d7a269f3de242fda02f99
F src/rowset.c 8432130e6c344b3401a8874c3cb49fefe6873fec593294de077afea2dce5ec97
F src/select.c 8c273248e38a8a7286abe3f41c1931cc65eff602fef128acc0cc0484e1b7abb3
F src/shell.c.in 248050551cad788f8bb4b4728e00d8e36a10130d2d101e55cd51cfee03df91ff
F src/select.c bfe14cdfceba54744b1c6c29099313f5173a0793dfaff0cd484774e9d05dbeab
F src/shell.c.in 1e8b9bf369e80cdf9b029142e773038bc12bd38aea1c56df4af6bf7b46cae955
F src/sqlite.h.in fd70afd92948cf7cc93f687ac960bad1b0b6fbc436752419eff2fd65a1809380
F src/sqlite3.rc 5121c9e10c3964d5755191c80dd1180c122fc3a8
F src/sqlite3ext.h 3f046c04ea3595d6bfda99b781926b17e672fd6d27da2ba6d8d8fc39981dcb54
@@ -790,53 +794,53 @@ F src/sqliteInt.h 96133c5b4371629b30644a88108a0ca99e6a95a55509cdfc8de9961fba4bbd
F src/sqliteLimit.h 6d817c28a8f19af95e6f4921933b7fbbca48a962bce0eb0ec81e8bb3ef38e68b
F src/status.c 0e72e4f6be6ccfde2488eb63210297e75f569f3ce9920f6c3d77590ec6ce5ffd
F src/table.c 0f141b58a16de7e2fbe81c308379e7279f4c6b50eb08efeec5892794a0ba30d1
F src/tclsqlite.c 254e69d6b4bc185ca2a3b186a92bda186aec9038063ebb9247b9b3181d4b4d4f
F src/tclsqlite.c b13fe776a38910f237b5b9861060c83eaa671533f341f49b5eff9a084468f78d
F src/tclsqlite.h 65e2c761446e1c9fa0342b7d2612a703483643c8b6a316d12a65b745a4727395
F src/test1.c ba7b93478a6a7a3f48ec5507f28bc662636ac5d9f9791700d3648a8e788f0bb2
F src/test2.c 7ebc518e6735939d8979273a6f7b1d9b5702babf059f6ad62499f7f60a9eb9a3
F src/test3.c e7573aa0f78ee4e070a4bc8c3493941c1aa64d5c66d4825c74c0f055451f432b
F src/test4.c 13e57ae7ec7a959ee180970aef09deed141252fe9bb07c61054f0dfa4f1dfd5d
F src/test5.c bb87279ed12e199486894e6c83e58dc8cd1de9524ace171d59219d3ab696a0c1
F src/test6.c 763b92489f11f4a77b773f0d3b8369ab0edd5292ac794043062c337019f12d8a
F src/test1.c e89a11192dd15da20e8f7dc0731297182b2fff56cf4afe6ca6f9aeab890595c5
F src/test2.c 62f0830958f9075692c29c6de51b495ae8969e1bef85f239ffcd9ba5fb44a5ff
F src/test3.c 432646f581d8af1bb495e58fc98234380250954f5d5535e507fc785eccc3987a
F src/test4.c 0ac87fc13cdb334ab3a71823f99b6c32a6bebe5d603cd6a71d84c823d43a25a0
F src/test5.c 38fa635a70a94f2aa8b47ecbab15d821386205d27ad4159c3551ab3ba45efa11
F src/test6.c 9722054d37257459f1b8988e59e7db1dd630bfb291f16b2759764e778a9d1899
F src/test8.c 206d8f3cc73950d252906656e2646b5de0d580b07187b635fcb3edd8c2c5fbc0
F src/test9.c 7a708ad27f8fda79113e5e15de66632710958c401e64c2f22bc04e2f5a7a1b62
F src/test9.c df9ddc7db6ef1b8cf745866ee229090779728bcbe660c7f297d3127ab21d92af
F src/test_autoext.c 14d4bbd3d0bd1eec0f6d16b29e28cf1e2d0b020d454835f0721a5f68121ac10f
F src/test_backup.c bd901e3c116c7f3b3bbbd4aae4ce87d99b400c9cbb0a9e7b4610af451d9719a7
F src/test_backup.c a2bfd90d2ff2511b8635507bdb30fa9b605ade19c16b533066cae3077f5bdb72
F src/test_bestindex.c 3401bee51665cbf7f9ed2552b5795452a8b86365e4c9ece745b54155a55670c6
F src/test_blob.c bcdf6a6c22d0bcc13c41479d63692ef413add2a4d30e1e26b9f74ab85b9fb4d5
F src/test_blob.c 77b994e17f2c87055f44fd96c9a206c5a7155bae2cda2769af60c2f3582f962c
F src/test_btree.c 28283787d32b8fa953eb77412ad0de2c9895260e4e5bd5a94b3c7411664f90d5
F src/test_config.c 7f412406592794636d6226268e26d413850a9f799bc5f3c01afc2820b165fca8
F src/test_delete.c e2fe07646dff6300b48d49b2fee2fe192ed389e834dd635e3b3bac0ce0bf9f8f
F src/test_delete.c d0e8f6dc55cfc98a7c27c057fb88d512260564bf0b611482656c68b8f7f401ed
F src/test_demovfs.c 3efa2adf4f21e10d95521721687d5ca047aea91fa62dd8cc22ac9e5a9c942383
F src/test_devsym.c 649434ed34d0b03fbd5a6b42df80f0f9a7e53f94dd1710aad5dd8831e91c4e86
F src/test_fs.c c411c40baba679536fc34e2679349f59d8225570aed3488b5b3ef1908525a3d5
F src/test_fs.c 6711fd4c6c05914b613cfc99918a24978452f999ce03fc8f89c9794c03b20a5b
F src/test_func.c 858d4dddb7acf88222ebcba7cffb585f6dde83e4a15b838c0d05ccdf8d5219b9
F src/test_hexio.c 7449504e4bde876ba91b202617a9228c7c8c2e7bd8b957302f3803ac0e9e353c
F src/test_init.c 17313332d58e90defc527129d5eda4a08bd6b6e8de7207a231523c8d98fb445e
F src/test_hexio.c a90baa0a8ab5e7cfe2216a61c9a31cfd1f8378353a3d23e25fa94c09aa755bb0
F src/test_init.c 1649e02448f536e53172f6b1ff873254fe9a0c6c8a4502a2d25c0cc7b11945ea
F src/test_intarray.c 3fcf8ca7bb5c8776ea83f6aa9b66f8df0d1f37a99207b0097c8486f9c15cedbf
F src/test_intarray.h 6c3534641108cd1bea517a8e117dcba237081310a29a4c35bd2190caa8972293
F src/test_journal.c a0b9709b2f12b1ec819eea8a1176f283bca6d688a6d4a502bd6fd79786f4e287
F src/test_loadext.c 337056bae59f80b9eb00ba82088b39d0f4fe6dfd
F src/test_malloc.c 4954125ee89aa51d9f641d5cb272cc93ca4cb03dcc7c9c941d70210354c69567
F src/test_malloc.c f1901a7a32fadff1978d6aca8e3bd2c6cc1e41b790ff19d369cc0367116a1828
F src/test_md5.c 811a45330c9391933360f998156a8907ee29909c828ab83ac05d329942cbea8f
F src/test_multiplex.c b99d7f43ec859e6b93a40aaa5455420b3ad133053cce3db739498d29ea30735f
F src/test_multiplex.c 82f0aa8eee629b6949782cfab8782ed35a9b56dc80d12877af52147f304d22b8
F src/test_multiplex.h f0ff5b6f4462bfd46dac165d6375b9530d08089b7bcbe75e88e0926110db5363
F src/test_mutex.c f10fcbc2086b19c7b0ddf2752caf2095e42be74d8d7f6093619445b43b1f777b
F src/test_mutex.c dacae6790956c0d4e705aaed2090227792e291b0496cccd688e9994c1e21f740
F src/test_onefile.c f31e52e891c5fef6709b9fcef54ce660648a34172423a9cbdf4cbce3ba0049f4
F src/test_osinst.c 7aa3feaa3a1da1b5f75bde2ce958dbfe14ec484f065bb2b5b9727d8851fa089b
F src/test_osinst.c 269039d9c0820a02ee928014c30860d57ee757ecda54df42e463d0ca1377b835
F src/test_pcache.c 496da3f7e2ca66aefbc36bbf22138b1eff43ba0dff175c228b760fa020a37bd0
F src/test_quota.c 744552848d9c5c5de3920d1c44b03d425a4123a223310567a199c7e0d3fe80bf
F src/test_quota.c 180e87437250bed7e17e4e61c106730939e39fec9be73d28961f27f579a92078
F src/test_quota.h 2a8ad1952d1d2ca9af0ce0465e56e6c023b5e15d
F src/test_rtree.c d844d746a3cc027247318b970025a927f14772339c991f40e7911583ea5ed0d9
F src/test_schema.c b06d3ddc3edc173c143878f3edb869dd200d57d918ae2f38820534f9a5e3d7d9
F src/test_sqllog.c 540feaea7280cd5f926168aee9deb1065ae136d0bbbe7361e2ef3541783e187a
F src/test_superlock.c 18355ca274746aa6909e3744163e5deb1196a85d5bc64b9cd377273cef626da7
F src/test_syscall.c 9ad7ab39910c16d29411678d91b0d27a7a996a718df5ee93dcd635e846d0275c
F src/test_sqllog.c 5abf04865758c0a3915b4ec2b2ee5ab75f74c00e2f05bf503b9083e0ab6829d7
F src/test_superlock.c 3387fc794a68d8c6b6ed059aabacbfe870dc502c5cf65562f36aac78b4a4d629
F src/test_syscall.c c5bf039261973135068aa68f4d185a6147333dcf266977989f8245b3a1968f1b
F src/test_tclsh.c c01706ac60bd3176754d3ccd37da74c6ad97c2e14489f8ed71b497c1c0ac0dd4
F src/test_tclvar.c ae873248a0188459b1c16ca7cc431265dacce524399e8b46725c2b3b7e048424
F src/test_thread.c d7a8bcea7445f37cc2a1f7f81dd6059634f45e0c61bfe80182b02872fb0328bb
F src/test_thread.c 3edb4a5b5aeb1a6e9a275dccc848ac95acab7f496b3e9230f6d2d04953a2b862
F src/test_vdbecov.c 5c426d9cd2b351f5f9ceb30cabf8c64a63bfcad644c507e0bd9ce2f6ae1a3bf3
F src/test_vfs.c a19728c5930b5f5f415c664c57b029cba98c459fe70639aefcbfc4f70d544335
F src/test_vfs.c b4135c1308516adf0dfd494e6d6c33114e03732be899eace0502919b674586b5
F src/test_windirent.c a895e2c068a06644eef91a7f0a32182445a893b9a0f33d0cdb4283dca2486ac1
F src/test_windirent.h da2e5b73c32d09905fbdd00f27cd802212a32a58ead882736fe4f5eb775ebc50
F src/test_window.c 6d80e11fba89a1796525e6f0048ff0c7789aa2c6b0b11c80827dc1437bd8ea72
@@ -862,7 +866,7 @@ F src/vdbetrace.c fe0bc29ebd4e02c8bc5c1945f1d2e6be5927ec12c06d89b03ef2a4def34bf8
F src/vdbevtab.c fc46b9cbd759dc013f0b3724549cc0d71379183c667df3a5988f7e2f1bd485f3
F src/vtab.c 828221bdbeaaa6d62126ee6d07fd4ec0d09dcaea846f87ad01944d8b7e548859
F src/vxworks.h d2988f4e5a61a4dfe82c6524dd3d6e4f2ce3cdb9
F src/wal.c 554a6b1afaaecb98cb47bb598bccf1374c9d3b624e5c4c3c4eb2ad364cc579f8
F src/wal.c bcf40795a09b699ad7e42624dd6282b13335164fbabcd5a98a717758cebef451
F src/wal.h ba252daaa94f889f4b2c17c027e823d9be47ce39da1d3799886bbd51f0490452
F src/walker.c d5006d6b005e4ea7302ad390957a8d41ed83faa177e412f89bc5600a7462a014
F src/where.c e80177e452b4e436abc6ece0cb0249631000434f2a7425cc1df709015fce74ad
@@ -878,7 +882,7 @@ F test/aggfault.test 777f269d0da5b0c2524c7ff6d99ae9a93db4f1b1839a914dd2a12e3035c
F test/aggnested.test 610b0ce2c3e8f3daee25f9752800ee8d785db10da4aa1fbeea0ea1aabaf1d704
F test/aggorderby.test cc3abf5de64d46ff66395ca8c2346b66c2576d5aedb7bffc5b0742508856e3bf
F test/alias.test 4529fbc152f190268a15f9384a5651bbbabc9d87
F test/all.test 2ecb8bbd52416642e41c9081182a8df05d42c75637afd4488aace78cc4b69e13
F test/all.test cf929f721e20960ca9db89471fa44f9176322ba8f25e97193f91881c223643b3
F test/alter.test 3c00eff1e2036b9f93e9cd0f3d3e63750ac87ecb5bc71b9d7bd07cbf2ac4c494
F test/alter2.test 7e3d26ab409df52df887b366a63902c3429b935c41cb962fd58ffc25784f2f19
F test/alter3.test dcdd5f850f30656a45a0f05e41abfb52b74bbf6ccba165d0f7adf6b0116e4fd6
@@ -913,12 +917,12 @@ F test/analyzeD.test 485f621cfd2ef0a8f8ac79672586651bfa495bd899db50461bb4b558400
F test/analyzeE.test d2ec7921c162cdc33ac8e7eb01f9ebf78100610af7c94c8552bbf551de1fb397
F test/analyzeF.test 40b5cc3ad7b10e81020d7ca86f1417647ecfae7477cfd88acc5aa7ae1068f949
F test/analyzeG.test 623be33038c49648872746c8dd8b23b5792c08fef173c55e82f1b12fca259852
F test/analyzer1.test 459fa02c445ddbf0101a3bad47b34290a35f2e49
F test/analyzer1.test b6a624ec0af92eec209e1328465b66937c8fdf2fb442a3fa45321ddb3700f4aa
F test/atof1.test bd21c4a0e718ab1470de07a2a79f2544d7903be34feebcc80de04beee4807b00
F test/atomic.test 065a453dde33c77ff586d91ccaa6ed419829d492dbb1a5694b8a09f3f9d7d061
F test/atomic2.test b6863b4aa552543874f80b42fb3063f1c8c2e3d8e56b6562f00a3cc347b5c1da
F test/atrc.c c388fac43dbba05c804432a7135ae688b32e8f25818e9994ffba4b64cf60c27c
F test/attach.test 54f8e49e88d0de48f6428267a678465863d2b8f72320612f35bd5c02e240bc2f
F test/attach.test 12b2a9872c1ce20edf40289f00d82d13faae59ced522d98496ab06ad5c5e0a1c
F test/attach2.test 6d1e3a457ce260d6fc8e5945c07fba6c76dc2aa90e1c701f067b50ee88f7315a
F test/attach3.test c59d92791070c59272e00183b7353eeb94915976
F test/attach4.test 00e754484859998d124d144de6d114d920f2ed6ca2f961e6a7f4183c714f885e
@@ -937,10 +941,10 @@ F test/autovacuum.test 00671369bbf96c6a49989a9425f5b78b94075d6a4b031e5e00000c2c3
F test/autovacuum2.test 76f7eb4fe6a6bf6d33a196a7141dba98886d2fb53a268d7feca285d5da4759d7
F test/autovacuum_ioerr2.test 8a367b224183ad801e0e24dcb7d1501f45f244b4
F test/avfs.test 76f59743dc1f5fa533840d1818b420fe1ee45e21c0fd6bbac7942ba677903128
F test/avtrans.test b7dc25459ecbd86c6fa9c606ee3068f59d81e225118617dcf2bbb6ded2ade89e
F test/avtrans.test 7a6eae44763293024b137b53ff824d8500d754dbae060a8d940afbacfc1d4a15
F test/backcompat.test f2431465ed668f09fc3f6998e56e893a1506ccea6e8b6f409f085f759f431b48
F test/backup.test 3b08fd4af69f0fa786931103a31f4542b184aba16e239e5f22b18c3c2476697f
F test/backup2.test 8facb54df1388419d34b362ab1f7e233310ff3a3af64e8ad5ec47ba3c2bbe5cf
F test/backup2.test b153553ee5667b0748b43346b0725fbf80ce1f5544613bf087d669778b60ec56
F test/backup4.test 8f6fd48e0dfde77b9a3bb26dc471ede3e101df32
F test/backup5.test ee5da6d7fe5082f5b9b0bbfa31d016f52412a2e4
F test/backup_ioerr.test 4c3c7147cee85b024ecf6e150e090c32fdbb5135
@@ -948,7 +952,7 @@ F test/backup_malloc.test 0c9abdf74c51e7bedb66d504cd684f28d4bd4027
F test/badutf.test d5360fc31f643d37a973ab0d8b4fb85799c3169f
F test/badutf2.test f310fd3b24a491b6b77bccdf14923b85d6ebcce751068c180d93a6b8ff854399
F test/basexx1.test d8a50f0744b93dca656625597bcd3499ff4b9a4ea2a82432b119b7d46e3e0c08
F test/bc_common.tcl b5e42d80305be95697e6370e015af571e5333a1c
F test/bc_common.tcl c70b896d1d4ce72f769d2c7c1fc15b2cb07559eb2093f2736c8ca51664b29ff5
F test/bestindex1.test 856a453dff8c68b4568601eed5a8b5e20b4763af9229f3947c215729ed878db0
F test/bestindex2.test 394ff8fbf34703391247116d6a44e1c50ee7282236ee77909044573cefc37bc0
F test/bestindex3.test 34bea272b0e0f835651b16a3931dbe7ac927039be6b2e1cb617bbe1d584b492b
@@ -973,7 +977,7 @@ F test/bind2.test 918bc35135f4141809ead7585909cde57d44db90a7a62aef540127148f91aa
F test/bindxfer.test efecd12c580c14df5f4ad3b3e83c667744a4f7e0
F test/bitvec.test 75894a880520164d73b1305c1c3f96882615e142
F test/blob.test e7ac6c7d3a985cc4678c64f325292529a69ae252
F test/bloom1.test cf613a27054bbaf61c5bfc440a5cfd3ff76798d0695f3fc5e5d1bbc819b8dab1
F test/bloom1.test 04f3a17df8912bfdc292c41b59d79f93893fe69799f3089a64451f9112f9658f
F test/boundary1.tcl 6421b2d920d8b09539503a8673339d32f7609eb1
F test/boundary1.test 66d7f4706ccdb42d58eafdb081de07b0eb42d77b
F test/boundary2.tcl e34ef4e930cf1083150d4d2c603e146bd3b76bcb
@@ -1003,7 +1007,7 @@ F test/changes.test 4377d202a487f66fc2822c1bf57c46798c8b2caf7446f4f701723b1dbb6b
F test/changes2.test 07949edcc732af28cb54276bfb7d99723bccc1e905a423648bf57ac5cb0dc792
F test/check.test 56e4ed457e9f8683b9fc56f5b964f461f6e8a8dd5a13f3d495408215d66419ed
F test/checkfault.test da6cb3d50247169efcb20bdf57863a3ccfa1d27d9e55cd324f0680096970f014
F test/chunksize.test 427d87791743486cbf0c3b8c625002f3255cb3a89c6eba655a98923b1387b760
F test/chunksize.test faea11c5d6df9d392252a8dd879e1b1d68c9d3e8b7909cbed8bcec3b60c706f1
F test/cksumvfs.test 6f05dc95847c06a3dc10eee6b5ab1351d78314a52d0db15717c9388f4cb96646
F test/close.test eccbad8ecd611d974cbf47278c3d4e5874faf02d811338d5d348af42d56d647c
F test/closure01.test 9905883f1b171a4638f98fc764879f154e214a306d3d8daf412a15e7f3a9b1e0
@@ -1060,7 +1064,7 @@ F test/crash4.test fe2821baf37168dc59dd733dcf7dba2a401487bc
F test/crash5.test 4aa55e7ac3c4bc511873e457aa65d2827d52da9b51e061511899dadcfe22b1e8
F test/crash6.test 4c56f1e40d0291e1110790a99807aa875b1647ba
F test/crash7.test 1a194c4900a255258cf94b7fcbfd29536db572df
F test/crash8.test 64366e459c28dd62edfb7ad87253a409c7533b92d16fcc479a6a8131bdcc3100
F test/crash8.test 3a0c39c079b441a9b1da22e3edb58817f9dd330c4c3a7f9dd1f9f7c8368ea352
F test/crashM.test d95f59046fa749b0d0822edf18a717788c8f318d
F test/crashtest1.c 09c1c7d728ccf4feb9e481671e29dda5669bbcc2
F test/createtab.test 85cdfdae5c3de331cd888d6c66e1aba575b47c2e3c3cc4a1d6f54140699f5165
@@ -1141,11 +1145,11 @@ F test/expr.test 5c06696478212e5a04e04b043f993373f6f8e5ce5a80f5548a84703b123b6ca
F test/expr2.test c27327ae9c017a7ff6280123f67aff496f912da74d78c888926d68b46ec75fd8
F test/exprfault.test da33606d799718e2f8e34efd0e5858884a1ad87f608774c552a7f5517cc27181
F test/exprfault2.test c49e84273898969af5dbc4fe6a3f4335f14639799f343590336c9ddf84425965
F test/extension01.test 00d13cec817f331a687a243e0e5a2d87b0e358c9
F test/external_reader.test c7d34694f1b25c32d866f56ac80c1e29edddc42b4ef90cad589263ffac2cde0c
F test/extension01.test 5de412c66276105901c370770175003381fdcb0c4da7054fa43cf4a31e0bfa3a
F test/external_reader.test 6fdec43eeca23eb32faad1e95a4d1abc402bc8b3db70df12d6fc08a637f4a2b5
F test/extraquick.test cb254400bd42bfb777ff675356aabf3287978f79
F test/fallocate.test 37a62e396a68eeede8f8d2ecf23573a80faceb630788d314d0a073d862616717
F test/filectrl.test 7e6788759997139632eb700765d5f73d53fc5ff5d9d778e773911750ab134321
F test/filectrl.test 4b720117388cf6766d0b798e2dddd785953f8f371633b0c0084d2f34cf72336a
F test/filefmt.test f393e80c4b8d493b7a7f8f3809a8425bbf4292af1f5140f01cb1427798a2bbd4
F test/filter1.test 590f8ba9a0cd0823b80d89ac75c5ce72276189cef9225d2436adaf1ee87f3727
F test/filter2.tcl 44e525497ce07382915f01bd29ffd0fa49dab3adb87253b5e5103ba8f93393e8
@@ -1278,7 +1282,7 @@ F test/fuzz3.test 70ba57260364b83e964707b9d4b5625284239768ab907dd387c740c0370ce3
F test/fuzz4.test c229bcdb45518a89e1d208a21343e061503460ac69fae1539320a89f572eb634
F test/fuzz_common.tcl b7197de6ed1ee8250a4f82d67876f4561b42ee8cbbfc6160dcb66331bad3f830
F test/fuzz_malloc.test f348276e732e814802e39f042b1f6da6362a610af73a528d8f76898fde6b22f2
F test/fuzzcheck.c e94511f5f5b8c134c83535b4799004b85ead69ed8375d74e9af90e41549a82ad
F test/fuzzcheck.c 19f8af47a5c4ee2c3943fdee270f1f14e3d83fe968a9737a7557fb4e3c06efc1
F test/fuzzdata1.db 3e86d9cf5aea68ddb8e27c02d7dfdaa226347426c7eb814918e4d95475bf8517
F test/fuzzdata2.db 128b3feeb78918d075c9b14b48610145a0dd4c8d6f1ca7c2870c7e425f5bf31f
F test/fuzzdata3.db c6586d3e3cef0fbc18108f9bb649aa77bfc38aba
@@ -1286,7 +1290,7 @@ F test/fuzzdata4.db b502c7d5498261715812dd8b3c2005bad08b3a26e6489414bd13926cd3e4
F test/fuzzdata5.db e35f64af17ec48926481cfaf3b3855e436bd40d1cfe2d59a9474cb4b748a52a5
F test/fuzzdata6.db b8725a5f5cf7a3b7241a9038e57ca7e7cc8c3f4d86b44bd770617bda245ab2b0
F test/fuzzdata7.db 0166b56fd7a6b9636a1d60ef0a060f86ddaecf99400a666bb6e5bbd7199ad1f2
F test/fuzzdata8.db c6f9cb7d2b808fb10894afe53ef00f51e73e43baa7aabdba7e9af4713fc5b186
F test/fuzzdata8.db 8f34ae00d8d5d4747dd80983cf46161065e4f78324dcff3c893506ff8db3a4a6
F test/fuzzer1.test 3d4c4b7e547aba5e5511a2991e3e3d07166cfbb8
F test/fuzzer2.test a85ef814ce071293bce1ad8dffa217cbbaad4c14
F test/fuzzerfault.test f64c4aef4c9e9edf1d6dc0d3f1e65dcc81e67c996403c88d14f09b74807a42bc
@@ -1349,8 +1353,8 @@ F test/interrupt.test ac1ef50ec9ab8e4f0e17c47629f82539d4b22558904e321ed5abea2e61
F test/interrupt2.test e4408ca770a6feafbadb0801e54a0dcd1a8d108d
F test/intpkey.test aee694afed1a65c86c4e69ad030224b3fc268113d00685234d40079fca16bad3
F test/intreal.test 68829a8bb073ee1610ca3f8f9e0f99b0371fb36e0fa64862dd5ced4ef03c2343
F test/io.test f138f3fe696d1ed8c51dfea5b325910d319a1b29e1d25ea57231a02092f02cca
F test/ioerr.test c94eef1cd8bfc36f9aa493e41e151e9160281ac8e2d960cc9dcdcc8e6aa99ab3
F test/io.test d267fdc8915444a45e19841489033ebe70bb69f6db605b00df70be16b2a80f59
F test/ioerr.test 78552a95d53b9674d85f63bdf3d76a8df70b4d5dba5a6a1b8a1d60f166cd2c6b
F test/ioerr2.test 2593563599e2cc6b6b4fcf5878b177bdd5d8df26
F test/ioerr3.test d3cec5e1a11ad6d27527d0d38573fbff14c71bdd
F test/ioerr4.test f130fe9e71008577b342b8874d52984bd04ede2c
@@ -1373,9 +1377,9 @@ F test/joinD.test 2ce62e7353a0702ca5e70008faf319c1d4686aa19fba34275c6d1da0e960be
F test/joinE.test d5d182f3812771e2c0d97c9dcf5dbe4c41c8e21c82560e59358731c4a3981d6b
F test/joinF.test 53dd66158806823ea680dd7543b5406af151b5aafa5cd06a7f3231cd94938127
F test/joinH.test 55f69e64da74d4eca2235237f3acb657aef181e22e45daa228e35bba865e0255
F test/journal1.test c7b768041b7f494471531e17abc2f4f5ebf9e5096984f43ed17c4eb80ba34497
F test/journal1.test bc61a4228db11bffca118bd358ba4b868524bf080f3532749de6c539656e20fa
F test/journal2.test 9dac6b4ba0ca79c3b21446bbae993a462c2397c4
F test/journal3.test 7c3cf23ffc77db06601c1fcfc9743de8441cb77db9d1aa931863d94f5ffa140e
F test/journal3.test e5aeff93a7776cf644dbc48dec277655cff80a1cd24689036abc87869b120ea6
F test/jrnlmode.test 9b5bc01dac22223cb60ec2d5f97acf568d73820794386de5634dcadbea9e1946
F test/jrnlmode2.test 8759a1d4657c064637f8b079592651530db738419e1d649c6df7048cd724363d
F test/jrnlmode3.test 556b447a05be0e0963f4311e95ab1632b11c9eaa
@@ -1408,9 +1412,9 @@ F test/limit2.test 9409b033284642a859fafc95f29a5a6a557bd57c1f0d7c3f554bd64ed69df
F test/literal.test a65dca9fef86e51b8e45544268e37abbd4bb94ba35fd65f6fdcab2f288cd8f79
F test/literal2.tcl 1499037beaf661aeecdbe48801220a181d805372a64c6128d5f26bb6a4a8f0ce
F test/literal2.test b149e16b5fc9ee6249069a8858ed41052f222014fe0ba7ad43c2fb989c2dada2
F test/loadext.test faa4f6eed07a5aac35d57fdd7bc07f8fc82464cfd327567c10cf0ba3c86cde04
F test/loadext.test 878db71cf74b48250dbe9033bbfe6088ff869db3353ffd4febc68c0cd459959e
F test/loadext2.test 0408380b57adca04004247179837a18e866a74f7
F test/lock.test 05f346b65040b9a27c032c984e1e509dfef1661135b4f26a3ab6d21358277803
F test/lock.test 675b4367ec58b21009e46982d071c8259255e69072296b7756ea75fac5425d1a
F test/lock2.test 5242d8ac4e2d59c403aebff606af449b455aceff
F test/lock3.test f271375930711ae044080f4fe6d6eda930870d00
F test/lock4.test 27143363eda1622f03c133efc8db808fc331afd973486cb571ea71cd717d37b8
@@ -1421,7 +1425,7 @@ F test/lock_common.tcl f0a1f7b8f3fbb8629dc6231613a02841736f86ef72151429d5ffc12c7
F test/lookaside.test 5a828e7256f1ee4da8e1bdaa03373a3ccdb0f1ff98dfa82e9b76cb41a45b1083
F test/main.test e8752d76233b1c8906cd2c98ad920dba868bd63c87d51d8a2ea5e9cba55dd496
F test/make-where7.tcl 05c16b5d4f5d6512881dfec560cb793915932ef9
F test/malloc.test 18dd1c4188c81ca79cf123527c71b19ee0c31feb9947fdffb0dc6ceb1436816a
F test/malloc.test f7781c8151179fe4b7f743044a737ac2dfd87bf9cc18dd01398caf28d34e09c5
F test/malloc3.test 6e88bae6312854a4adb4ecc2a6a5ea8c59b4db778b724ba718e1c43fc8c3c136
F test/malloc4.test 957337613002b7058a85116493a262f679f3a261
F test/malloc5.test 2e4ad7684a13389a44a840499cd47173a8d05f22f082d7d083eece433a7a64eb
@@ -1466,12 +1470,12 @@ F test/misc3.test 651b88bca19b8ff6a7b6af73dae00c3fd5b3ea5bee0c0d1d91abd4c4b47487
F test/misc4.test 10cd6addb2fa9093df4751a1b92b50440175dd5468a6ec84d0386e78f087db0e
F test/misc5.test 02fcaf4d42405be02ec975e946270a50b0282dac98c78303ade0d1392839d2b8
F test/misc6.test 953cc693924d88e6117aeba16f46f0bf5abede91
F test/misc7.test d912f3d45c2989191b797504a220ca225d6be80b21acad22ba0d35f4a9ee4579
F test/misc7.test d595599972ec0b436985f0f02f243b68500ffc977b9b3194ec66c0866cfddcab
F test/misc8.test 08d2380bc435486b12161521f225043ac2be26f02471c2c1ea4cac0b1548edbd
F test/misuse.test 46d42ffdf375833ea5828796e56f84660344f7548659b493059f152f00e66840
F test/mjournal.test 28a08d5cb5fb5b5702a46e19176e45e964e0800d1f894677169e79f34030e152
F test/mmap1.test 18de3fd7b70a777af6004ca2feecfcdd3d0be17fa04058e808baf530c94b1a1d
F test/mmap2.test 9d6dd9ddb4ad2379f29cc78f38ce1e63ed418022
F test/mmap2.test dba452dc7db91e9df10f70bdd73dc4190c7b8ee7b5133b4684f04277ada0b9ac
F test/mmap3.test b3c297e78e6a8520aafcc1a8f140535594c9086e
F test/mmap4.test 2e2b4e32555b58da15176e6fe750f17c9dcf7f93
F test/mmapcorrupt.test 470fb44fe92e99c1d23701d156f8c17865f5b027063c9119dcfdb842791f4465
@@ -1484,7 +1488,7 @@ F test/multiplex4.test e8ae4c4bd70606a5727743241f13b5701990abe4
F test/mutex1.test 42cb5e244c3a77bb0ef2b967e06fa5e7ba7d32d90a9b20bed98f6f5ede185a25
F test/mutex2.test bfeaeac2e73095b2ac32285d2756e3a65e681660
F test/nan.test 73ea63ab43668313e2f8cc9ef9e9a966672c7934f3ce76926fbe991235d07d91
F test/nockpt.test 8c43b25af63b0bd620cf1b003529e37b6f1dc53bd22690e96a1bd73f78dde53a
F test/nockpt.test 3db354270fc63b6871eebd40285d4c55324fb27be629c958adbff6d7fcaa8e14
F test/nolock.test f196cf8b8fbea4e2ca345140a2b3f3b0da45c76e
F test/normalize.test f23b6c5926c59548635fcf39678ac613e726121e073dd902a3062fbb83903b72
F test/notify1.test 669b2b743618efdc18ca4b02f45423d5d2304abf
@@ -1513,15 +1517,15 @@ F test/orderby8.test 23ef1a5d72bd3adcc2f65561c654295d1b8047bd
F test/orderby9.test 87fb9548debcc2cd141c5299002dd94672fa76a3
F test/orderbyA.test df608e59efc2ef50c1eddf1a773b272de3252e9401bfec86d04b52fd973866d5
F test/orderbyB.test 32576c7b138105bc72f7fbf33bd320ca3a7d303641fc939e0e56af6cba884b3d
F test/oserror.test 1fc9746b83d778e70d115049747ba19c7fba154afce7cc165b09feb6ca6abbc5
F test/oserror.test ee3fad06ec8671c4d047c2c92a567fc2e0e8161caaec7edd6d48325c5ac97f30
F test/ossfuzz.c 9636dad2092a05a32110df0ca06713038dd0c43dd89a77dabe4b8b0d71096715
F test/ossshell.c f125c5bd16e537a2549aa579b328dd1c59905e7ab1338dfc210e755bb7b69f17
F test/ovfl.test 199c482696defceacee8c8e0e0ef36da62726b2f
F test/pager1.test ffd885cdc98b986c9f746496508c0c4810ed0eaade3575ddf53c222e85880552
F test/pager1.test b083c2d5d89df8e979658d9320bfc0b9d50b4ef8ae1d9e115a692ff0b9768393
F test/pager2.test c0ede15952b607f9a38f653acdfa73c19e657958e9104aab1a71950ea7b71831
F test/pager3.test 4e9a83d6ca0838d7c602c9eb93d1357562d9059c1e02ffb138a8271020838370
F test/pager4.test a122e9e6925d5b23b31e3dfef8c6a44bbf19590e
F test/pagerfault.test 63c5da625562c66345ab4528790327ca63db2f6f9cbae2aba8cb7c51de3d1628
F test/pager4.test b995066c699472614eb5949db5a2e2c51fd463863518afe68675d7fac09216bd
F test/pagerfault.test 43692e660fe480812dc5d44171fdcb8da1a65a644428def1ee9de79edace4028
F test/pagerfault2.test caf4c7facb914fd3b03a17b31ae2b180c8d6ca1f
F test/pagerfault3.test 1003fcda009bf48a8e22a516e193b6ef0dd1bbd8
F test/pageropt.test 84e4cc5cbca285357f7906e99b21be4f2bf5abc0
@@ -1531,9 +1535,9 @@ F test/pcache.test c8acbedd3b6fd0f9a7ca887a83b11d24a007972b
F test/pcache2.test af7f3deb1a819f77a6d0d81534e97d1cf62cd442
F test/pendingrace.test e99efc5ab3584da3dfc8cd6a0ec4e5a42214820574f5ea24ee93f1d84655f463
F test/percentile.test 52ba89d6ee6b65f770972b67dace358bab7cdbd532803d3db157845268e789cd
F test/permutations.test 37650c5286f7d6f322af95cad876b69c6c2c79c28dc649f09de07d3312b1213c
F test/permutations.test 5260363b43b3fad4becb49b58d0b53e6024e1c18dc169b154d0b98db5630bbf2
F test/pg_common.tcl 3b27542224db1e713ae387459b5d117c836a5f6e328846922993b6d2b7640d9f
F test/pragma.test 11cb9310c42f921918f7f563e3c0b6e70f9f9c3a6a1cf12af8fccb6c574f3882
F test/pragma.test 7d07b7bb76e273215d6a20c4f83c3062cc28976c737ccb70a686025801e86c8f
F test/pragma2.test e5d5c176360c321344249354c0c16aec46214c9f
F test/pragma3.test 92a46bbea12322dd94a404f49edcfbfc913a2c98115f0d030a7459bb4712ef31
F test/pragma4.test 396ef9bff1fb966d41721545ad4b12bfc26aae315f5fe51d9b917828d49e6f8e
@@ -1550,14 +1554,14 @@ F test/queryonly.test 5f653159e0f552f0552d43259890c1089391dcca
F test/quick.test 1681febc928d686362d50057c642f77a02c62e57
F test/quickcheck.test a4b7e878cd97e46108291c409b0bf8214f29e18fddd68a42bc5c1375ad1fb80a
F test/quota-glob.test 32901e9eed6705d68ca3faee2a06b73b57cb3c26
F test/quota.test bfb269ce81ea52f593f9648316cd5013d766dd2a
F test/quota.test 2747bfdf50d01155c06feb391286bb585f66977feaf5e26e5a37bc00ff7dee7c
F test/quota2.test 7dc12e08b11cbc4c16c9ba2aa2e040ea8d8ab4b8
F test/quote.test 7b01b2a261bc26d9821aea9f4941ce1e08191d62fc55ba8862440fb3a59197a4
F test/randexpr1.tcl 40dec52119ed3a2b8b2a773bce24b63a3a746459
F test/randexpr1.test eda062a97e60f9c38ae8d806b03b0ddf23d796df
F test/rbu.test 168573d353cd0fd10196b87b0caa322c144ef736
F test/rdonly.test 64e2696c322e3538df0b1ed624e21f9a23ed9ff8
F test/readonly.test 69a7ccec846cad2e000b3539d56360d02f327061dc5e41f7f9a3e01f19719952
F test/readonly.test 0d307c335b3421898cfe64a783a376138aa003849b6bff61ee2d21e805bc0051
F test/recover.test c76d05f33f0271fba0f0752170e03b0ab5952dc61dcea7ab3ba40df03c4c42de
F test/regexp1.test 8f2a8bc1569666e29a4cee6c1a666cd224eb6d50e2470d1dc1df995170f3e0f1
F test/regexp2.test 55ed41da802b0e284ac7e2fe944be3948f93ff25abbca0361a609acfed1368b5
@@ -1626,11 +1630,11 @@ F test/selectH.test 0b54599f1917d99568c9b929df22ec6261ed7b6d2f02a46b5945ef81b787
F test/session.test 78fa2365e93d3663a6e933f86e7afc395adf18be
F test/sessionfuzz-data1.db 1f8d5def831f19b1c74571037f0d53a588ea49a6c4ca2a028fc0c27ef896dbcb
F test/sessionfuzz.c f693b8827034a3bed7616d89c65fb4fe8b7ff3c0f000c6ea6beda69b7f1aced3
F test/shared.test c99510b83a6ad650d7335e4733568b9d7b4f5ee88f4f2167b6138950a795b537
F test/shared.test 50bd8091735b272732125928c363476a17b5fb264835de7d19e90c72055c888b
F test/shared2.test 03eb4a8d372e290107d34b6ce1809919a698e879
F test/shared3.test f8cd07c1a2b7cdb315c01671a0b2f8e3830b11ef31da6baa9a9cd8da88965403
F test/shared3.test cb92d083003ddf0f313166e494ec2fcafa55fdebf648628923ded3169dba8850
F test/shared4.test c75f476804e76e26bf6fa0e7b421fb0ca7d07558
F test/shared6.test 866bb4982c45ce216c61ded5e8fde4e7e2f3ffa9
F test/shared6.test 104e1e25b4c4f47aaccca7dba75b3d87bb505b46b009af03ae49bf55b7c4976c
F test/shared7.test a81e99f83e6c51b02ac99c96fb3a2a7b5978c956
F test/shared8.test 933ed7d71f598bb6c7a8c192a3cd30f2562fdccf514df383798599c34ffa672f
F test/shared9.test 600a257fe9d8b0272746b230e761aa1bd8802ca4cf3ba5b2136b9204f3d51efa
@@ -1638,17 +1642,17 @@ F test/sharedA.test 64bdd21216dda2c6a3bd3475348ccdc108160f34682c97f2f51c19fc0e21
F test/sharedB.test 1a84863d7a2204e0d42f2e1606577c5e92e4473fa37ea0f5bdf829e4bf8ee707
F test/shared_err.test 32634e404a3317eeb94abc7a099c556a346fdb8fb3858dbe222a4cbb8926a939
F test/sharedlock.test 5ede3c37439067c43b0198f580fd374ebf15d304
F test/shell1.test 573942b8d0e444956445993d5a5275c6912bc49b654441eec0b5e1e735f2e5b7
F test/shell2.test 01a01f76ed98088ce598794fbf5b359e148271541a8ddbf79d21cc353cc67a24
F test/shell3.test db1953a8e59d08e9240b7cc5948878e184f7eb2623591587f8fd1f1a5bd536d8
F test/shell4.test 522fdc628c55eff697b061504fb0a9e4e6dfc5d9087a633ab0f3dd11bcc4f807
F test/shell5.test 0e5f8ce08206b9998a778cfe1989e20e47839153c05af2da29198150172e22fc
F test/shell1.test d41257103cf762e1d43f1d07286ac65ed32c5430a19851029bfe06671f5e19fe
F test/shell2.test ac102ebc0a9ec166257600c4ee8bdefec242163afced295f10b004f4af3fc9dd
F test/shell3.test 603b448e917537cf77be0f265c05c6f63bc677c63a533c8e96aae923b56f4a0e
F test/shell4.test ad7eee983b5e7f1dd92d8c87bc0f39474086bc32c980c00f3934c54aabc636a2
F test/shell5.test d17e7927ab8b7f720efbdd9b5d05fceb6c3c56c25917901b315400214bf24ef4
F test/shell6.test e3b883b61d4916b6906678a35f9d19054861123ad91b856461e0a456273bdbb8
F test/shell7.test 43fd8e511c533bab5232e95c7b4be93b243451709e89582600d4b6e67693d5c3
F test/shell8.test aea51ecbcd4494c746b096aeff51d841d04d5f0dc4b62eb42427f16109b87acd
F test/shell8.test 641cf21a99c59404c24e3062923734951c4099a6b6b6520de00cf7a1249ee871
F test/shell9.test 8742a5b390cdcef6369f5aa223e415aa4255a4129ef249b177887dc635a87209
F test/shellA.test 079c05c11947ade4ea8d51053d3abb687ec96a3dce6680d01838519b705190c5
F test/shmlock.test 3dbf017d34ab0c60abe6a44e447d3552154bd0c87b41eaf5ceacd408dd13fda5
F test/shellA.test 4ecff8b7b2c0122ba8174abfbcc4b0f59e44d80f2a911068f8cd4cfc6661032d
F test/shmlock.test 9f1f729a7fe2c46c88b156af819ac9b72c0714ac6f7246638a73c5752b5fd13c
F test/shortread1.test bb591ef20f0fd9ed26d0d12e80eee6d7ac8897a3
F test/show_speedtest1_rtree.tcl 32e6c5f073d7426148a6936a0408f4b5b169aba5
F test/shrink.test 2668e607dcdfa19c52828c09b69685b38da793856582ae31debf79d90c7bbbdc
@@ -1711,17 +1715,17 @@ F test/swarmvtab.test 250231404fcac88f61a6c147bb0e3a118ed879278cd3ccb0ae2d3a729e
F test/swarmvtab2.test c948cb2fdfc5b01d85e8f6d6504854202dc1a0782ab2a0ed61538f27cbd0aa5c
F test/swarmvtab3.test 41a3ab47cb7a834d4e5336425103b617410a67bb95d335ef536f887587ece073
F test/swarmvtabfault.test 8a67a9f27c61073a47990829e92bc0c64420a807cb642b15a25f6c788210ed95
F test/symlink.test 4368af0e213dd6e726a6240a16f2bb96a5a58f83f2d5d60652f27547b28cbf06
F test/symlink2.test bf932ff7fe95c9dbb39d2a990df9098b0ea943233c97e40098e0a8d6b559a96f
F test/sync.test 89539f4973c010eda5638407e71ca7fddbcd8e0594f4c9980229f804d4333092
F test/sync2.test 8f9f7d4f6d5be8ca8941a8dadcc4299e558cb6a1ff653a9469146c7a76ef2039
F test/symlink.test 60e16915cd0ee068244563f354ae012149cf7541e922025e31ac613e3fa3e389
F test/symlink2.test 3cf7f09dcf3cf74541f5fdb1ede3c731e4e35d2018d85efc61e32ac114435ce3
F test/sync.test a619e407ede58a7b6e3e44375328628559fc9695a9c24c47cb5690a866b0031b
F test/sync2.test 06152269ed73128782c450c355988fe8dd794d305833af75e1a5e79edd4dae47
F test/syscall.test a067468b43b8cb2305e9f9fe414e5f40c875bb5d2cba5f00b8154396e95fcf37
F test/sysfault.test c9f2b0d8d677558f74de750c75e12a5454719d04
F test/tabfunc01.test 66d1ea27289c19317bf111744a4d5fda901759945d22ddb5bc964641fc38c185
F test/tabfunc01.test e85679a3800aa632dee787966b8482fce0bd47629dad82f102fd52f319d2c281
F test/table.test 7862a00b58b5541511a26757ea9c5c7c3f8298766e98aa099deec703d9c0a8e0
F test/tableapi.test e37c33e6be2276e3a96bb54b00eea7f321277115d10e5b30fdb52a112b432750
F test/tableopts.test dba698ba97251017b7c80d738c198d39ab747930
F test/tclsqlite.test ad0bbd92edabe64cc91d990a0748142fe5ab962d74ac71fa3bfa94d50d2f4c87
F test/tclsqlite.test c627fd82e2028d9f03d3f2aafb25361daeb3fd09ea3f933db9114f63e320d7e7
F test/tempdb.test 4cdaa23ddd8acb4d79cbb1b68ccdfd09b0537aaba909ca69a876157c2a2cbd08
F test/tempdb2.test 353864e96fd3ae2f70773d0ffbf8b1fe48589b02c2ec05013b540879410c3440
F test/tempfault.test 0c0d349c9a99bf5f374655742577f8712c647900
@@ -1729,9 +1733,9 @@ F test/temptable.test d2c9b87a54147161bcd1822e30c1d1cd891e5b30
F test/temptable2.test 76821347810ecc88203e6ef0dd6897b6036ac788e9dd3e6b04fd4d1631311a16
F test/temptable3.test d11a0974e52b347e45ee54ef1923c91ed91e4637
F test/temptrigger.test 38f0ca479b1822d3117069e014daabcaacefffcc
F test/tester.tcl 2244752d5dd5135c03370fa09fec3d02c87440521ca600c09c635b1c2cded9ef
F test/testrunner.tcl 0ffa67806e75aa2c186c63d7d00b16bb45adb91ed6560461fda6dbe3e18c885e x
F test/testrunner_data.tcl 6d7e7824bb36278ea65c33f7da6dd3ca101fc7d6f7a765b807dce0aa68c52521
F test/tester.tcl 463ae33b8bf75ac77451df19bd65e7c415c2e9891227c7c9e657d0a2d8e1074a
F test/testrunner.tcl 228732ca62ea60e97785e13528bd36627cf3c115d59364a5181ed7f85fd0031d x
F test/testrunner_data.tcl 07f2d36a6321bfd196975aca237db6bba1991032809264a1abeb62e697196d20
F test/thread001.test a0985c117eab62c0c65526e9fa5d1360dd1cac5b03bde223902763274ce21899
F test/thread002.test c24c83408e35ba5a952a3638b7ac03ccdf1ce4409289c54a050ac4c5f1de7502
F test/thread003.test ee4c9efc3b86a6a2767516a37bd64251272560a7
@@ -1857,7 +1861,7 @@ F test/tkt3357.test 77c37c6482b526fe89941ce951c22d011f5922ed
F test/tkt3419.test 1bbf36d7ea03b638c15804251287c2391f5c1f6b
F test/tkt3424.test 61f831bd2b071bd128fa5d00fbda57e656ca5812
F test/tkt3442.test c9d95b4c8f4f35a51b523f35d2afd0ce124937812af296545ad551ff763504fd
F test/tkt3457.test 5b9cc2b6cbbf896e9b973db83f6520f43f326f4d08604372a7b0379625e28412
F test/tkt3457.test adf048188761581124a2f0f91f9d23a5b76fb425270ecbfd73c9c7949fa10786
F test/tkt3461.test 228ea328a5a21e8663f80ee3d212a6ad92549a19
F test/tkt3493.test 1686cbde85f8721fc1bdc0ee72f2ef2f63139218
F test/tkt3508.test d75704db9501625c7f7deec119fcaf1696aefb7d
@@ -1935,7 +1939,7 @@ F test/unionvtab.test e1704ab1b4c1bb3ffc9da4681f8e85a0b909fd80b937984fc94b27415a
F test/unionvtabfault.test e8759f3d14fb938ce9657e2342db34aeac0fb9bc1692b0d1ebb0069630151d06
F test/unique.test 93f8b2ef5ea51b9495f8d6493429b1fd0f465264
F test/unique2.test 3674e9f2a3f1fbbfd4772ac74b7a97090d0f77d2
F test/unixexcl.test d936ba2b06794018e136418addd59a2354eeae97
F test/unixexcl.test d2366ef2d3d95249314307861d748924d9ab4f24305541159a08be61ccd4a9ee
F test/unordered.test 0edaf3411d300693bca595897c5201421c6c5ec787990a1dfe2f7f60ae93f1e2
F test/update.test 85d3f46d0863033370bd881b1097f5694369a8730e53c5f85d96f32b7b310b47
F test/update2.test 67455bc61fcbcf96923c45b3bc4f87bc72be7d67575ad35f134906148c7b06d3
@@ -1951,10 +1955,10 @@ F test/upsert3.test 88d7d590a1948a9cb6eac1b54b0642f67a9f35a1fc0f19b200e97d5d39e3
F test/upsert4.test 25d2a1da92f149331ae0c51ca6e3eee78189577585eab92de149900d62994fa5
F test/upsert5.test 9953b180d02d1369cdbb6c73c900834e5fef8cb78e98e07511c8762ec21cc176
F test/upsertfault.test f21ca47740841fdb4d61acfa7b17646d773e67724fe8c185b71c018db8a94b35
F test/uri.test c1abaaaa28e9422d61e5f3f9cbc8ef993ec49fe802f581520731708561d49384
F test/uri.test 1250724af9beeed2d6c3716f5b990c483200c54f408d3c0ec9543a3c7961f8fc
F test/uri2.test 9d3ba7a53ee167572d53a298ee4a5d38ec4a8fb7
F test/utf16align.test 9fde0bb5d3a821594aa68c6829ab9c5453a084384137ebb9f6153e2d678039da
F test/vacuum-into.test 77845cee98770c416dae9b0da6bb3229753861f2da65c11b4f9715d081712d8a
F test/vacuum-into.test 5a489714feecfdabfc7b293be4111564a173dee92c0d6818dd0207f3ade65783
F test/vacuum.test ce91c39f7f91a4273bf620efad21086b5aa6ef1d
F test/vacuum2.test 9fd45ce6ce29f5614c249e03938d3567c06a9e772d4f155949f8eafe2d8af520
F test/vacuum3.test d9d9a04ee58c485b94694fd4f68cffaba49c32234fdefe1ac1a622c5e17d4ce3
@@ -1970,6 +1974,7 @@ F test/view.test 3c23d7a068e9e4a0c4e6907498042772adea725f0630c3d9638ffd4e5a08b92
F test/view2.test db32c8138b5b556f610b35dfddd38c5a58a292f07fda5281eedb0851b2672679
F test/view3.test ad8a8290ee2b55ff6ce66c9ef1ce3f1e47926273a3814e1c425293e128a95456
F test/vt02.c 5b44ac67b1a283fedecf2d6e2ceda61e7a157f01d44dcb4490dcb1e87d057060
F test/vt100-a.sql 631eeab18c5adb531bab79aecf64eee3934b42c75a309ee395c814717a6a7651
F test/vtab1.test 09a72330d0f31eda2ffaa828b06a6b917fb86250ee72de0301570af725774c07
F test/vtab2.test 14d4ab26cee13ba6cf5c5601b158e4f57552d3b055cdd9406cf7f711e9c84082
F test/vtab3.test b45f47d20f225ccc9c28dc915d92740c2dee311e
@@ -1985,7 +1990,7 @@ F test/vtabC.test 4528f459a13136f982e75614d120aef165f17292
F test/vtabD.test 05b3f1d77117271671089e48719524b676842e96
F test/vtabE.test 2a143fe75a11275781d1fd1988d86b66a3f69cb98f4add62e3da8fd0f637b45f
F test/vtabF.test 1918844c7c902f6a16c8dacf1ec8f84886d6e78b
F test/vtabH.test 8e338acba32207085b6fe9cb2a58f7b408e74c8e1a2964cbdaca903ac82213cc
F test/vtabH.test a9417d92111629e2c33e0f3b06cc84bcd611753d0fc017b3ce6ae96572bc2f2f
F test/vtabI.test 751b07636700dbdea328e4265b6077ccd6811a3f
F test/vtabJ.test a6aef49d558af90fae10565b29501f82a95781cb4f797f2d13e2d19f9b6bc77b
F test/vtabK.test 13293177528fada1235c0112db0d187d754af1355c5a39371abd365104e3afbf
@@ -1997,38 +2002,38 @@ F test/vtabdistinct.test 7688f0889358f849fd60bbfde1ded38b014b18066076d4bfbb75395
F test/vtabdrop.test 65d4cf6722972e5499bdaf0c0d70ee3b8133944a4e4bc31862563f32a7edca12
F test/vtabrhs1.test 9b5ecbc74a689500c33a4b2b36761f9bcc22fcc4e3f9d21066ee0c9c74cf5f6c
F test/wal.test 519c550255c78f55959e9159b93ebbfad2b4e9f36f5b76284da41f572f9d27da
F test/wal2.test e89ca97593b5e92849039f6b68ce1719a853ef20fa22c669ec1ac452fbc31cab
F test/wal2.test f058016abe4627d2664db4b4b87990298d925e66a4c5a2c8e674a0ff6f4c841d
F test/wal3.test 5de023bb862fd1eb9d2ad26fa8d9c43abb5370582e5b08b2ae0d6f93661bc310
F test/wal4.test 4744e155cd6299c6bd99d3eab1c82f77db9cdb3c
F test/wal5.test 9c11da7aeccd83a46d79a556ad11a18d3cb15aa9
F test/wal6.test b602704e4b066199bc89d91ca9000f335dcf4572
F test/wal64k.test 2a525c0f45d709bae3765c71045ccec5df7d100ccbd3a7860fdba46c9addb965
F test/wal6.test 6a773eff47b989c5142d17f2a7778c02d8260149a648d44ef8345aa080e428e3
F test/wal64k.test bb8c52f0140aae1de877ffed86e2a97d903f98cf9ac263f185d51c58cde92327
F test/wal7.test 2ae8f427d240099cc4b2dfef63cff44e2a68a1bd
F test/wal8.test d9df3fba4caad5854ed69ed673c68482514203c8
F test/wal9.test 378e76a9ad09cd9bee06c172ad3547b0129a6750
F test/wal_common.tcl 204d1721ac13c5e0c7fae6380315b5ab7f4e8423f580d826c5e9df1995cb018d
F test/walbak.test 018d4e5a3d45c6298d11b99f09a8ef6876527946
F test/walbig.test f437473a16cfb314867c6b5d1dbcd519e73e3434
F test/walblock.test be48f3a75eff0b4456209f26b3ce186c2015497d
F test/walblock.test 6bb472e82730e7e4e81395e907a01d8cfc2bd9e1f01f8a9184ca572e2955a4bf
F test/walcksum.test ba02b4fe6d22cb42e57a323003cbae62f77a740983e1355b2b520e019ae261c7
F test/walcrash.test 21038858cc552077b0522f50b0fa87e38139306a
F test/walcrash2.test a0edab4e5390f03b99a790de89aad15d6ec70b36
F test/walcrash3.test e426aa58122d20f2b9fbe9a507f9eb8cab85b8af
F test/walcrash4.test e7b6e7639a950a0cca8e210e248c8dad4d63bf20
F test/walcrash4.test 93d8825e9d0b1b183e3a73ee67e5c8fc9d86cdaf1f3a03bcc960c3aeede28001
F test/walfault.test 09b8ad7e52d2f54bce50e31aa7ea51412bb9f70ac13c74e669ddcd8b48b0d98d
F test/walfault2.test e039ac66c78d5561683cacde04097213cdad3b58e2b3f3fe1112862217bfd915
F test/walhook.test ed00a40ba7255da22d6b66433ab61fab16a63483
F test/walmode.test cd6e7cff618eaaa5910ce57c3657aa50110397f86213886a2400afb9bfec7b7b
F test/walnoshm.test 84ca10c544632a756467336b7c3b864d493ee496
F test/walmode.test 2a5530972948948a17211e070263fcf25ef1ca4e06d742a32d81a470b91441dc
F test/walnoshm.test 844b3eb7d8e8ee76c834ef723babec57b0be51fa52ef7e321c289ed0fe3cddc2
F test/waloverwrite.test dad2f26567f1b45174e54fbf9a8dc1cb876a7f03
F test/walpersist.test 8d78a1ec91299163451417b451a2bac3481f8eb9f455b1ca507a6625c927ca6e
F test/walprotocol.test 1b3f922125e341703f6e946d77fdc564d38fb3e07a9385cfdc6c99cac1ecf878
F test/walprotocol2.test 7d3b6b4bf0b12f8007121b1e6ef714bc99101fb3b48e46371df1db868eebc131
F test/walro.test cb438d05ba0d191f10b688e39c4f0cd5b71569a1d1f4440e5bdf3c6880e08c20
F test/walro.test 78a84bc0fdae1385c06b017215c426b6845734d6a5a3ac75c918dd9b801b1b9d
F test/walro2.test 33955a6fd874dd9724005e17f77fef89d334b3171454a1256fe4941a96766cdc
F test/walrofault.test c70cb6e308c443867701856cce92ad8288cd99488fa52afab77cca6cfd51af68
F test/walseh1.test bae700eb99519b6d5cd3f893c04759accc5a59c391d4189fe4dd6995a533442b
F test/walsetlk.test aaa418dc2c11002b3e270f8128235a3bbb846796907095a0a02bf0f0bbf8512e
F test/walsetlk.test 9079cd8ef82570b8cf0067f31e049a72bec353fb2d5f0cc88f1736dc42ba9704
F test/walsetlk2.test 9097083633cdf55bf1098b694fb8651d0356d38fef28b869481d18029d7ceaf4
F test/walsetlk3.test 1b82bd92dea7e58f498b4399b0b3d26773dd8ac5c74205ce4a23c207cb8e85fe
F test/walshared.test 42e3808582504878af237ea02c42ca793e8a0efaa19df7df26ac573370dbc7a3
@@ -2064,10 +2069,10 @@ F test/wherelimit.test afb46397c6d7e964e6e294ba3569864a0c570fe3807afc634236c2b75
F test/wherelimit2.test b9e4bfe7b4d7c2f85f99cf2bd2c51369378d04b1f3d1b60557423752003bfd90
F test/wherelimit3.test 22d73e046870cf8bbe15573eda6b432b07ebe64a88711f9f849c6b3667c1fae6
F test/widetab1.test c296a98e123762de79917350e45fa33fdf88577a2571eb3a64c8bf7e44ef74d1
F test/win32heap.test 10fd891266bd00af68671e702317726375e5407561d859be1aa04696f2aeee74
F test/win32lock.test e0924eb8daac02bf80e9da88930747bd44dd9b230b7759fed927b1655b467c9c
F test/win32longpath.test c5d149ab60a3052fa84b3df12ff655d703bfdfd48eed9854b14945d4d0bf3ddd
F test/win32nolock.test ac4f08811a562e45a5755e661f45ca85892bdbbc
F test/win32heap.test 1ec2ce646aee491ec23bfcdfd005b33c79f13bf91467966f374a76ffe7c7e85f
F test/win32lock.test 4fc496691504d90621157aa43b1155a1461347261ad182c3e3d5923f4e0b879c
F test/win32longpath.test df477a2891bd6a1a4e78e43290ea219a777da85eb2590092e36da65f2fb5f1cf
F test/win32nolock.test 95854dc0206b8a95e4aee15a76acc082767b38f079b2e24676aed6cbb0f32798
F test/window1.test 79dc3b9a2226f622d7e104a1fc750d1c4c3c08d6147b59085bdbe05352947ffa
F test/window2.tcl 492c125fa550cda1dd3555768a2303b3effbeceee215293adf8871efc25f1476
F test/window2.test e466a88bd626d66edc3d352d7d7e1d5531e0079b549ba44efb029d1fbff9fd3c
@@ -2106,11 +2111,11 @@ F test/without_rowid5.test f14298eb5ac8013894b75141c3f4f5f325a6ad0eded55516eef72
F test/without_rowid6.test efbd7add62c59bf5ca97bf8da674e734e6a70ef979234e816166824b4d258f68
F test/without_rowid7.test d7c59a93d726b55812d620f8f284e01904a5b85f9ee9eea8f2f68571a5e8c40e
F test/wordcount.c d721a4b6fae93e6e33449700bce1686bc23257c27425bc3ef1599dc912adec66
F test/writecrash.test f1da7f7adfe8d7f09ea79b42e5ca6dcc41102f27f8e334ad71539501ddd910cc
F test/writecrash.test 13520af28f376bfc8c0bcd130efc1fff20bb165198e8b94cf153f1f754154bb9
F test/zeroblob.test 7b74cefc7b281dfa2b07cd237987fbe94b4a2037a7771e9e83f2d5f608b1d99e
F test/zeroblobfault.test 861d8191a0d944dfebb3cb4d2c5b4e46a5a119eaec5a63dd996c2389f8063441
F test/zerodamage.test 9c41628db7e8d9e8a0181e59ea5f189df311a9f6ce99cc376dc461f66db6f8dc
F test/zipfile.test a36327c5697a03150a313ba06ab45842facef8b0c21be19d73a3a4fee58bc54c
F test/zipfile.test c8a7736312c8eb32ee2808121ca22d885a8724d8df4a23d312ddefddadc7f322
F test/zipfile2.test 6df5f5ef9d247756f7200066f43e7f3f52cffff47f0c02cbefe4ce9c3284cb10
F test/zipfilefault.test 44d4d7a7f7cca7521d569d7f71026b241d65a6b1757aa409c1a168827edbbc2c
F tool/GetFile.cs 47852aa0d806fe47ed1ac5138bdce7f000fe87aaa7f28107d0cb1e26682aeb44
@@ -2118,7 +2123,7 @@ F tool/GetTclKit.bat d84033c6a93dfe735d247f48ba00292a1cc284dcf69963e5e672444e045
F tool/Replace.cs 02c67258801c2fb5f63231e0ac0f220b4b36ba91
F tool/build-all-msvc.bat 1960a7a3e5d8176c4329e31476f6e3dfa9543675355fa9020a569f4452628458 x
F tool/build-shell.sh 369c4b171cc877ad974fef691e4da782b4c1e99fe8f4361316c735f64d49280f
F tool/buildtclext.tcl 20726b6b73c7911baa8519a9467b4062104339a5ce57947819884525c56d79e3
F tool/buildtclext.tcl 85d1bcd5410d0a4c739e2d013106f03674d082cc4d573bcc57a68546b6db67cd
F tool/cg_anno.tcl c1f875f5a4c9caca3d59937b16aff716f8b1883935f1b4c9ae23124705bc8099 x
F tool/checkSpacing.c 810e51703529a204fc4e1eb060e9ab663e3c06d2
F tool/cktclsh.sh 6075eef9c6b9ba4b38fef2ca2a66d25f2311bd3c610498d18a9b01f861629cca
@@ -2132,7 +2137,6 @@ F tool/enlargedb.c 3e8b2612b985cfa7e3e8800031ee191b43ae80de96abb5abbd5eada62651e
F tool/extract-sqlite3h.tcl 069ceab0cee26cba99952bfa08c0b23e35941c837acabe143f0c355d96c9e2eb x
F tool/extract.c 054069d81b095fbdc189a6f5d4466e40380505e2
F tool/fast_vacuum.c c129ae2924a48310c7b766810391da9e8fda532b9f6bd3f9a9e3a799a1b42af9
F tool/find_tclconfig.tcl e64886ffe3b982d4df42cd28ed91fe0b5940c2c5785e126c1821baf61bc86a7e
F tool/fragck.tcl 5265a95126abcf6ab357f7efa544787e5963f439
F tool/fuzzershell.c 41480c8a1e4749351f381431ecfdfceba645396c5d836f8d26b51a33c4a21b33
F tool/genfkey.README e550911fa984c8255ebed2ef97824125d83806eb5232582700de949edf836eb1
@@ -2148,8 +2152,8 @@ F tool/logest.c c34e5944318415de513d29a6098df247a9618c96d83c38d4abd88641fe46e669
F tool/max-limits.c cbb635fbb37ae4d05f240bfb5b5270bb63c54439
F tool/merge-test.tcl de76b62f2de2a92d4c1ca4f976bce0aea6899e0229e250479b229b2a1914b176
F tool/mkamalzip.tcl 8aa5ebe7973c8b8774062d34e15fea9815c4cc2ceea3a9b184695f005910876a
F tool/mkautoconfamal.sh c5e65fa1c922f2e3b3e4f6cd0331ec7d84bdef085f32cb1c46673cdf95ec8090
F tool/mkccode.tcl 210159febe0ef0ecbc53c79833500663ceaba0115b2b374405818dc835b5f84b x
F tool/mkautoconfamal.sh 401f6378a99bb045b63abe8c2dad6bd6fd5a1c2b9c8cded9d7ac5848ea578994
F tool/mkccode.tcl c42a8f8cf78f92e83795d5447460dbce7aaf78a3bbf9082f1507dc71a3665f3c x
F tool/mkctimec.tcl f76dbfc74cefad8d126384ba3263677939f077bd184fcdf8c592a1daf64f50c3 x
F tool/mkkeywordhash.c 6b0be901c47f9ad42215fc995eb2f4384ac49213b1fba395102ec3e999acf559
F tool/mkmsvcmin.tcl d76c45efda1cce2d4005bcea7b8a22bb752e3256009f331120fb4fecb14ebb7a
@@ -2161,7 +2165,7 @@ F tool/mkshellc.tcl 9ce74de0fa904a2c56a96f8d8b5261246bacb0eaa8d7e184f9e18ff94145
F tool/mksourceid.c 36aa8020014aed0836fd13c51d6dc9219b0df1761d6b5f58ff5b616211b079b9
F tool/mkspeedsql.tcl a1a334d288f7adfe6e996f2e712becf076745c97
F tool/mksqlite3c-noext.tcl 351c55256213154cabb051a3c870ef9f4487de905015141ae50dc7578a901b84
F tool/mksqlite3c.tcl ba13086555b3cb835eba5e47a9250300ab85304d23fd1081abd3f29d8ab71a2b
F tool/mksqlite3c.tcl f11b63445c4840509248bd4aa151a81aea25d5415fef71943c8d436eba4f3b3c
F tool/mksqlite3h.tcl 989948c6a26e188e673d7c2f2f093ea3acd816ad6ac65bab596280075c8f3a45
F tool/mksqlite3internalh.tcl 46ef6ed6ccd3c36e23051109dd25085d8edef3887635cea25afa81c4adf4d4db
F tool/mksrczip.tcl 81efd9974dbb36005383f2cd655520057a2ae5aa85ac2441a80c7c28f803ac52
@@ -2193,7 +2197,7 @@ F tool/speedtest8inst1.c 7ce07da76b5e745783e703a834417d725b7d45fd
F tool/spellsift.tcl 52b4b04dc4333c7ab024f09d9d66ed6b6f7c6eb00b38497a09f338fa55d40618 x
F tool/split-sqlite3c.tcl 07e18a1d8cc3f6b3a4a1f3528e63c9b29a5c8a7bca0b8d394b231da464ce1247
F tool/sqldiff.c 134be7866be19f8beb32043d5aea5657f01aaeae2df8d33d758ff722c78666b9
F tool/sqlite3_analyzer.c.in 5a2984ac457a49c7ad4f0924c738df55aafdc97661e912fd99c5cfcdfd4725fd
F tool/sqlite3_analyzer.c.in 14f02cb5ec3c264cd6107d1f1dad77092b1cf440fc196c30b69ae87b56a1a43b
F tool/sqlite3_rsync.c 9a1cca2ab1271c59b37a6493c15dc1bcd0ab9149197a9125926bc08dd26b83fb
F tool/sqltclsh.c.in 1bcc2e9da58fadf17b0bf6a50e68c1159e602ce057210b655d50bad5aaaef898
F tool/sqltclsh.tcl 862f4cf1418df5e1315b5db3b5ebe88969e2a784525af5fbf9596592f14ed848
@@ -2204,7 +2208,6 @@ F tool/stack_usage.tcl f8e71b92cdb099a147dad572375595eae55eca43
F tool/stripccomments.c 68d2aa8cb504439f541ce66b8f128067612bdd16f5fb7bfe540f3fcb67c9c197
F tool/symbols-mingw.sh 4dbcea7e74768305384c9fd2ed2b41bbf9f0414d
F tool/symbols.sh 1612bd947750e21e7b47befad5f6b3825b06cce0705441f903bf35ced65ae9b9
F tool/tclConfigShToAutoDef.sh 44ec55046d86a3febb2cb3e099399b41794e80e9cd138eee7b9b016f819e882b x
F tool/tclConfigShToMake.sh 7c065d81c2d178e15e45a77372c6e5a38b5a1b08755301cd6f20a3a862db7312 x
F tool/varint.c 5d94cb5003db9dbbcbcc5df08d66f16071aee003
F tool/vdbe-compress.tcl fa2f37ab39b2a0087fafb6a7f3ce19503e25e624ffa8ed9951717ab72920c088
@@ -2213,8 +2216,11 @@ F tool/version-info.c 3b36468a90faf1bbd59c65fd0eb66522d9f941eedd364fabccd7227350
F tool/warnings-clang.sh bbf6a1e685e534c92ec2bfba5b1745f34fb6f0bc2a362850723a9ee87c1b31a7
F tool/warnings.sh 49a486c5069de041aedcbde4de178293e0463ae9918ecad7539eedf0ec77a139
F tool/win/sqlite.vsix deb315d026cc8400325c5863eef847784a219a2f
P 8a91aeca60548d5cd19add128cf65b9c3815c9103b1ef8ff6bc02711b6d709de
R 1db0ab70ab59a8097f7bb0d50c768431
U drh
Z 9641d2a6129bd2783700fa8c8a1376d8
P 3e96b772a46638bc25e036de053d620ded3350871ee10e06fd6fe51429934b0d
R 998b143fedcb6afb3f27ef334de6e12f
T *branch * db-copy-encoding
T *sym-db-copy-encoding *
T -sym-trunk *
U jan.nijtmans
Z e388c1b3a45ffe93645e261095f25c2d
# Remove this line to create a well-formed Fossil manifest.
+1 -1
View File
@@ -1 +1 @@
f101c46cf83e532fd33034abccba496bf395ef10c161af003211614d6581d5eb
ac27c2f81654f8d6ce8ef084c98b408c8e9e96dbfccc24a4c8d3d8d5190d932d
+2 -2
View File
@@ -395,8 +395,8 @@ static int dbpageUpdate(
/* "INSERT INTO dbpage($PGNO,NULL)" causes page number $PGNO and
** all subsequent pages to be deleted. */
pTab->iDbTrunc = iDb;
pgno--;
pTab->pgnoTrunc = pgno;
pTab->pgnoTrunc = pgno-1;
pgno = 1;
}else{
zErr = "bad page value";
goto update_fail;
+402 -92
View File
@@ -617,7 +617,7 @@ static struct win_syscall {
{ "FileTimeToLocalFileTime", (SYSCALL)0, 0 },
#endif
#define osFileTimeToLocalFileTime ((BOOL(WINAPI*)(CONST FILETIME*, \
#define osFileTimeToLocalFileTime ((BOOL(WINAPI*)(const FILETIME*, \
LPFILETIME))aSyscall[11].pCurrent)
#if SQLITE_OS_WINCE
@@ -626,7 +626,7 @@ static struct win_syscall {
{ "FileTimeToSystemTime", (SYSCALL)0, 0 },
#endif
#define osFileTimeToSystemTime ((BOOL(WINAPI*)(CONST FILETIME*, \
#define osFileTimeToSystemTime ((BOOL(WINAPI*)(const FILETIME*, \
LPSYSTEMTIME))aSyscall[12].pCurrent)
{ "FlushFileBuffers", (SYSCALL)FlushFileBuffers, 0 },
@@ -906,7 +906,7 @@ static struct win_syscall {
{ "LockFile", (SYSCALL)0, 0 },
#endif
#ifndef osLockFile
#if !defined(osLockFile) && defined(SQLITE_WIN32_HAS_ANSI)
#define osLockFile ((BOOL(WINAPI*)(HANDLE,DWORD,DWORD,DWORD, \
DWORD))aSyscall[47].pCurrent)
#endif
@@ -970,7 +970,7 @@ static struct win_syscall {
{ "SystemTimeToFileTime", (SYSCALL)SystemTimeToFileTime, 0 },
#define osSystemTimeToFileTime ((BOOL(WINAPI*)(CONST SYSTEMTIME*, \
#define osSystemTimeToFileTime ((BOOL(WINAPI*)(const SYSTEMTIME*, \
LPFILETIME))aSyscall[56].pCurrent)
#if !SQLITE_OS_WINCE && !SQLITE_OS_WINRT
@@ -979,7 +979,7 @@ static struct win_syscall {
{ "UnlockFile", (SYSCALL)0, 0 },
#endif
#ifndef osUnlockFile
#if !defined(osUnlockFile) && defined(SQLITE_WIN32_HAS_ANSI)
#define osUnlockFile ((BOOL(WINAPI*)(HANDLE,DWORD,DWORD,DWORD, \
DWORD))aSyscall[57].pCurrent)
#endif
@@ -1207,6 +1207,63 @@ static struct win_syscall {
#define osCancelIo ((BOOL(WINAPI*)(HANDLE))aSyscall[81].pCurrent)
#if defined(SQLITE_WIN32_HAS_WIDE) && defined(_WIN32)
{ "GetModuleHandleW", (SYSCALL)GetModuleHandleW, 0 },
#else
{ "GetModuleHandleW", (SYSCALL)0, 0 },
#endif
#define osGetModuleHandleW ((HMODULE(WINAPI*)(LPCWSTR))aSyscall[82].pCurrent)
#ifndef _WIN32
{ "getenv", (SYSCALL)getenv, 0 },
#else
{ "getenv", (SYSCALL)0, 0 },
#endif
#define osGetenv ((const char *(*)(const char *))aSyscall[83].pCurrent)
#ifndef _WIN32
{ "getcwd", (SYSCALL)getcwd, 0 },
#else
{ "getcwd", (SYSCALL)0, 0 },
#endif
#define osGetcwd ((char*(*)(char*,size_t))aSyscall[84].pCurrent)
#ifndef _WIN32
{ "readlink", (SYSCALL)readlink, 0 },
#else
{ "readlink", (SYSCALL)0, 0 },
#endif
#define osReadlink ((ssize_t(*)(const char*,char*,size_t))aSyscall[85].pCurrent)
#ifndef _WIN32
{ "lstat", (SYSCALL)lstat, 0 },
#else
{ "lstat", (SYSCALL)0, 0 },
#endif
#define osLstat ((int(*)(const char*,struct stat*))aSyscall[86].pCurrent)
#ifndef _WIN32
{ "__errno", (SYSCALL)__errno, 0 },
#else
{ "__errno", (SYSCALL)0, 0 },
#endif
#define osErrno (*((int*(*)(void))aSyscall[87].pCurrent)())
#ifndef _WIN32
{ "cygwin_conv_path", (SYSCALL)cygwin_conv_path, 0 },
#else
{ "cygwin_conv_path", (SYSCALL)0, 0 },
#endif
#define osCygwin_conv_path ((size_t(*)(unsigned int, \
const void *, void *, size_t))aSyscall[88].pCurrent)
}; /* End of the overrideable system calls */
/*
@@ -1380,6 +1437,7 @@ int sqlite3_win32_reset_heap(){
}
#endif /* SQLITE_WIN32_MALLOC */
#ifdef _WIN32
/*
** This function outputs the specified (ANSI) string to the Win32 debugger
** (if available).
@@ -1422,6 +1480,7 @@ void sqlite3_win32_write_debug(const char *zBuf, int nBuf){
}
#endif
}
#endif /* _WIN32 */
/*
** The following routine suspends the current thread for at least ms
@@ -1722,6 +1781,7 @@ void sqlite3MemSetDefault(void){
}
#endif /* SQLITE_WIN32_MALLOC */
#ifdef _WIN32
/*
** Convert a UTF-8 string to Microsoft Unicode.
**
@@ -1747,6 +1807,7 @@ static LPWSTR winUtf8ToUnicode(const char *zText){
}
return zWideText;
}
#endif /* _WIN32 */
/*
** Convert a Microsoft Unicode string to UTF-8.
@@ -1781,28 +1842,29 @@ static char *winUnicodeToUtf8(LPCWSTR zWideText){
** Space to hold the returned string is obtained from sqlite3_malloc().
*/
static LPWSTR winMbcsToUnicode(const char *zText, int useAnsi){
int nByte;
int nWideChar;
LPWSTR zMbcsText;
int codepage = useAnsi ? CP_ACP : CP_OEMCP;
nByte = osMultiByteToWideChar(codepage, 0, zText, -1, NULL,
0)*sizeof(WCHAR);
if( nByte==0 ){
nWideChar = osMultiByteToWideChar(codepage, 0, zText, -1, NULL,
0);
if( nWideChar==0 ){
return 0;
}
zMbcsText = sqlite3MallocZero( nByte*sizeof(WCHAR) );
zMbcsText = sqlite3MallocZero( nWideChar*sizeof(WCHAR) );
if( zMbcsText==0 ){
return 0;
}
nByte = osMultiByteToWideChar(codepage, 0, zText, -1, zMbcsText,
nByte);
if( nByte==0 ){
nWideChar = osMultiByteToWideChar(codepage, 0, zText, -1, zMbcsText,
nWideChar);
if( nWideChar==0 ){
sqlite3_free(zMbcsText);
zMbcsText = 0;
}
return zMbcsText;
}
#ifdef _WIN32
/*
** Convert a Microsoft Unicode string to a multi-byte character string,
** using the ANSI or OEM code page.
@@ -1830,6 +1892,7 @@ static char *winUnicodeToMbcs(LPCWSTR zWideText, int useAnsi){
}
return zText;
}
#endif /* _WIN32 */
/*
** Convert a multi-byte character string to UTF-8.
@@ -1849,6 +1912,7 @@ static char *winMbcsToUtf8(const char *zText, int useAnsi){
return zTextUtf8;
}
#ifdef _WIN32
/*
** Convert a UTF-8 string to a multi-byte character string.
**
@@ -1898,6 +1962,7 @@ char *sqlite3_win32_unicode_to_utf8(LPCWSTR zWideText){
#endif
return winUnicodeToUtf8(zWideText);
}
#endif /* _WIN32 */
/*
** This is a public wrapper for the winMbcsToUtf8() function.
@@ -1915,6 +1980,7 @@ char *sqlite3_win32_mbcs_to_utf8(const char *zText){
return winMbcsToUtf8(zText, osAreFileApisANSI());
}
#ifdef _WIN32
/*
** This is a public wrapper for the winMbcsToUtf8() function.
*/
@@ -2039,6 +2105,7 @@ int sqlite3_win32_set_directory(
){
return sqlite3_win32_set_directory16(type, zValue);
}
#endif /* _WIN32 */
/*
** The return value of winGetLastErrorMsg
@@ -2587,9 +2654,11 @@ static BOOL winLockFile(
ovlp.Offset = offsetLow;
ovlp.OffsetHigh = offsetHigh;
return osLockFileEx(*phFile, flags, 0, numBytesLow, numBytesHigh, &ovlp);
#ifdef SQLITE_WIN32_HAS_ANSI
}else{
return osLockFile(*phFile, offsetLow, offsetHigh, numBytesLow,
numBytesHigh);
#endif
}
#endif
}
@@ -2697,9 +2766,11 @@ static BOOL winUnlockFile(
ovlp.Offset = offsetLow;
ovlp.OffsetHigh = offsetHigh;
return osUnlockFileEx(*phFile, 0, numBytesLow, numBytesHigh, &ovlp);
#ifdef SQLITE_WIN32_HAS_ANSI
}else{
return osUnlockFile(*phFile, offsetLow, offsetHigh, numBytesLow,
numBytesHigh);
#endif
}
#endif
}
@@ -4113,14 +4184,91 @@ static int winLockSharedMemory(winShmNode *pShmNode, DWORD nMs){
** Convert a UTF-8 filename into whatever form the underlying
** operating system wants filenames in. Space to hold the result
** is obtained from malloc and must be freed by the calling
** function.
** function
**
** On Cygwin, 3 possible input forms are accepted:
** - If the filename starts with "<drive>:/" or "<drive>:\",
** it is converted to UTF-16 as-is.
** - If the filename contains '/', it is assumed to be a
** Cygwin absolute path, it is converted to a win32
** absolute path in UTF-16.
** - Otherwise it must be a filename only, the win32 filename
** is returned in UTF-16.
** Note: If the function cygwin_conv_path() fails, only
** UTF-8 -> UTF-16 conversion will be done. This can only
** happen when the file path >32k, in which case winUtf8ToUnicode()
** will fail too.
*/
static void *winConvertFromUtf8Filename(const char *zFilename){
void *zConverted = 0;
if( osIsNT() ){
#ifdef __CYGWIN__
int nChar;
LPWSTR zWideFilename;
if( osCygwin_conv_path && !(winIsDriveLetterAndColon(zFilename)
&& winIsDirSep(zFilename[2])) ){
int nByte;
int convertflag = CCP_POSIX_TO_WIN_W;
if( !strchr(zFilename, '/') ) convertflag |= CCP_RELATIVE;
nByte = (int)osCygwin_conv_path(convertflag,
zFilename, 0, 0);
if( nByte>0 ){
zConverted = sqlite3MallocZero(nByte+12);
if ( zConverted==0 ){
return zConverted;
}
zWideFilename = zConverted;
/* Filenames should be prefixed, except when converted
* full path already starts with "\\?\". */
if( osCygwin_conv_path(convertflag, zFilename,
zWideFilename+4, nByte)==0 ){
if( (convertflag&CCP_RELATIVE) ){
memmove(zWideFilename, zWideFilename+4, nByte);
}else if( memcmp(zWideFilename+4, L"\\\\", 4) ){
memcpy(zWideFilename, L"\\\\?\\", 8);
}else if( zWideFilename[6]!='?' ){
memmove(zWideFilename+6, zWideFilename+4, nByte);
memcpy(zWideFilename, L"\\\\?\\UNC", 14);
}else{
memmove(zWideFilename, zWideFilename+4, nByte);
}
return zConverted;
}
sqlite3_free(zConverted);
}
}
nChar = osMultiByteToWideChar(CP_UTF8, 0, zFilename, -1, NULL, 0);
if( nChar==0 ){
return 0;
}
zWideFilename = sqlite3MallocZero( nChar*sizeof(WCHAR)+12 );
if( zWideFilename==0 ){
return 0;
}
nChar = osMultiByteToWideChar(CP_UTF8, 0, zFilename, -1,
zWideFilename, nChar);
if( nChar==0 ){
sqlite3_free(zWideFilename);
zWideFilename = 0;
}else if( nChar>MAX_PATH
&& winIsDriveLetterAndColon(zFilename)
&& winIsDirSep(zFilename[2]) ){
memmove(zWideFilename+4, zWideFilename, nChar*sizeof(WCHAR));
zWideFilename[2] = '\\';
memcpy(zWideFilename, L"\\\\?\\", 8);
}else if( nChar>MAX_PATH
&& winIsDirSep(zFilename[0]) && winIsDirSep(zFilename[1])
&& zFilename[2] != '?' ){
memmove(zWideFilename+6, zWideFilename, nChar*sizeof(WCHAR));
memcpy(zWideFilename, L"\\\\?\\UNC", 14);
}
zConverted = zWideFilename;
#else
zConverted = winUtf8ToUnicode(zFilename);
#endif /* __CYGWIN__ */
}
#ifdef SQLITE_WIN32_HAS_ANSI
#if defined(SQLITE_WIN32_HAS_ANSI) && defined(_WIN32)
else{
zConverted = winUtf8ToMbcs(zFilename, osAreFileApisANSI());
}
@@ -4949,7 +5097,7 @@ static winVfsAppData winNolockAppData = {
** sqlite3_vfs object.
*/
#if defined(__CYGWIN__)
#if 0 /* No longer necessary */
/*
** Convert a filename from whatever the underlying operating system
** supports for filenames into UTF-8. Space to hold the result is
@@ -4982,7 +5130,14 @@ static int winMakeEndInDirSep(int nBuf, char *zBuf){
if( winIsDirSep(zBuf[nLen-1]) ){
return 1;
}else if( nLen+1<nBuf ){
zBuf[nLen] = winGetDirSep();
if( !osGetenv ){
zBuf[nLen] = winGetDirSep();
}else if( winIsDriveLetterAndColon(zBuf) && winIsDirSep(zBuf[2]) ){
zBuf[nLen] = '\\';
zBuf[2]='\\';
}else{
zBuf[nLen] = '/';
}
zBuf[nLen+1] = '\0';
return 1;
}
@@ -5009,7 +5164,7 @@ static int winTempDirDefined(void){
** The pointer returned in pzBuf must be freed via sqlite3_free().
*/
static int winGetTempname(sqlite3_vfs *pVfs, char **pzBuf){
static char zChars[] =
static const char zChars[] =
"abcdefghijklmnopqrstuvwxyz"
"ABCDEFGHIJKLMNOPQRSTUVWXYZ"
"0123456789";
@@ -5060,7 +5215,7 @@ static int winGetTempname(sqlite3_vfs *pVfs, char **pzBuf){
}
#if defined(__CYGWIN__)
else{
else if( osGetenv!=NULL ){
static const char *azDirs[] = {
0, /* getenv("SQLITE_TMPDIR") */
0, /* getenv("TMPDIR") */
@@ -5076,11 +5231,11 @@ static int winGetTempname(sqlite3_vfs *pVfs, char **pzBuf){
unsigned int i;
const char *zDir = 0;
if( !azDirs[0] ) azDirs[0] = getenv("SQLITE_TMPDIR");
if( !azDirs[1] ) azDirs[1] = getenv("TMPDIR");
if( !azDirs[2] ) azDirs[2] = getenv("TMP");
if( !azDirs[3] ) azDirs[3] = getenv("TEMP");
if( !azDirs[4] ) azDirs[4] = getenv("USERPROFILE");
if( !azDirs[0] ) azDirs[0] = osGetenv("SQLITE_TMPDIR");
if( !azDirs[1] ) azDirs[1] = osGetenv("TMPDIR");
if( !azDirs[2] ) azDirs[2] = osGetenv("TMP");
if( !azDirs[3] ) azDirs[3] = osGetenv("TEMP");
if( !azDirs[4] ) azDirs[4] = osGetenv("USERPROFILE");
for(i=0; i<sizeof(azDirs)/sizeof(azDirs[0]); zDir=azDirs[i++]){
void *zConverted;
if( zDir==0 ) continue;
@@ -5089,7 +5244,7 @@ static int winGetTempname(sqlite3_vfs *pVfs, char **pzBuf){
** it must be converted to a native Win32 path via the Cygwin API
** prior to using it.
*/
if( winIsDriveLetterAndColon(zDir) ){
{
zConverted = winConvertFromUtf8Filename(zDir);
if( !zConverted ){
sqlite3_free(zBuf);
@@ -5102,6 +5257,7 @@ static int winGetTempname(sqlite3_vfs *pVfs, char **pzBuf){
break;
}
sqlite3_free(zConverted);
#if 0 /* No longer necessary */
}else{
zConverted = sqlite3MallocZero( nMax+1 );
if( !zConverted ){
@@ -5109,8 +5265,8 @@ static int winGetTempname(sqlite3_vfs *pVfs, char **pzBuf){
OSTRACE(("TEMP-FILENAME rc=SQLITE_IOERR_NOMEM\n"));
return SQLITE_IOERR_NOMEM_BKPT;
}
if( cygwin_conv_path(
osIsNT() ? CCP_POSIX_TO_WIN_W : CCP_POSIX_TO_WIN_A, zDir,
if( osCygwin_conv_path(
CCP_POSIX_TO_WIN_W, zDir,
zConverted, nMax+1)<0 ){
sqlite3_free(zConverted);
sqlite3_free(zBuf);
@@ -5136,10 +5292,13 @@ static int winGetTempname(sqlite3_vfs *pVfs, char **pzBuf){
break;
}
sqlite3_free(zConverted);
#endif /* No longer necessary */
}
}
}
#elif !SQLITE_OS_WINRT && !defined(__CYGWIN__)
#endif
#if !SQLITE_OS_WINRT && defined(_WIN32)
else if( osIsNT() ){
char *zMulti;
LPWSTR zWidePath = sqlite3MallocZero( nMax*sizeof(WCHAR) );
@@ -5263,7 +5422,7 @@ static int winIsDir(const void *zConverted){
return 0; /* Invalid name? */
}
attr = sAttrData.dwFileAttributes;
#if SQLITE_OS_WINCE==0
#if SQLITE_OS_WINCE==0 && defined(SQLITE_WIN32_HAS_ANSI)
}else{
attr = osGetFileAttributesA((char*)zConverted);
#endif
@@ -5279,6 +5438,12 @@ static int winAccess(
int *pResOut /* OUT: Result */
);
/*
** The Windows version of xAccess() accepts an extra bit in the flags
** parameter that prevents an anti-virus retry loop.
*/
#define NORETRY 0x4000
/*
** Open a file.
*/
@@ -5303,6 +5468,7 @@ static int winOpen(
void *zConverted; /* Filename in OS encoding */
const char *zUtf8Name = zName; /* Filename in UTF-8 encoding */
int cnt = 0;
int isRO = 0; /* file is known to be accessible readonly */
/* If argument zPath is a NULL pointer, this function is required to open
** a temporary file. Use this buffer to store the file name in.
@@ -5467,9 +5633,9 @@ static int winOpen(
&extendedParameters);
if( h!=INVALID_HANDLE_VALUE ) break;
if( isReadWrite ){
int rc2, isRO = 0;
int rc2;
sqlite3BeginBenignMalloc();
rc2 = winAccess(pVfs, zUtf8Name, SQLITE_ACCESS_READ, &isRO);
rc2 = winAccess(pVfs, zUtf8Name, SQLITE_ACCESS_READ|NORETRY, &isRO);
sqlite3EndBenignMalloc();
if( rc2==SQLITE_OK && isRO ) break;
}
@@ -5484,9 +5650,9 @@ static int winOpen(
NULL);
if( h!=INVALID_HANDLE_VALUE ) break;
if( isReadWrite ){
int rc2, isRO = 0;
int rc2;
sqlite3BeginBenignMalloc();
rc2 = winAccess(pVfs, zUtf8Name, SQLITE_ACCESS_READ, &isRO);
rc2 = winAccess(pVfs, zUtf8Name, SQLITE_ACCESS_READ|NORETRY, &isRO);
sqlite3EndBenignMalloc();
if( rc2==SQLITE_OK && isRO ) break;
}
@@ -5504,9 +5670,9 @@ static int winOpen(
NULL);
if( h!=INVALID_HANDLE_VALUE ) break;
if( isReadWrite ){
int rc2, isRO = 0;
int rc2;
sqlite3BeginBenignMalloc();
rc2 = winAccess(pVfs, zUtf8Name, SQLITE_ACCESS_READ, &isRO);
rc2 = winAccess(pVfs, zUtf8Name, SQLITE_ACCESS_READ|NORETRY, &isRO);
sqlite3EndBenignMalloc();
if( rc2==SQLITE_OK && isRO ) break;
}
@@ -5521,7 +5687,7 @@ static int winOpen(
if( h==INVALID_HANDLE_VALUE ){
sqlite3_free(zConverted);
sqlite3_free(zTmpname);
if( isReadWrite && !isExclusive ){
if( isReadWrite && isRO && !isExclusive ){
return winOpen(pVfs, zName, id,
((flags|SQLITE_OPEN_READONLY) &
~(SQLITE_OPEN_CREATE|SQLITE_OPEN_READWRITE)),
@@ -5723,8 +5889,14 @@ static int winAccess(
int rc = 0;
DWORD lastErrno = 0;
void *zConverted;
int noRetry = 0; /* Do not use winRetryIoerr() */
UNUSED_PARAMETER(pVfs);
if( (flags & NORETRY)!=0 ){
noRetry = 1;
flags &= ~NORETRY;
}
SimulateIOError( return SQLITE_IOERR_ACCESS; );
OSTRACE(("ACCESS name=%s, flags=%x, pResOut=%p\n",
zFilename, flags, pResOut));
@@ -5747,7 +5919,10 @@ static int winAccess(
memset(&sAttrData, 0, sizeof(sAttrData));
while( !(rc = osGetFileAttributesExW((LPCWSTR)zConverted,
GetFileExInfoStandard,
&sAttrData)) && winRetryIoerr(&cnt, &lastErrno) ){}
&sAttrData))
&& !noRetry
&& winRetryIoerr(&cnt, &lastErrno)
){ /* Loop until true */}
if( rc ){
/* For an SQLITE_ACCESS_EXISTS query, treat a zero-length file
** as if it does not exist.
@@ -5815,6 +5990,7 @@ static BOOL winIsDriveLetterAndColon(
return ( sqlite3Isalpha(zPathname[0]) && zPathname[1]==':' );
}
#ifdef _WIN32
/*
** Returns non-zero if the specified path name should be used verbatim. If
** non-zero is returned from this function, the calling function must simply
@@ -5851,6 +6027,70 @@ static BOOL winIsVerbatimPathname(
*/
return FALSE;
}
#endif /* _WIN32 */
#ifdef __CYGWIN__
/*
** Simplify a filename into its canonical form
** by making the following changes:
**
** * convert any '/' to '\' (win32) or reverse (Cygwin)
** * removing any trailing and duplicate / (except for UNC paths)
** * convert /./ into just /
**
** Changes are made in-place. Return the new name length.
**
** The original filename is in z[0..]. If the path is shortened,
** no-longer used bytes will be written by '\0'.
*/
static void winSimplifyName(char *z){
int i, j;
for(i=j=0; z[i]; ++i){
if( winIsDirSep(z[i]) ){
#if !defined(SQLITE_TEST)
/* Some test-cases assume that "./foo" and "foo" are different */
if( z[i+1]=='.' && winIsDirSep(z[i+2]) ){
++i;
continue;
}
#endif
if( !z[i+1] || (winIsDirSep(z[i+1]) && (i!=0)) ){
continue;
}
z[j++] = osGetenv?'/':'\\';
}else{
z[j++] = z[i];
}
}
while(j<i) z[j++] = '\0';
}
#define SQLITE_MAX_SYMLINKS 100
static int mkFullPathname(
const char *zPath, /* Input path */
char *zOut, /* Output buffer */
int nOut /* Allocated size of buffer zOut */
){
int nPath = sqlite3Strlen30(zPath);
int iOff = 0;
if( zPath[0]!='/' ){
if( osGetcwd(zOut, nOut-2)==0 ){
return winLogError(SQLITE_CANTOPEN_BKPT, (DWORD)osErrno, "getcwd", zPath);
}
iOff = sqlite3Strlen30(zOut);
zOut[iOff++] = '/';
}
if( (iOff+nPath+1)>nOut ){
/* SQLite assumes that xFullPathname() nul-terminates the output buffer
** even if it returns an error. */
zOut[iOff] = '\0';
return SQLITE_CANTOPEN_BKPT;
}
sqlite3_snprintf(nOut-iOff, &zOut[iOff], "%s", zPath);
return SQLITE_OK;
}
#endif /* __CYGWIN__ */
/*
** Turn a relative pathname into a full pathname. Write the full
@@ -5863,8 +6103,8 @@ static int winFullPathnameNoMutex(
int nFull, /* Size of output buffer in bytes */
char *zFull /* Output buffer */
){
#if !SQLITE_OS_WINCE && !SQLITE_OS_WINRT && !defined(__CYGWIN__)
DWORD nByte;
#if !SQLITE_OS_WINCE && !SQLITE_OS_WINRT
int nByte;
void *zConverted;
char *zOut;
#endif
@@ -5877,64 +6117,110 @@ static int winFullPathnameNoMutex(
zRelative++;
}
#if defined(__CYGWIN__)
SimulateIOError( return SQLITE_ERROR );
#ifdef __CYGWIN__
if( osGetcwd ){
zFull[nFull-1] = '\0';
if( !winIsDriveLetterAndColon(zRelative) || !winIsDirSep(zRelative[2]) ){
int rc = SQLITE_OK;
int nLink = 1; /* Number of symbolic links followed so far */
const char *zIn = zRelative; /* Input path for each iteration of loop */
char *zDel = 0;
struct stat buf;
UNUSED_PARAMETER(pVfs);
do {
/* Call lstat() on path zIn. Set bLink to true if the path is a symbolic
** link, or false otherwise. */
int bLink = 0;
if( osLstat && osReadlink ) {
if( osLstat(zIn, &buf)!=0 ){
int myErrno = osErrno;
if( myErrno!=ENOENT ){
rc = winLogError(SQLITE_CANTOPEN_BKPT, (DWORD)myErrno, "lstat", zIn);
}
}else{
bLink = ((buf.st_mode & 0170000) == 0120000);
}
if( bLink ){
if( zDel==0 ){
zDel = sqlite3MallocZero(nFull);
if( zDel==0 ) rc = SQLITE_NOMEM;
}else if( ++nLink>SQLITE_MAX_SYMLINKS ){
rc = SQLITE_CANTOPEN_BKPT;
}
if( rc==SQLITE_OK ){
nByte = osReadlink(zIn, zDel, nFull-1);
if( nByte ==(DWORD)-1 ){
rc = winLogError(SQLITE_CANTOPEN_BKPT, (DWORD)osErrno, "readlink", zIn);
}else{
if( zDel[0]!='/' ){
int n;
for(n = sqlite3Strlen30(zIn); n>0 && zIn[n-1]!='/'; n--);
if( nByte+n+1>nFull ){
rc = SQLITE_CANTOPEN_BKPT;
}else{
memmove(&zDel[n], zDel, nByte+1);
memcpy(zDel, zIn, n);
nByte += n;
}
}
zDel[nByte] = '\0';
}
}
zIn = zDel;
}
}
assert( rc!=SQLITE_OK || zIn!=zFull || zIn[0]=='/' );
if( rc==SQLITE_OK && zIn!=zFull ){
rc = mkFullPathname(zIn, zFull, nFull);
}
if( bLink==0 ) break;
zIn = zFull;
}while( rc==SQLITE_OK );
sqlite3_free(zDel);
winSimplifyName(zFull);
return rc;
}
}
#endif /* __CYGWIN__ */
#if 0 /* This doesn't work correctly at all! See:
<https://marc.info/?l=sqlite-users&m=139299149416314&w=2>
*/
SimulateIOError( return SQLITE_ERROR );
UNUSED_PARAMETER(nFull);
assert( nFull>=pVfs->mxPathname );
if ( sqlite3_data_directory && !winIsVerbatimPathname(zRelative) ){
/*
** NOTE: We are dealing with a relative path name and the data
** directory has been set. Therefore, use it as the basis
** for converting the relative path name to an absolute
** one by prepending the data directory and a slash.
*/
char *zOut = sqlite3MallocZero( 1+(u64)pVfs->mxPathname );
if( !zOut ){
return SQLITE_IOERR_NOMEM_BKPT;
}
if( cygwin_conv_path(
(osIsNT() ? CCP_POSIX_TO_WIN_W : CCP_POSIX_TO_WIN_A) |
CCP_RELATIVE, zRelative, zOut, pVfs->mxPathname+1)<0 ){
sqlite3_free(zOut);
return winLogError(SQLITE_CANTOPEN_CONVPATH, (DWORD)errno,
"winFullPathname1", zRelative);
}else{
char *zUtf8 = winConvertToUtf8Filename(zOut);
if( !zUtf8 ){
sqlite3_free(zOut);
return SQLITE_IOERR_NOMEM_BKPT;
}
sqlite3_snprintf(MIN(nFull, pVfs->mxPathname), zFull, "%s%c%s",
sqlite3_data_directory, winGetDirSep(), zUtf8);
sqlite3_free(zUtf8);
sqlite3_free(zOut);
}
char *zOut = sqlite3MallocZero( pVfs->mxPathname+1 );
if( !zOut ){
return SQLITE_IOERR_NOMEM_BKPT;
}
if( osCygwin_conv_path(
CCP_POSIX_TO_WIN_W,
zRelative, zOut, pVfs->mxPathname+1)<0 ){
sqlite3_free(zOut);
return winLogError(SQLITE_CANTOPEN_CONVPATH, (DWORD)errno,
"winFullPathname2", zRelative);
}else{
char *zOut = sqlite3MallocZero( pVfs->mxPathname+1 );
if( !zOut ){
char *zUtf8 = winConvertToUtf8Filename(zOut);
if( !zUtf8 ){
sqlite3_free(zOut);
return SQLITE_IOERR_NOMEM_BKPT;
}
if( cygwin_conv_path(
(osIsNT() ? CCP_POSIX_TO_WIN_W : CCP_POSIX_TO_WIN_A),
zRelative, zOut, pVfs->mxPathname+1)<0 ){
sqlite3_free(zOut);
return winLogError(SQLITE_CANTOPEN_CONVPATH, (DWORD)errno,
"winFullPathname2", zRelative);
}else{
char *zUtf8 = winConvertToUtf8Filename(zOut);
if( !zUtf8 ){
sqlite3_free(zOut);
return SQLITE_IOERR_NOMEM_BKPT;
}
sqlite3_snprintf(MIN(nFull, pVfs->mxPathname), zFull, "%s", zUtf8);
sqlite3_free(zUtf8);
sqlite3_free(zOut);
}
sqlite3_snprintf(MIN(nFull, pVfs->mxPathname), zFull, "%s", zUtf8);
sqlite3_free(zUtf8);
sqlite3_free(zOut);
}
return SQLITE_OK;
#endif
#if (SQLITE_OS_WINCE || SQLITE_OS_WINRT) && !defined(__CYGWIN__)
#if (SQLITE_OS_WINCE || SQLITE_OS_WINRT) && defined(_WIN32)
SimulateIOError( return SQLITE_ERROR );
/* WinCE has no concept of a relative pathname, or so I am told. */
/* WinRT has no way to convert a relative path to an absolute one. */
@@ -5953,7 +6239,8 @@ static int winFullPathnameNoMutex(
return SQLITE_OK;
#endif
#if !SQLITE_OS_WINCE && !SQLITE_OS_WINRT && !defined(__CYGWIN__)
#if !SQLITE_OS_WINCE && !SQLITE_OS_WINRT
#if defined(_WIN32)
/* It's odd to simulate an io-error here, but really this is just
** using the io-error infrastructure to test that SQLite handles this
** function failing. This function could fail if, for example, the
@@ -5971,6 +6258,7 @@ static int winFullPathnameNoMutex(
sqlite3_data_directory, winGetDirSep(), zRelative);
return SQLITE_OK;
}
#endif
zConverted = winConvertFromUtf8Filename(zRelative);
if( zConverted==0 ){
return SQLITE_IOERR_NOMEM_BKPT;
@@ -5983,12 +6271,13 @@ static int winFullPathnameNoMutex(
return winLogError(SQLITE_CANTOPEN_FULLPATH, osGetLastError(),
"winFullPathname1", zRelative);
}
zTemp = sqlite3MallocZero( nByte*sizeof(zTemp[0]) + 3*sizeof(zTemp[0]) );
nByte += 3;
zTemp = sqlite3MallocZero( nByte*sizeof(zTemp[0]) );
if( zTemp==0 ){
sqlite3_free(zConverted);
return SQLITE_IOERR_NOMEM_BKPT;
}
nByte = osGetFullPathNameW((LPCWSTR)zConverted, nByte+3, zTemp, 0);
nByte = osGetFullPathNameW((LPCWSTR)zConverted, nByte, zTemp, 0);
if( nByte==0 ){
sqlite3_free(zConverted);
sqlite3_free(zTemp);
@@ -6026,7 +6315,26 @@ static int winFullPathnameNoMutex(
}
#endif
if( zOut ){
#ifdef __CYGWIN__
if( memcmp(zOut, "\\\\?\\", 4) ){
sqlite3_snprintf(MIN(nFull, pVfs->mxPathname), zFull, "%s", zOut);
}else if( memcmp(zOut+4, "UNC\\", 4) ){
sqlite3_snprintf(MIN(nFull, pVfs->mxPathname), zFull, "%s", zOut+4);
}else{
char *p = zOut+6;
*p = '\\';
if( osGetcwd ){
/* On Cygwin, UNC paths use forward slashes */
while( *p ){
if( *p=='\\' ) *p = '/';
++p;
}
}
sqlite3_snprintf(MIN(nFull, pVfs->mxPathname), zFull, "%s", zOut+6);
}
#else
sqlite3_snprintf(MIN(nFull, pVfs->mxPathname), zFull, "%s", zOut);
#endif /* __CYGWIN__ */
sqlite3_free(zOut);
return SQLITE_OK;
}else{
@@ -6056,7 +6364,9 @@ static int winFullPathname(
*/
static void *winDlOpen(sqlite3_vfs *pVfs, const char *zFilename){
HANDLE h;
#if defined(__CYGWIN__)
#if 0 /* This doesn't work correctly at all! See:
<https://marc.info/?l=sqlite-users&m=139299149416314&w=2>
*/
int nFull = pVfs->mxPathname+1;
char *zFull = sqlite3MallocZero( nFull );
void *zConverted = 0;
@@ -6423,7 +6733,7 @@ int sqlite3_os_init(void){
/* Double-check that the aSyscall[] array has been constructed
** correctly. See ticket [bb3a86e890c8e96ab] */
assert( ArraySize(aSyscall)==82 );
assert( ArraySize(aSyscall)==89 );
/* get memory map allocation granularity */
memset(&winSysInfo, 0, sizeof(SYSTEM_INFO));
+2
View File
@@ -22,6 +22,8 @@
#ifdef __CYGWIN__
# include <sys/cygwin.h>
# include <sys/stat.h> /* amalgamator: dontcache */
# include <unistd.h> /* amalgamator: dontcache */
# include <errno.h> /* amalgamator: dontcache */
#endif
+1
View File
@@ -3247,6 +3247,7 @@ static int multiSelect(
multi_select_end:
pDest->iSdst = dest.iSdst;
pDest->nSdst = dest.nSdst;
pDest->iSDParm2 = dest.iSDParm2;
if( pDelete ){
sqlite3ParserAddCleanup(pParse, sqlite3SelectDeleteGeneric, pDelete);
}
+53 -11
View File
@@ -784,6 +784,23 @@ int cli_wcswidth(const char *z){
}
#endif
/*
** Check to see if z[] is a valid VT100 escape. If it is, then
** return the number of bytes in the escape sequence. Return 0 if
** z[] is not a VT100 escape.
**
** This routine assumes that z[0] is \033 (ESC).
*/
static int isVt100(const unsigned char *z){
int i;
if( z[1]!='[' ) return 0;
i = 2;
while( z[i]>=0x30 && z[i]<=0x3f ){ i++; }
while( z[i]>=0x20 && z[i]<=0x2f ){ i++; }
if( z[i]<0x40 || z[i]>0x7e ) return 0;
return i+1;
}
/*
** Output string zUtf to stdout as w characters. If w is negative,
** then right-justify the text. W is the width in UTF-8 characters, not
@@ -799,6 +816,7 @@ static void utf8_width_print(FILE *out, int w, const char *zUtf){
unsigned char c;
int i = 0;
int n = 0;
int k;
int aw = w<0 ? -w : w;
if( zUtf==0 ) zUtf = "";
while( (c = a[i])!=0 ){
@@ -811,6 +829,8 @@ static void utf8_width_print(FILE *out, int w, const char *zUtf){
}
i += len;
n += x;
}else if( c==0x1b && (k = isVt100(&a[i]))>0 ){
i += k;
}else if( n>=aw ){
break;
}else{
@@ -3998,9 +4018,14 @@ static char *translateForDisplayAndDup(
i++;
continue;
}
n++;
j += 3;
i++;
if( c==0x1b && p->eEscMode==SHELL_ESC_OFF && (k = isVt100(&z[i]))>0 ){
i += k;
j += k;
}else{
n++;
j += 3;
i++;
}
}
if( n>=mxWidth && bWordWrap ){
/* Perhaps try to back up to a better place to break the line */
@@ -4066,9 +4091,17 @@ static char *translateForDisplayAndDup(
zOut[j++] = '^';
zOut[j++] = 0x40 + c;
break;
case SHELL_ESC_OFF:
zOut[j++] = c;
case SHELL_ESC_OFF: {
int nn;
if( c==0x1b && (nn = isVt100(&z[i]))>0 ){
memcpy(&zOut[j], &z[i], nn);
j += nn;
i += nn - 1;
}else{
zOut[j++] = c;
}
break;
}
}
i++;
}
@@ -5205,6 +5238,7 @@ static const char *(azHelp[]) = {
#ifndef SQLITE_SHELL_FIDDLE
".output ?FILE? Send output to FILE or stdout if FILE is omitted",
" If FILE begins with '|' then open it as a pipe.",
" If FILE is 'off' then output is disabled.",
" Options:",
" --bom Prefix output with a UTF8 byte-order mark",
" -e Send output to the system text editor",
@@ -6822,7 +6856,7 @@ static int shell_dbtotxt_command(ShellState *p, int nArg, char **azArg){
for(j=0; j<16 && aLine[j]==0; j++){}
if( j==16 ) continue;
if( !seenPageLabel ){
sqlite3_fprintf(p->out, "| page %lld offset %lld\n", pgno, pgno*pgSz);
sqlite3_fprintf(p->out, "| page %lld offset %lld\n",pgno,(pgno-1)*pgSz);
seenPageLabel = 1;
}
sqlite3_fprintf(p->out, "| %5d:", i);
@@ -10200,9 +10234,9 @@ static int do_meta_command(char *zLine, ShellState *p){
){
char *zFile = 0;
int i;
int eMode = 0;
int bOnce = 0; /* 0: .output, 1: .once, 2: .excel/.www */
int bPlain = 0; /* --plain option */
int eMode = 0; /* 0: .outout/.once, 'x'=.excel, 'w'=.www */
int bOnce = 0; /* 0: .output, 1: .once, 2: .excel/.www */
int bPlain = 0; /* --plain option */
static const char *zBomUtf8 = "\357\273\277";
const char *zBom = 0;
@@ -10231,14 +10265,22 @@ static int do_meta_command(char *zLine, ShellState *p){
}else if( c=='o' && cli_strcmp(z,"-w")==0 ){
eMode = 'w'; /* Web browser */
}else{
sqlite3_fprintf(p->out,
sqlite3_fprintf(p->out,
"ERROR: unknown option: \"%s\". Usage:\n", azArg[i]);
showHelp(p->out, azArg[0]);
rc = 1;
goto meta_command_exit;
}
}else if( zFile==0 && eMode==0 ){
zFile = sqlite3_mprintf("%s", z);
if( cli_strcmp(z, "off")==0 ){
#ifdef _WIN32
zFile = sqlite3_mprintf("nul");
#else
zFile = sqlite3_mprintf("/dev/null");
#endif
}else{
zFile = sqlite3_mprintf("%s", z);
}
if( zFile && zFile[0]=='|' ){
while( i+1<nArg ) zFile = sqlite3_mprintf("%z %s", zFile, azArg[++i]);
break;
+25 -9
View File
@@ -76,7 +76,9 @@
# define SQLITE_PTRSIZE 8
# endif
# endif /* SQLITE_PTRSIZE */
# if defined(HAVE_STDINT_H)
# if defined(HAVE_STDINT_H) || (defined(__STDC_VERSION__) && \
(__STDC_VERSION__ >= 199901L))
# include <stdint.h>
typedef uintptr_t uptr;
# elif SQLITE_PTRSIZE==4
typedef unsigned int uptr;
@@ -2525,14 +2527,15 @@ static int SQLITE_TCLAPI DbObjCmd(
Tcl_Channel in; /* The input file */
int lineno = 0; /* Line number of input file */
char zLineNum[80]; /* Line number print buffer */
Tcl_DString str;
Tcl_Obj *str;
Tcl_Obj *pResult; /* interp result */
const char *zSep;
const char *zEnc = NULL;
const char *zNull;
if( objc<5 || objc>7 ){
if( objc<5 || objc>8 ){
Tcl_WrongNumArgs(interp, 2, objv,
"CONFLICT-ALGORITHM TABLE FILENAME ?SEPARATOR? ?NULLINDICATOR?");
"CONFLICT-ALGORITHM TABLE FILENAME ?SEPARATOR? ?NULLINDICATOR? ?ENCODING?");
return TCL_ERROR;
}
if( objc>=6 ){
@@ -2545,6 +2548,9 @@ static int SQLITE_TCLAPI DbObjCmd(
}else{
zNull = "";
}
if( objc>=8 ){
zEnc = Tcl_GetStringFromObj(objv[7], 0);
}
zConflict = Tcl_GetStringFromObj(objv[2], 0);
zTable = Tcl_GetStringFromObj(objv[3], 0);
zFile = Tcl_GetStringFromObj(objv[4], 0);
@@ -2609,19 +2615,29 @@ static int SQLITE_TCLAPI DbObjCmd(
sqlite3_finalize(pStmt);
return TCL_ERROR;
}
Tcl_SetChannelOption(NULL, in, "-translation", "auto");
if (zEnc && *zEnc && Tcl_SetChannelOption(interp, in, "-encoding", zEnc) != TCL_OK) {
sqlite3_finalize(pStmt);
return TCL_ERROR;
}
azCol = malloc( sizeof(azCol[0])*(nCol+1) );
if( azCol==0 ) {
Tcl_AppendResult(interp, "Error: can't malloc()", (char*)0);
Tcl_Close(interp, in);
return TCL_ERROR;
}
Tcl_DStringInit(&str);
str = Tcl_NewObj();
Tcl_IncrRefCount(str);
(void)sqlite3_exec(pDb->db, "BEGIN", 0, 0, 0);
zCommit = "COMMIT";
while( Tcl_Gets(in, &str)>=0 ) {
while( Tcl_GetsObj(in, str)>=0 ) {
char *z;
lineno++;
zLine = Tcl_DStringValue(&str);
if (zEnc && *zEnc) {
zLine = Tcl_GetString(str);
}else {
zLine = (char *)Tcl_GetByteArrayFromObj(str, NULL);
}
azCol[0] = zLine;
for(i=0, z=zLine; *z; z++){
if( *z==zSep[0] && strncmp(z, zSep, nSep)==0 ){
@@ -2659,14 +2675,14 @@ static int SQLITE_TCLAPI DbObjCmd(
}
sqlite3_step(pStmt);
rc = sqlite3_reset(pStmt);
Tcl_DStringSetLength(&str, 0);
Tcl_SetObjLength(str, 0);
if( rc!=SQLITE_OK ){
Tcl_AppendResult(interp,"Error: ", sqlite3_errmsg(pDb->db), (char*)0);
zCommit = "ROLLBACK";
break;
}
}
Tcl_DStringFree(&str);
Tcl_DecrRefCount(str);
free(azCol);
Tcl_Close(interp, in);
sqlite3_finalize(pStmt);
+103 -103
View File
@@ -102,7 +102,7 @@ static int SQLITE_TCLAPI get_sqlite_pointer(
}
p = (struct SqliteDb*)cmdInfo.objClientData;
sqlite3_snprintf(sizeof(zBuf), zBuf, "%p", p->db);
Tcl_AppendResult(interp, zBuf, 0);
Tcl_AppendResult(interp, zBuf, NULL);
return TCL_OK;
}
@@ -153,7 +153,7 @@ int sqlite3TestErrCode(Tcl_Interp *interp, sqlite3 *db, int rc){
"error code %s (%d) does not match sqlite3_errcode %s (%d)",
t1ErrorName(rc), rc, t1ErrorName(r2), r2);
Tcl_ResetResult(interp);
Tcl_AppendResult(interp, zBuf, 0);
Tcl_AppendResult(interp, zBuf, NULL);
return 1;
}
return 0;
@@ -504,7 +504,7 @@ static int SQLITE_TCLAPI test_mprintf_z(
for(i=2; i<argc && (i==2 || zResult); i++){
zResult = sqlite3_mprintf("%z%s%s", zResult, argv[1], argv[i]);
}
Tcl_AppendResult(interp, zResult, 0);
Tcl_AppendResult(interp, zResult, NULL);
sqlite3_free(zResult);
return TCL_OK;
}
@@ -552,7 +552,7 @@ static int SQLITE_TCLAPI test_snprintf_int(
if( n>sizeof(zStr) ) n = sizeof(zStr);
sqlite3_snprintf(sizeof(zStr), zStr, "abcdefghijklmnopqrstuvwxyz");
sqlite3_snprintf(n, zStr, zFormat, a1);
Tcl_AppendResult(interp, zStr, 0);
Tcl_AppendResult(interp, zStr, NULL);
return TCL_OK;
}
@@ -639,12 +639,12 @@ static int SQLITE_TCLAPI test_last_rowid(
char zBuf[30];
if( argc!=2 ){
Tcl_AppendResult(interp, "wrong # args: should be \"", argv[0], " DB\"", 0);
Tcl_AppendResult(interp, "wrong # args: should be \"", argv[0], " DB\"", NULL);
return TCL_ERROR;
}
if( getDbPointer(interp, argv[1], &db) ) return TCL_ERROR;
sqlite3_snprintf(sizeof(zBuf), zBuf, "%lld", sqlite3_last_insert_rowid(db));
Tcl_AppendResult(interp, zBuf, 0);
Tcl_AppendResult(interp, zBuf, NULL);
return SQLITE_OK;
}
@@ -1385,7 +1385,7 @@ static int SQLITE_TCLAPI sqlite3_mprintf_int(
if( Tcl_GetInt(interp, argv[i], &a[i-2]) ) return TCL_ERROR;
}
z = sqlite3_mprintf(argv[1], a[0], a[1], a[2]);
Tcl_AppendResult(interp, z, 0);
Tcl_AppendResult(interp, z, NULL);
sqlite3_free(z);
return TCL_OK;
}
@@ -1411,12 +1411,12 @@ static int SQLITE_TCLAPI sqlite3_mprintf_int64(
}
for(i=2; i<5; i++){
if( sqlite3Atoi64(argv[i], &a[i-2], sqlite3Strlen30(argv[i]), SQLITE_UTF8) ){
Tcl_AppendResult(interp, "argument is not a valid 64-bit integer", 0);
Tcl_AppendResult(interp, "argument is not a valid 64-bit integer", NULL);
return TCL_ERROR;
}
}
z = sqlite3_mprintf(argv[1], a[0], a[1], a[2]);
Tcl_AppendResult(interp, z, 0);
Tcl_AppendResult(interp, z, NULL);
sqlite3_free(z);
return TCL_OK;
}
@@ -1449,7 +1449,7 @@ static int SQLITE_TCLAPI sqlite3_mprintf_long(
a[i-2] &= (((u64)1)<<(sizeof(int)*8))-1;
}
z = sqlite3_mprintf(argv[1], a[0], a[1], a[2]);
Tcl_AppendResult(interp, z, 0);
Tcl_AppendResult(interp, z, NULL);
sqlite3_free(z);
return TCL_OK;
}
@@ -1476,7 +1476,7 @@ static int SQLITE_TCLAPI sqlite3_mprintf_str(
if( Tcl_GetInt(interp, argv[i], &a[i-2]) ) return TCL_ERROR;
}
z = sqlite3_mprintf(argv[1], a[0], a[1], argc>4 ? argv[4] : NULL);
Tcl_AppendResult(interp, z, 0);
Tcl_AppendResult(interp, z, NULL);
sqlite3_free(z);
return TCL_OK;
}
@@ -1502,7 +1502,7 @@ static int SQLITE_TCLAPI sqlite3_snprintf_str(
}
if( Tcl_GetInt(interp, argv[1], &n) ) return TCL_ERROR;
if( n<0 ){
Tcl_AppendResult(interp, "N must be non-negative", 0);
Tcl_AppendResult(interp, "N must be non-negative", NULL);
return TCL_ERROR;
}
for(i=3; i<5; i++){
@@ -1510,7 +1510,7 @@ static int SQLITE_TCLAPI sqlite3_snprintf_str(
}
z = sqlite3_malloc( n+1 );
sqlite3_snprintf(n, z, argv[2], a[0], a[1], argc>4 ? argv[5] : NULL);
Tcl_AppendResult(interp, z, 0);
Tcl_AppendResult(interp, z, NULL);
sqlite3_free(z);
return TCL_OK;
}
@@ -1539,7 +1539,7 @@ static int SQLITE_TCLAPI sqlite3_mprintf_double(
}
if( Tcl_GetDouble(interp, argv[4], &r) ) return TCL_ERROR;
z = sqlite3_mprintf(argv[1], a[0], a[1], r);
Tcl_AppendResult(interp, z, 0);
Tcl_AppendResult(interp, z, NULL);
sqlite3_free(z);
return TCL_OK;
}
@@ -1569,7 +1569,7 @@ static int SQLITE_TCLAPI sqlite3_mprintf_scaled(
if( Tcl_GetDouble(interp, argv[i], &r[i-2]) ) return TCL_ERROR;
}
z = sqlite3_mprintf(argv[1], r[0]*r[1]);
Tcl_AppendResult(interp, z, 0);
Tcl_AppendResult(interp, z, NULL);
sqlite3_free(z);
return TCL_OK;
}
@@ -1594,7 +1594,7 @@ static int SQLITE_TCLAPI sqlite3_mprintf_stronly(
return TCL_ERROR;
}
z = sqlite3_mprintf(argv[1], argv[2]);
Tcl_AppendResult(interp, z, 0);
Tcl_AppendResult(interp, z, NULL);
sqlite3_free(z);
return TCL_OK;
}
@@ -1621,14 +1621,14 @@ static int SQLITE_TCLAPI sqlite3_mprintf_hexdouble(
return TCL_ERROR;
}
if( sscanf(argv[2], "%08x%08x", &x2, &x1)!=2 ){
Tcl_AppendResult(interp, "2nd argument should be 16-characters of hex", 0);
Tcl_AppendResult(interp, "2nd argument should be 16-characters of hex", NULL);
return TCL_ERROR;
}
d = x2;
d = (d<<32) + x1;
memcpy(&r, &d, sizeof(r));
z = sqlite3_mprintf(argv[1], r);
Tcl_AppendResult(interp, z, 0);
Tcl_AppendResult(interp, z, NULL);
sqlite3_free(z);
return TCL_OK;
}
@@ -1746,7 +1746,7 @@ static int SQLITE_TCLAPI test_table_column_metadata(
&zDatatype, &zCollseq, &notnull, &primarykey, &autoincrement);
if( rc!=SQLITE_OK ){
Tcl_AppendResult(interp, sqlite3_errmsg(db), 0);
Tcl_AppendResult(interp, sqlite3_errmsg(db), NULL);
return TCL_ERROR;
}
@@ -2023,7 +2023,7 @@ static int SQLITE_TCLAPI test_create_function_v2(
);
if( rc!=SQLITE_OK ){
Tcl_ResetResult(interp);
Tcl_AppendResult(interp, sqlite3ErrName(rc), 0);
Tcl_AppendResult(interp, sqlite3ErrName(rc), NULL);
return TCL_ERROR;
}
return TCL_OK;
@@ -2212,7 +2212,7 @@ static int SQLITE_TCLAPI test_register_func(
rc = sqlite3_create_function(db, argv[2], -1, SQLITE_UTF8, 0,
testFunc, 0, 0);
if( rc!=0 ){
Tcl_AppendResult(interp, sqlite3ErrStr(rc), 0);
Tcl_AppendResult(interp, sqlite3ErrStr(rc), NULL);
return TCL_ERROR;
}
if( sqlite3TestErrCode(interp, db, rc) ) return TCL_ERROR;
@@ -2773,7 +2773,7 @@ static int SQLITE_TCLAPI test_snapshot_open_blob(
zName = Tcl_GetString(objv[2]);
pBlob = Tcl_GetByteArrayFromObj(objv[3], &nBlob);
if( nBlob!=sizeof(sqlite3_snapshot) ){
Tcl_AppendResult(interp, "bad SNAPSHOT", 0);
Tcl_AppendResult(interp, "bad SNAPSHOT", NULL);
return TCL_ERROR;
}
rc = sqlite3_snapshot_open(db, zName, (sqlite3_snapshot*)pBlob);
@@ -2810,7 +2810,7 @@ static int SQLITE_TCLAPI test_snapshot_cmp_blob(
p2 = Tcl_GetByteArrayFromObj(objv[2], &n2);
if( n1!=sizeof(sqlite3_snapshot) || n1!=n2 ){
Tcl_AppendResult(interp, "bad SNAPSHOT", 0);
Tcl_AppendResult(interp, "bad SNAPSHOT", NULL);
return TCL_ERROR;
}
@@ -2867,7 +2867,7 @@ static int SQLITE_TCLAPI test_atomic_batch_write(
rc = sqlite3_open(zFile, &db);
if( rc!=SQLITE_OK ){
Tcl_AppendResult(interp, sqlite3_errmsg(db), 0);
Tcl_AppendResult(interp, sqlite3_errmsg(db), NULL);
sqlite3_close(db);
return TCL_ERROR;
}
@@ -2909,7 +2909,7 @@ static int SQLITE_TCLAPI test_next_stmt(
pStmt = sqlite3_next_stmt(db, pStmt);
if( pStmt ){
if( sqlite3TestMakePointerStr(interp, zBuf, pStmt) ) return TCL_ERROR;
Tcl_AppendResult(interp, zBuf, 0);
Tcl_AppendResult(interp, zBuf, NULL);
}
return TCL_OK;
}
@@ -3211,7 +3211,7 @@ static int SQLITE_TCLAPI test_bind(
if( rc ){
char zBuf[50];
sqlite3_snprintf(sizeof(zBuf), zBuf, "(%d) ", rc);
Tcl_AppendResult(interp, zBuf, sqlite3ErrStr(rc), 0);
Tcl_AppendResult(interp, zBuf, sqlite3ErrStr(rc), NULL);
return TCL_ERROR;
}
return TCL_OK;
@@ -3343,14 +3343,14 @@ static int SQLITE_TCLAPI test_collate(
if( sqlite3TestErrCode(interp, db, rc) ) return TCL_ERROR;
if( rc!=SQLITE_OK ){
Tcl_AppendResult(interp, sqlite3ErrName(rc), 0);
Tcl_AppendResult(interp, sqlite3ErrName(rc), NULL);
return TCL_ERROR;
}
return TCL_OK;
bad_args:
Tcl_AppendResult(interp, "wrong # args: should be \"",
Tcl_GetStringFromObj(objv[0], 0), " <DB> <utf8> <utf16le> <utf16be>", 0);
Tcl_GetStringFromObj(objv[0], 0), " <DB> <utf8> <utf16le> <utf16be>", NULL);
return TCL_ERROR;
}
@@ -3629,7 +3629,7 @@ static int SQLITE_TCLAPI test_function(
return TCL_OK;
bad_args:
Tcl_AppendResult(interp, "wrong # args: should be \"",
Tcl_GetStringFromObj(objv[0], 0), " <DB> <utf8> <utf16le> <utf16be>", 0);
Tcl_GetStringFromObj(objv[0], 0), " <DB> <utf8> <utf16le> <utf16be>", NULL);
#endif /* SQLITE_OMIT_UTF16 */
return TCL_ERROR;
}
@@ -3750,7 +3750,7 @@ static int SQLITE_TCLAPI test_bind_zeroblob64(
rc = sqlite3_bind_zeroblob64(pStmt, idx, n);
if( sqlite3TestErrCode(interp, StmtToDb(pStmt), rc) ) return TCL_ERROR;
if( rc!=SQLITE_OK ){
Tcl_AppendResult(interp, sqlite3ErrName(rc), 0);
Tcl_AppendResult(interp, sqlite3ErrName(rc), NULL);
return TCL_ERROR;
}
@@ -3777,7 +3777,7 @@ static int SQLITE_TCLAPI test_bind_int(
if( objc!=4 ){
Tcl_AppendResult(interp, "wrong # args: should be \"",
Tcl_GetStringFromObj(objv[0], 0), " STMT N VALUE", 0);
Tcl_GetStringFromObj(objv[0], 0), " STMT N VALUE", NULL);
return TCL_ERROR;
}
@@ -3954,7 +3954,7 @@ static int SQLITE_TCLAPI test_bind_int64(
if( objc!=4 ){
Tcl_AppendResult(interp, "wrong # args: should be \"",
Tcl_GetStringFromObj(objv[0], 0), " STMT N VALUE", 0);
Tcl_GetStringFromObj(objv[0], 0), " STMT N VALUE", NULL);
return TCL_ERROR;
}
@@ -4010,7 +4010,7 @@ static int SQLITE_TCLAPI test_bind_double(
if( objc!=4 ){
Tcl_AppendResult(interp, "wrong # args: should be \"",
Tcl_GetStringFromObj(objv[0], 0), " STMT N VALUE", 0);
Tcl_GetStringFromObj(objv[0], 0), " STMT N VALUE", NULL);
return TCL_ERROR;
}
@@ -4067,7 +4067,7 @@ static int SQLITE_TCLAPI test_bind_null(
if( objc!=3 ){
Tcl_AppendResult(interp, "wrong # args: should be \"",
Tcl_GetStringFromObj(objv[0], 0), " STMT N", 0);
Tcl_GetStringFromObj(objv[0], 0), " STMT N", NULL);
return TCL_ERROR;
}
@@ -4107,7 +4107,7 @@ static int SQLITE_TCLAPI test_bind_text(
if( objc!=5 ){
Tcl_AppendResult(interp, "wrong # args: should be \"",
Tcl_GetStringFromObj(objv[0], 0), " STMT N VALUE BYTES", 0);
Tcl_GetStringFromObj(objv[0], 0), " STMT N VALUE BYTES", NULL);
return TCL_ERROR;
}
@@ -4167,7 +4167,7 @@ static int SQLITE_TCLAPI test_bind_text16(
if( objc!=5 && objc!=6){
Tcl_AppendResult(interp, "wrong # args: should be \"",
Tcl_GetStringFromObj(objv[0], 0), " STMT N VALUE BYTES", 0);
Tcl_GetStringFromObj(objv[0], 0), " STMT N VALUE BYTES", NULL);
return TCL_ERROR;
}
@@ -4189,7 +4189,7 @@ static int SQLITE_TCLAPI test_bind_text16(
free(toFree);
if( sqlite3TestErrCode(interp, StmtToDb(pStmt), rc) ) return TCL_ERROR;
if( rc!=SQLITE_OK ){
Tcl_AppendResult(interp, sqlite3ErrName(rc), 0);
Tcl_AppendResult(interp, sqlite3ErrName(rc), NULL);
return TCL_ERROR;
}
@@ -4220,7 +4220,7 @@ static int SQLITE_TCLAPI test_bind_blob(
if( objc!=5 && objc!=6 ){
Tcl_AppendResult(interp, "wrong # args: should be \"",
Tcl_GetStringFromObj(objv[0], 0), " STMT N DATA BYTES", 0);
Tcl_GetStringFromObj(objv[0], 0), " STMT N DATA BYTES", NULL);
return TCL_ERROR;
}
@@ -4718,12 +4718,12 @@ static int SQLITE_TCLAPI test_ex_errcode(
if( objc!=2 ){
Tcl_AppendResult(interp, "wrong # args: should be \"",
Tcl_GetString(objv[0]), " DB", 0);
Tcl_GetString(objv[0]), " DB", NULL);
return TCL_ERROR;
}
if( getDbPointer(interp, Tcl_GetString(objv[1]), &db) ) return TCL_ERROR;
rc = sqlite3_extended_errcode(db);
Tcl_AppendResult(interp, (char *)t1ErrorName(rc), 0);
Tcl_AppendResult(interp, (char *)t1ErrorName(rc), NULL);
return TCL_OK;
}
@@ -4745,12 +4745,12 @@ static int SQLITE_TCLAPI test_errcode(
if( objc!=2 ){
Tcl_AppendResult(interp, "wrong # args: should be \"",
Tcl_GetString(objv[0]), " DB", 0);
Tcl_GetString(objv[0]), " DB", NULL);
return TCL_ERROR;
}
if( getDbPointer(interp, Tcl_GetString(objv[1]), &db) ) return TCL_ERROR;
rc = sqlite3_errcode(db);
Tcl_AppendResult(interp, (char *)t1ErrorName(rc), 0);
Tcl_AppendResult(interp, (char *)t1ErrorName(rc), NULL);
return TCL_OK;
}
@@ -4771,7 +4771,7 @@ static int SQLITE_TCLAPI test_errmsg(
if( objc!=2 ){
Tcl_AppendResult(interp, "wrong # args: should be \"",
Tcl_GetString(objv[0]), " DB", 0);
Tcl_GetString(objv[0]), " DB", NULL);
return TCL_ERROR;
}
if( getDbPointer(interp, Tcl_GetString(objv[1]), &db) ) return TCL_ERROR;
@@ -4799,7 +4799,7 @@ static int SQLITE_TCLAPI test_error_offset(
if( objc!=2 ){
Tcl_AppendResult(interp, "wrong # args: should be \"",
Tcl_GetString(objv[0]), " DB", 0);
Tcl_GetString(objv[0]), " DB", NULL);
return TCL_ERROR;
}
if( getDbPointer(interp, Tcl_GetString(objv[1]), &db) ) return TCL_ERROR;
@@ -4831,7 +4831,7 @@ static int SQLITE_TCLAPI test_errmsg16(
if( objc!=2 ){
Tcl_AppendResult(interp, "wrong # args: should be \"",
Tcl_GetString(objv[0]), " DB", 0);
Tcl_GetString(objv[0]), " DB", NULL);
return TCL_ERROR;
}
if( getDbPointer(interp, Tcl_GetString(objv[1]), &db) ) return TCL_ERROR;
@@ -4870,7 +4870,7 @@ static int SQLITE_TCLAPI test_prepare(
if( objc!=5 && objc!=4 ){
Tcl_AppendResult(interp, "wrong # args: should be \"",
Tcl_GetString(objv[0]), " DB sql bytes ?tailvar?", 0);
Tcl_GetString(objv[0]), " DB sql bytes ?tailvar?", NULL);
return TCL_ERROR;
}
if( getDbPointer(interp, Tcl_GetString(objv[1]), &db) ) return TCL_ERROR;
@@ -4892,13 +4892,13 @@ static int SQLITE_TCLAPI test_prepare(
if( rc!=SQLITE_OK ){
assert( pStmt==0 );
sqlite3_snprintf(sizeof(zBuf), zBuf, "(%d) ", rc);
Tcl_AppendResult(interp, zBuf, sqlite3_errmsg(db), 0);
Tcl_AppendResult(interp, zBuf, sqlite3_errmsg(db), NULL);
return TCL_ERROR;
}
if( pStmt ){
if( sqlite3TestMakePointerStr(interp, zBuf, pStmt) ) return TCL_ERROR;
Tcl_AppendResult(interp, zBuf, 0);
Tcl_AppendResult(interp, zBuf, NULL);
}
return TCL_OK;
}
@@ -4929,7 +4929,7 @@ static int SQLITE_TCLAPI test_prepare_v2(
if( objc!=5 && objc!=4 ){
Tcl_AppendResult(interp, "wrong # args: should be \"",
Tcl_GetString(objv[0]), " DB sql bytes tailvar", 0);
Tcl_GetString(objv[0]), " DB sql bytes tailvar", NULL);
return TCL_ERROR;
}
if( getDbPointer(interp, Tcl_GetString(objv[1]), &db) ) return TCL_ERROR;
@@ -4966,13 +4966,13 @@ static int SQLITE_TCLAPI test_prepare_v2(
if( rc!=SQLITE_OK ){
assert( pStmt==0 );
sqlite3_snprintf(sizeof(zBuf), zBuf, "(%d) ", rc);
Tcl_AppendResult(interp, zBuf, sqlite3_errmsg(db), 0);
Tcl_AppendResult(interp, zBuf, sqlite3_errmsg(db), NULL);
return TCL_ERROR;
}
if( pStmt ){
if( sqlite3TestMakePointerStr(interp, zBuf, pStmt) ) return TCL_ERROR;
Tcl_AppendResult(interp, zBuf, 0);
Tcl_AppendResult(interp, zBuf, NULL);
}
return TCL_OK;
}
@@ -5003,7 +5003,7 @@ static int SQLITE_TCLAPI test_prepare_v3(
if( objc!=6 && objc!=5 ){
Tcl_AppendResult(interp, "wrong # args: should be \"",
Tcl_GetString(objv[0]), " DB sql bytes flags tailvar", 0);
Tcl_GetString(objv[0]), " DB sql bytes flags tailvar", NULL);
return TCL_ERROR;
}
if( getDbPointer(interp, Tcl_GetString(objv[1]), &db) ) return TCL_ERROR;
@@ -5039,13 +5039,13 @@ static int SQLITE_TCLAPI test_prepare_v3(
if( rc!=SQLITE_OK ){
assert( pStmt==0 );
sqlite3_snprintf(sizeof(zBuf), zBuf, "(%d) ", rc);
Tcl_AppendResult(interp, zBuf, sqlite3_errmsg(db), 0);
Tcl_AppendResult(interp, zBuf, sqlite3_errmsg(db), NULL);
return TCL_ERROR;
}
if( pStmt ){
if( sqlite3TestMakePointerStr(interp, zBuf, pStmt) ) return TCL_ERROR;
Tcl_AppendResult(interp, zBuf, 0);
Tcl_AppendResult(interp, zBuf, NULL);
}
return TCL_OK;
}
@@ -5070,7 +5070,7 @@ static int SQLITE_TCLAPI test_prepare_tkt3134(
if( objc!=2 ){
Tcl_AppendResult(interp, "wrong # args: should be \"",
Tcl_GetString(objv[0]), " DB sql bytes tailvar", 0);
Tcl_GetString(objv[0]), " DB sql bytes tailvar", NULL);
return TCL_ERROR;
}
if( getDbPointer(interp, Tcl_GetString(objv[1]), &db) ) return TCL_ERROR;
@@ -5080,13 +5080,13 @@ static int SQLITE_TCLAPI test_prepare_tkt3134(
if( rc!=SQLITE_OK ){
assert( pStmt==0 );
sqlite3_snprintf(sizeof(zBuf), zBuf, "(%d) ", rc);
Tcl_AppendResult(interp, zBuf, sqlite3_errmsg(db), 0);
Tcl_AppendResult(interp, zBuf, sqlite3_errmsg(db), NULL);
return TCL_ERROR;
}
if( pStmt ){
if( sqlite3TestMakePointerStr(interp, zBuf, pStmt) ) return TCL_ERROR;
Tcl_AppendResult(interp, zBuf, 0);
Tcl_AppendResult(interp, zBuf, NULL);
}
return TCL_OK;
}
@@ -5118,7 +5118,7 @@ static int SQLITE_TCLAPI test_prepare16(
if( objc!=5 && objc!=4 ){
Tcl_AppendResult(interp, "wrong # args: should be \"",
Tcl_GetString(objv[0]), " DB sql bytes ?tailvar?", 0);
Tcl_GetString(objv[0]), " DB sql bytes ?tailvar?", NULL);
return TCL_ERROR;
}
if( getDbPointer(interp, Tcl_GetString(objv[1]), &db) ) return TCL_ERROR;
@@ -5146,7 +5146,7 @@ static int SQLITE_TCLAPI test_prepare16(
if( pStmt ){
if( sqlite3TestMakePointerStr(interp, zBuf, pStmt) ) return TCL_ERROR;
}
Tcl_AppendResult(interp, zBuf, 0);
Tcl_AppendResult(interp, zBuf, NULL);
#endif /* SQLITE_OMIT_UTF16 */
return TCL_OK;
}
@@ -5178,7 +5178,7 @@ static int SQLITE_TCLAPI test_prepare16_v2(
if( objc!=5 && objc!=4 ){
Tcl_AppendResult(interp, "wrong # args: should be \"",
Tcl_GetString(objv[0]), " DB sql bytes ?tailvar?", 0);
Tcl_GetString(objv[0]), " DB sql bytes ?tailvar?", NULL);
return TCL_ERROR;
}
if( getDbPointer(interp, Tcl_GetString(objv[1]), &db) ) return TCL_ERROR;
@@ -5206,7 +5206,7 @@ static int SQLITE_TCLAPI test_prepare16_v2(
if( pStmt ){
if( sqlite3TestMakePointerStr(interp, zBuf, pStmt) ) return TCL_ERROR;
}
Tcl_AppendResult(interp, zBuf, 0);
Tcl_AppendResult(interp, zBuf, NULL);
#endif /* SQLITE_OMIT_UTF16 */
return TCL_OK;
}
@@ -5226,7 +5226,7 @@ static int SQLITE_TCLAPI test_open(
if( objc!=3 && objc!=2 && objc!=1 ){
Tcl_AppendResult(interp, "wrong # args: should be \"",
Tcl_GetString(objv[0]), " filename options-list", 0);
Tcl_GetString(objv[0]), " filename options-list", NULL);
return TCL_ERROR;
}
@@ -5234,7 +5234,7 @@ static int SQLITE_TCLAPI test_open(
sqlite3_open(zFilename, &db);
if( sqlite3TestMakePointerStr(interp, zBuf, db) ) return TCL_ERROR;
Tcl_AppendResult(interp, zBuf, 0);
Tcl_AppendResult(interp, zBuf, NULL);
return TCL_OK;
}
@@ -5305,7 +5305,7 @@ static int SQLITE_TCLAPI test_open_v2(
rc = sqlite3_open_v2(zFilename, &db, flags, zVfs);
if( sqlite3TestMakePointerStr(interp, zBuf, db) ) return TCL_ERROR;
Tcl_AppendResult(interp, zBuf, 0);
Tcl_AppendResult(interp, zBuf, NULL);
return TCL_OK;
}
@@ -5325,7 +5325,7 @@ static int SQLITE_TCLAPI test_open16(
if( objc!=3 ){
Tcl_AppendResult(interp, "wrong # args: should be \"",
Tcl_GetString(objv[0]), " filename options-list", 0);
Tcl_GetString(objv[0]), " filename options-list", NULL);
return TCL_ERROR;
}
@@ -5333,7 +5333,7 @@ static int SQLITE_TCLAPI test_open16(
sqlite3_open16(zFilename, &db);
if( sqlite3TestMakePointerStr(interp, zBuf, db) ) return TCL_ERROR;
Tcl_AppendResult(interp, zBuf, 0);
Tcl_AppendResult(interp, zBuf, NULL);
#endif /* SQLITE_OMIT_UTF16 */
return TCL_OK;
}
@@ -5409,7 +5409,7 @@ static int SQLITE_TCLAPI test_step(
if( objc!=2 ){
Tcl_AppendResult(interp, "wrong # args: should be \"",
Tcl_GetString(objv[0]), " STMT", 0);
Tcl_GetString(objv[0]), " STMT", NULL);
return TCL_ERROR;
}
@@ -5493,7 +5493,7 @@ static int SQLITE_TCLAPI test_column_count(
if( objc!=2 ){
Tcl_AppendResult(interp, "wrong # args: should be \"",
Tcl_GetString(objv[0]), " STMT column", 0);
Tcl_GetString(objv[0]), " STMT column", NULL);
return TCL_ERROR;
}
@@ -5520,7 +5520,7 @@ static int SQLITE_TCLAPI test_column_type(
if( objc!=3 ){
Tcl_AppendResult(interp, "wrong # args: should be \"",
Tcl_GetString(objv[0]), " STMT column", 0);
Tcl_GetString(objv[0]), " STMT column", NULL);
return TCL_ERROR;
}
@@ -5569,7 +5569,7 @@ static int SQLITE_TCLAPI test_column_int64(
if( objc!=3 ){
Tcl_AppendResult(interp, "wrong # args: should be \"",
Tcl_GetString(objv[0]), " STMT column", 0);
Tcl_GetString(objv[0]), " STMT column", NULL);
return TCL_ERROR;
}
@@ -5598,7 +5598,7 @@ static int SQLITE_TCLAPI test_column_blob(
if( objc!=3 ){
Tcl_AppendResult(interp, "wrong # args: should be \"",
Tcl_GetString(objv[0]), " STMT column", 0);
Tcl_GetString(objv[0]), " STMT column", NULL);
return TCL_ERROR;
}
@@ -5628,7 +5628,7 @@ static int SQLITE_TCLAPI test_column_double(
if( objc!=3 ){
Tcl_AppendResult(interp, "wrong # args: should be \"",
Tcl_GetString(objv[0]), " STMT column", 0);
Tcl_GetString(objv[0]), " STMT column", NULL);
return TCL_ERROR;
}
@@ -5655,7 +5655,7 @@ static int SQLITE_TCLAPI test_data_count(
if( objc!=2 ){
Tcl_AppendResult(interp, "wrong # args: should be \"",
Tcl_GetString(objv[0]), " STMT column", 0);
Tcl_GetString(objv[0]), " STMT column", NULL);
return TCL_ERROR;
}
@@ -5688,7 +5688,7 @@ static int SQLITE_TCLAPI test_stmt_utf8(
xFuncU = (const unsigned char*(*)(sqlite3_stmt*,int))xFunc;
if( objc!=3 ){
Tcl_AppendResult(interp, "wrong # args: should be \"",
Tcl_GetString(objv[0]), " STMT column", 0);
Tcl_GetString(objv[0]), " STMT column", NULL);
return TCL_ERROR;
}
@@ -5746,7 +5746,7 @@ static int SQLITE_TCLAPI test_stmt_utf16(
xFunc = (const void *(*)(sqlite3_stmt*, int))clientData;
if( objc!=3 ){
Tcl_AppendResult(interp, "wrong # args: should be \"",
Tcl_GetString(objv[0]), " STMT column", 0);
Tcl_GetString(objv[0]), " STMT column", NULL);
return TCL_ERROR;
}
@@ -5787,7 +5787,7 @@ static int SQLITE_TCLAPI test_stmt_int(
xFunc = (int (*)(sqlite3_stmt*, int))clientData;
if( objc!=3 ){
Tcl_AppendResult(interp, "wrong # args: should be \"",
Tcl_GetString(objv[0]), " STMT column", 0);
Tcl_GetString(objv[0]), " STMT column", NULL);
return TCL_ERROR;
}
@@ -5811,7 +5811,7 @@ static int SQLITE_TCLAPI test_interrupt(
){
sqlite3 *db;
if( argc!=2 ){
Tcl_AppendResult(interp, "wrong # args: should be \"", argv[0], " DB", 0);
Tcl_AppendResult(interp, "wrong # args: should be \"", argv[0], " DB", NULL);
return TCL_ERROR;
}
if( getDbPointer(interp, argv[1], &db) ) return TCL_ERROR;
@@ -5833,7 +5833,7 @@ static int SQLITE_TCLAPI test_is_interrupted(
sqlite3 *db;
int rc;
if( argc!=2 ){
Tcl_AppendResult(interp, "wrong # args: should be \"", argv[0], " DB", 0);
Tcl_AppendResult(interp, "wrong # args: should be \"", argv[0], " DB", NULL);
return TCL_ERROR;
}
if( getDbPointer(interp, argv[1], &db) ) return TCL_ERROR;
@@ -5915,7 +5915,7 @@ static int SQLITE_TCLAPI get_autocommit(
}
if( getDbPointer(interp, argv[1], &db) ) return TCL_ERROR;
sqlite3_snprintf(sizeof(zBuf), zBuf, "%d", sqlite3_get_autocommit(db));
Tcl_AppendResult(interp, zBuf, 0);
Tcl_AppendResult(interp, zBuf, NULL);
return TCL_OK;
}
@@ -5936,13 +5936,13 @@ static int SQLITE_TCLAPI test_busy_timeout(
sqlite3 *db;
if( argc!=3 ){
Tcl_AppendResult(interp, "wrong # args: should be \"", argv[0],
" DB", 0);
" DB", NULL);
return TCL_ERROR;
}
if( getDbPointer(interp, argv[1], &db) ) return TCL_ERROR;
if( Tcl_GetInt(interp, argv[2], &ms) ) return TCL_ERROR;
rc = sqlite3_busy_timeout(db, ms);
Tcl_AppendResult(interp, sqlite3ErrName(rc), 0);
Tcl_AppendResult(interp, sqlite3ErrName(rc), NULL);
return TCL_OK;
}
@@ -5963,14 +5963,14 @@ static int SQLITE_TCLAPI test_setlk_timeout(
if( argc==4 ){
const char *zArg = argv[1];
int nArg = strlen(zArg);
const size_t nArg = strlen(zArg);
if( nArg>=2 && nArg<=15 && memcmp(zArg, "-blockonconnect", nArg)==0 ){
bBlockOnConnect = 1;
}
}
if( argc!=(3+bBlockOnConnect) ){
Tcl_AppendResult(interp, "wrong # args: should be \"", argv[0],
" ?-blockonconnect? DB MS", 0);
" ?-blockonconnect? DB MS", NULL);
return TCL_ERROR;
}
if( getDbPointer(interp, argv[argc-2], &db) ) return TCL_ERROR;
@@ -5978,7 +5978,7 @@ static int SQLITE_TCLAPI test_setlk_timeout(
rc = sqlite3_setlk_timeout(
db, ms, (bBlockOnConnect ? SQLITE_SETLK_BLOCK_ON_CONNECT : 0)
);
Tcl_AppendResult(interp, sqlite3ErrName(rc), 0);
Tcl_AppendResult(interp, sqlite3ErrName(rc), NULL);
return TCL_OK;
}
@@ -6390,7 +6390,7 @@ static int SQLITE_TCLAPI test_pager_refcounts(
if( objc!=2 ){
Tcl_AppendResult(interp, "wrong # args: should be \"",
Tcl_GetStringFromObj(objv[0], 0), " DB", 0);
Tcl_GetStringFromObj(objv[0], 0), " DB", NULL);
return TCL_ERROR;
}
if( getDbPointer(interp, Tcl_GetString(objv[1]), &db) ) return TCL_ERROR;
@@ -6632,7 +6632,7 @@ static int SQLITE_TCLAPI file_control_test(
if( objc!=2 ){
Tcl_AppendResult(interp, "wrong # args: should be \"",
Tcl_GetStringFromObj(objv[0], 0), " DB", 0);
Tcl_GetStringFromObj(objv[0], 0), " DB", NULL);
return TCL_ERROR;
}
if( getDbPointer(interp, Tcl_GetString(objv[1]), &db) ) return TCL_ERROR;
@@ -6667,7 +6667,7 @@ static int SQLITE_TCLAPI file_control_lasterrno_test(
if( objc!=2 ){
Tcl_AppendResult(interp, "wrong # args: should be \"",
Tcl_GetStringFromObj(objv[0], 0), " DB", 0);
Tcl_GetStringFromObj(objv[0], 0), " DB", NULL);
return TCL_ERROR;
}
if( getDbPointer(interp, Tcl_GetString(objv[1]), &db) ){
@@ -6680,7 +6680,7 @@ static int SQLITE_TCLAPI file_control_lasterrno_test(
}
if( iArg!=0 ) {
Tcl_AppendResult(interp, "Unexpected non-zero errno: ",
Tcl_GetStringFromObj(Tcl_NewIntObj(iArg), 0), " ", 0);
Tcl_GetStringFromObj(Tcl_NewIntObj(iArg), 0), " ", NULL);
return TCL_ERROR;
}
return TCL_OK;
@@ -6816,7 +6816,7 @@ static int SQLITE_TCLAPI file_control_lockproxy_test(
if( objc!=3 ){
Tcl_AppendResult(interp, "wrong # args: should be \"",
Tcl_GetStringFromObj(objv[0], 0), " DB PWD", 0);
Tcl_GetStringFromObj(objv[0], 0), " DB PWD", NULL);
return TCL_ERROR;
}
if( getDbPointer(interp, Tcl_GetString(objv[1]), &db) ){
@@ -6852,7 +6852,7 @@ static int SQLITE_TCLAPI file_control_lockproxy_test(
rc = sqlite3_file_control(db, NULL, SQLITE_GET_LOCKPROXYFILE, &testPath);
if( strncmp(proxyPath,testPath,11) ){
Tcl_AppendResult(interp, "Lock proxy file did not match the "
"previously assigned value", 0);
"previously assigned value", NULL);
return TCL_ERROR;
}
if( rc ){
@@ -6889,7 +6889,7 @@ static int SQLITE_TCLAPI file_control_win32_av_retry(
if( objc!=4 ){
Tcl_AppendResult(interp, "wrong # args: should be \"",
Tcl_GetStringFromObj(objv[0], 0), " DB NRETRY DELAY", 0);
Tcl_GetStringFromObj(objv[0], 0), " DB NRETRY DELAY", NULL);
return TCL_ERROR;
}
if( getDbPointer(interp, Tcl_GetString(objv[1]), &db) ){
@@ -6922,7 +6922,7 @@ static int file_control_win32_get_handle(
if( objc!=2 ){
Tcl_AppendResult(interp, "wrong # args: should be \"",
Tcl_GetStringFromObj(objv[0], 0), " DB", 0);
Tcl_GetStringFromObj(objv[0], 0), " DB", NULL);
return TCL_ERROR;
}
if( getDbPointer(interp, Tcl_GetString(objv[1]), &db) ){
@@ -6954,7 +6954,7 @@ static int SQLITE_TCLAPI file_control_win32_set_handle(
if( objc!=3 ){
Tcl_AppendResult(interp, "wrong # args: should be \"",
Tcl_GetStringFromObj(objv[0], 0), " DB HANDLE", 0);
Tcl_GetStringFromObj(objv[0], 0), " DB HANDLE", NULL);
return TCL_ERROR;
}
if( getDbPointer(interp, Tcl_GetString(objv[1]), &db) ){
@@ -6990,7 +6990,7 @@ static int SQLITE_TCLAPI file_control_persist_wal(
if( objc!=3 ){
Tcl_AppendResult(interp, "wrong # args: should be \"",
Tcl_GetStringFromObj(objv[0], 0), " DB FLAG", 0);
Tcl_GetStringFromObj(objv[0], 0), " DB FLAG", NULL);
return TCL_ERROR;
}
if( getDbPointer(interp, Tcl_GetString(objv[1]), &db) ){
@@ -7022,7 +7022,7 @@ static int SQLITE_TCLAPI file_control_powersafe_overwrite(
if( objc!=3 ){
Tcl_AppendResult(interp, "wrong # args: should be \"",
Tcl_GetStringFromObj(objv[0], 0), " DB FLAG", 0);
Tcl_GetStringFromObj(objv[0], 0), " DB FLAG", NULL);
return TCL_ERROR;
}
if( getDbPointer(interp, Tcl_GetString(objv[1]), &db) ){
@@ -7053,7 +7053,7 @@ static int SQLITE_TCLAPI file_control_vfsname(
if( objc!=2 && objc!=3 ){
Tcl_AppendResult(interp, "wrong # args: should be \"",
Tcl_GetStringFromObj(objv[0], 0), " DB ?AUXDB?", 0);
Tcl_GetStringFromObj(objv[0], 0), " DB ?AUXDB?", NULL);
return TCL_ERROR;
}
if( getDbPointer(interp, Tcl_GetString(objv[1]), &db) ){
@@ -7115,7 +7115,7 @@ static int SQLITE_TCLAPI file_control_tempfilename(
if( objc!=2 && objc!=3 ){
Tcl_AppendResult(interp, "wrong # args: should be \"",
Tcl_GetStringFromObj(objv[0], 0), " DB ?AUXDB?", 0);
Tcl_GetStringFromObj(objv[0], 0), " DB ?AUXDB?", NULL);
return TCL_ERROR;
}
if( getDbPointer(interp, Tcl_GetString(objv[1]), &db) ){
@@ -7148,7 +7148,7 @@ static int SQLITE_TCLAPI file_control_external_reader(
if( objc!=2 && objc!=3 ){
Tcl_AppendResult(interp, "wrong # args: should be \"",
Tcl_GetStringFromObj(objv[0], 0), " DB ?AUXDB?", 0);
Tcl_GetStringFromObj(objv[0], 0), " DB ?AUXDB?", NULL);
return TCL_ERROR;
}
if( getDbPointer(interp, Tcl_GetString(objv[1]), &db) ){
@@ -7232,7 +7232,7 @@ static int SQLITE_TCLAPI test_limit(
if( objc!=4 ){
Tcl_AppendResult(interp, "wrong # args: should be \"",
Tcl_GetStringFromObj(objv[0], 0), " DB ID VALUE", 0);
Tcl_GetStringFromObj(objv[0], 0), " DB ID VALUE", NULL);
return TCL_ERROR;
}
if( getDbPointer(interp, Tcl_GetString(objv[1]), &db) ) return TCL_ERROR;
@@ -7543,7 +7543,7 @@ static int SQLITE_TCLAPI test_wal_checkpoint_v2(
if( rc!=SQLITE_OK && rc!=SQLITE_BUSY ){
const char *zErrCode = sqlite3ErrName(rc);
Tcl_ResetResult(interp);
Tcl_AppendResult(interp, zErrCode, " - ", (char *)sqlite3_errmsg(db), 0);
Tcl_AppendResult(interp, zErrCode, " - ", (char *)sqlite3_errmsg(db), NULL);
return TCL_ERROR;
}
@@ -8017,7 +8017,7 @@ static void SQLITE_CDECL win32_file_locker(void *pAppData){
}
#endif
#if SQLITE_OS_WIN
#ifdef _WIN32
/*
** lock_win32_file FILENAME DELAY1 DELAY2
**
@@ -8826,7 +8826,7 @@ static int SQLITE_TCLAPI guess_number_of_cores(
Tcl_Obj *CONST objv[]
){
unsigned int nCore = 1;
#if SQLITE_OS_WIN
#ifdef _WIN32
SYSTEM_INFO sysinfo;
GetSystemInfo(&sysinfo);
nCore = (unsigned int)sysinfo.dwNumberOfProcessors;
@@ -9006,7 +9006,7 @@ int Sqlitetest1_Init(Tcl_Interp *interp){
{ "database_never_corrupt", database_never_corrupt, 0},
{ "database_may_be_corrupt", database_may_be_corrupt, 0},
{ "optimization_control", optimization_control,0},
#if SQLITE_OS_WIN
#ifdef _WIN32
{ "lock_win32_file", win32_file_lock, 0 },
#endif
{ "tcl_objproc", runAsObjProc, 0 },
+35 -35
View File
@@ -51,7 +51,7 @@ static int SQLITE_TCLAPI pager_open(
char zBuf[100];
if( argc!=3 ){
Tcl_AppendResult(interp, "wrong # args: should be \"", argv[0],
" FILENAME N-PAGE\"", 0);
" FILENAME N-PAGE\"", NULL);
return TCL_ERROR;
}
if( Tcl_GetInt(interp, argv[2], &nPage) ) return TCL_ERROR;
@@ -59,14 +59,14 @@ static int SQLITE_TCLAPI pager_open(
SQLITE_OPEN_READWRITE | SQLITE_OPEN_CREATE | SQLITE_OPEN_MAIN_DB,
pager_test_reiniter);
if( rc!=SQLITE_OK ){
Tcl_AppendResult(interp, sqlite3ErrName(rc), 0);
Tcl_AppendResult(interp, sqlite3ErrName(rc), NULL);
return TCL_ERROR;
}
sqlite3PagerSetCachesize(pPager, nPage);
pageSize = test_pagesize;
sqlite3PagerSetPagesize(pPager, &pageSize, -1);
sqlite3_snprintf(sizeof(zBuf),zBuf,"%p",pPager);
Tcl_AppendResult(interp, zBuf, 0);
Tcl_AppendResult(interp, zBuf, NULL);
return TCL_OK;
}
@@ -85,13 +85,13 @@ static int SQLITE_TCLAPI pager_close(
int rc;
if( argc!=2 ){
Tcl_AppendResult(interp, "wrong # args: should be \"", argv[0],
" ID\"", 0);
" ID\"", NULL);
return TCL_ERROR;
}
pPager = sqlite3TestTextToPtr(argv[1]);
rc = sqlite3PagerClose(pPager, 0);
if( rc!=SQLITE_OK ){
Tcl_AppendResult(interp, sqlite3ErrName(rc), 0);
Tcl_AppendResult(interp, sqlite3ErrName(rc), NULL);
return TCL_ERROR;
}
return TCL_OK;
@@ -112,13 +112,13 @@ static int SQLITE_TCLAPI pager_rollback(
int rc;
if( argc!=2 ){
Tcl_AppendResult(interp, "wrong # args: should be \"", argv[0],
" ID\"", 0);
" ID\"", NULL);
return TCL_ERROR;
}
pPager = sqlite3TestTextToPtr(argv[1]);
rc = sqlite3PagerRollback(pPager);
if( rc!=SQLITE_OK ){
Tcl_AppendResult(interp, sqlite3ErrName(rc), 0);
Tcl_AppendResult(interp, sqlite3ErrName(rc), NULL);
return TCL_ERROR;
}
return TCL_OK;
@@ -139,18 +139,18 @@ static int SQLITE_TCLAPI pager_commit(
int rc;
if( argc!=2 ){
Tcl_AppendResult(interp, "wrong # args: should be \"", argv[0],
" ID\"", 0);
" ID\"", NULL);
return TCL_ERROR;
}
pPager = sqlite3TestTextToPtr(argv[1]);
rc = sqlite3PagerCommitPhaseOne(pPager, 0, 0);
if( rc!=SQLITE_OK ){
Tcl_AppendResult(interp, sqlite3ErrName(rc), 0);
Tcl_AppendResult(interp, sqlite3ErrName(rc), NULL);
return TCL_ERROR;
}
rc = sqlite3PagerCommitPhaseTwo(pPager);
if( rc!=SQLITE_OK ){
Tcl_AppendResult(interp, sqlite3ErrName(rc), 0);
Tcl_AppendResult(interp, sqlite3ErrName(rc), NULL);
return TCL_ERROR;
}
return TCL_OK;
@@ -171,13 +171,13 @@ static int SQLITE_TCLAPI pager_stmt_begin(
int rc;
if( argc!=2 ){
Tcl_AppendResult(interp, "wrong # args: should be \"", argv[0],
" ID\"", 0);
" ID\"", NULL);
return TCL_ERROR;
}
pPager = sqlite3TestTextToPtr(argv[1]);
rc = sqlite3PagerOpenSavepoint(pPager, 1);
if( rc!=SQLITE_OK ){
Tcl_AppendResult(interp, sqlite3ErrName(rc), 0);
Tcl_AppendResult(interp, sqlite3ErrName(rc), NULL);
return TCL_ERROR;
}
return TCL_OK;
@@ -198,14 +198,14 @@ static int SQLITE_TCLAPI pager_stmt_rollback(
int rc;
if( argc!=2 ){
Tcl_AppendResult(interp, "wrong # args: should be \"", argv[0],
" ID\"", 0);
" ID\"", NULL);
return TCL_ERROR;
}
pPager = sqlite3TestTextToPtr(argv[1]);
rc = sqlite3PagerSavepoint(pPager, SAVEPOINT_ROLLBACK, 0);
sqlite3PagerSavepoint(pPager, SAVEPOINT_RELEASE, 0);
if( rc!=SQLITE_OK ){
Tcl_AppendResult(interp, sqlite3ErrName(rc), 0);
Tcl_AppendResult(interp, sqlite3ErrName(rc), NULL);
return TCL_ERROR;
}
return TCL_OK;
@@ -226,13 +226,13 @@ static int SQLITE_TCLAPI pager_stmt_commit(
int rc;
if( argc!=2 ){
Tcl_AppendResult(interp, "wrong # args: should be \"", argv[0],
" ID\"", 0);
" ID\"", NULL);
return TCL_ERROR;
}
pPager = sqlite3TestTextToPtr(argv[1]);
rc = sqlite3PagerSavepoint(pPager, SAVEPOINT_RELEASE, 0);
if( rc!=SQLITE_OK ){
Tcl_AppendResult(interp, sqlite3ErrName(rc), 0);
Tcl_AppendResult(interp, sqlite3ErrName(rc), NULL);
return TCL_ERROR;
}
return TCL_OK;
@@ -253,7 +253,7 @@ static int SQLITE_TCLAPI pager_stats(
int i, *a;
if( argc!=2 ){
Tcl_AppendResult(interp, "wrong # args: should be \"", argv[0],
" ID\"", 0);
" ID\"", NULL);
return TCL_ERROR;
}
pPager = sqlite3TestTextToPtr(argv[1]);
@@ -287,13 +287,13 @@ static int SQLITE_TCLAPI pager_pagecount(
int nPage;
if( argc!=2 ){
Tcl_AppendResult(interp, "wrong # args: should be \"", argv[0],
" ID\"", 0);
" ID\"", NULL);
return TCL_ERROR;
}
pPager = sqlite3TestTextToPtr(argv[1]);
sqlite3PagerPagecount(pPager, &nPage);
sqlite3_snprintf(sizeof(zBuf), zBuf, "%d", nPage);
Tcl_AppendResult(interp, zBuf, 0);
Tcl_AppendResult(interp, zBuf, NULL);
return TCL_OK;
}
@@ -315,7 +315,7 @@ static int SQLITE_TCLAPI page_get(
int rc;
if( argc!=3 ){
Tcl_AppendResult(interp, "wrong # args: should be \"", argv[0],
" ID PGNO\"", 0);
" ID PGNO\"", NULL);
return TCL_ERROR;
}
pPager = sqlite3TestTextToPtr(argv[1]);
@@ -325,11 +325,11 @@ static int SQLITE_TCLAPI page_get(
rc = sqlite3PagerGet(pPager, pgno, &pPage, 0);
}
if( rc!=SQLITE_OK ){
Tcl_AppendResult(interp, sqlite3ErrName(rc), 0);
Tcl_AppendResult(interp, sqlite3ErrName(rc), NULL);
return TCL_ERROR;
}
sqlite3_snprintf(sizeof(zBuf),zBuf,"%p",pPage);
Tcl_AppendResult(interp, zBuf, 0);
Tcl_AppendResult(interp, zBuf, NULL);
return TCL_OK;
}
@@ -351,7 +351,7 @@ static int SQLITE_TCLAPI page_lookup(
int pgno;
if( argc!=3 ){
Tcl_AppendResult(interp, "wrong # args: should be \"", argv[0],
" ID PGNO\"", 0);
" ID PGNO\"", NULL);
return TCL_ERROR;
}
pPager = sqlite3TestTextToPtr(argv[1]);
@@ -359,7 +359,7 @@ static int SQLITE_TCLAPI page_lookup(
pPage = sqlite3PagerLookup(pPager, pgno);
if( pPage ){
sqlite3_snprintf(sizeof(zBuf),zBuf,"%p",pPage);
Tcl_AppendResult(interp, zBuf, 0);
Tcl_AppendResult(interp, zBuf, NULL);
}
return TCL_OK;
}
@@ -377,7 +377,7 @@ static int SQLITE_TCLAPI pager_truncate(
int pgno;
if( argc!=3 ){
Tcl_AppendResult(interp, "wrong # args: should be \"", argv[0],
" ID PGNO\"", 0);
" ID PGNO\"", NULL);
return TCL_ERROR;
}
pPager = sqlite3TestTextToPtr(argv[1]);
@@ -401,7 +401,7 @@ static int SQLITE_TCLAPI page_unref(
DbPage *pPage;
if( argc!=2 ){
Tcl_AppendResult(interp, "wrong # args: should be \"", argv[0],
" PAGE\"", 0);
" PAGE\"", NULL);
return TCL_ERROR;
}
pPage = (DbPage *)sqlite3TestTextToPtr(argv[1]);
@@ -424,12 +424,12 @@ static int SQLITE_TCLAPI page_read(
DbPage *pPage;
if( argc!=2 ){
Tcl_AppendResult(interp, "wrong # args: should be \"", argv[0],
" PAGE\"", 0);
" PAGE\"", NULL);
return TCL_ERROR;
}
pPage = sqlite3TestTextToPtr(argv[1]);
memcpy(zBuf, sqlite3PagerGetData(pPage), sizeof(zBuf));
Tcl_AppendResult(interp, zBuf, 0);
Tcl_AppendResult(interp, zBuf, NULL);
return TCL_OK;
}
@@ -448,12 +448,12 @@ static int SQLITE_TCLAPI page_number(
DbPage *pPage;
if( argc!=2 ){
Tcl_AppendResult(interp, "wrong # args: should be \"", argv[0],
" PAGE\"", 0);
" PAGE\"", NULL);
return TCL_ERROR;
}
pPage = (DbPage *)sqlite3TestTextToPtr(argv[1]);
sqlite3_snprintf(sizeof(zBuf), zBuf, "%d", sqlite3PagerPagenumber(pPage));
Tcl_AppendResult(interp, zBuf, 0);
Tcl_AppendResult(interp, zBuf, NULL);
return TCL_OK;
}
@@ -473,13 +473,13 @@ static int SQLITE_TCLAPI page_write(
int rc;
if( argc!=3 ){
Tcl_AppendResult(interp, "wrong # args: should be \"", argv[0],
" PAGE DATA\"", 0);
" PAGE DATA\"", NULL);
return TCL_ERROR;
}
pPage = (DbPage *)sqlite3TestTextToPtr(argv[1]);
rc = sqlite3PagerWrite(pPage);
if( rc!=SQLITE_OK ){
Tcl_AppendResult(interp, sqlite3ErrName(rc), 0);
Tcl_AppendResult(interp, sqlite3ErrName(rc), NULL);
return TCL_ERROR;
}
pData = sqlite3PagerGetData(pPage);
@@ -513,7 +513,7 @@ static int SQLITE_TCLAPI fake_big_file(
int nFile;
if( argc!=3 ){
Tcl_AppendResult(interp, "wrong # args: should be \"", argv[0],
" N-MEGABYTES FILE\"", 0);
" N-MEGABYTES FILE\"", NULL);
return TCL_ERROR;
}
if( Tcl_GetInt(interp, argv[1], &n) ) return TCL_ERROR;
@@ -536,7 +536,7 @@ static int SQLITE_TCLAPI fake_big_file(
(SQLITE_OPEN_CREATE|SQLITE_OPEN_READWRITE|SQLITE_OPEN_MAIN_DB), 0
);
if( rc ){
Tcl_AppendResult(interp, "open failed: ", sqlite3ErrName(rc), 0);
Tcl_AppendResult(interp, "open failed: ", sqlite3ErrName(rc), NULL);
sqlite3_free(zFile);
return TCL_ERROR;
}
@@ -546,7 +546,7 @@ static int SQLITE_TCLAPI fake_big_file(
sqlite3OsCloseFree(fd);
sqlite3_free(zFile);
if( rc ){
Tcl_AppendResult(interp, "write failed: ", sqlite3ErrName(rc), 0);
Tcl_AppendResult(interp, "write failed: ", sqlite3ErrName(rc), NULL);
return TCL_ERROR;
}
return TCL_OK;
+35 -34
View File
@@ -46,9 +46,10 @@ static int SQLITE_TCLAPI btree_open(
char *zFilename;
if( argc!=3 ){
Tcl_AppendResult(interp, "wrong # args: should be \"", argv[0],
" FILENAME NCACHE FLAGS\"", 0);
" FILENAME NCACHE FLAGS\"", NULL);
return TCL_ERROR;
}
if( Tcl_GetInt(interp, argv[2], &nCache) ) return TCL_ERROR;
nRefSqlite3++;
if( nRefSqlite3==1 ){
@@ -65,12 +66,12 @@ static int SQLITE_TCLAPI btree_open(
SQLITE_OPEN_READWRITE | SQLITE_OPEN_CREATE | SQLITE_OPEN_MAIN_DB);
sqlite3_free(zFilename);
if( rc!=SQLITE_OK ){
Tcl_AppendResult(interp, sqlite3ErrName(rc), 0);
Tcl_AppendResult(interp, sqlite3ErrName(rc), NULL);
return TCL_ERROR;
}
sqlite3BtreeSetCacheSize(pBt, nCache);
sqlite3_snprintf(sizeof(zBuf), zBuf,"%p", pBt);
Tcl_AppendResult(interp, zBuf, 0);
Tcl_AppendResult(interp, zBuf, NULL);
return TCL_OK;
}
@@ -89,13 +90,13 @@ static int SQLITE_TCLAPI btree_close(
int rc;
if( argc!=2 ){
Tcl_AppendResult(interp, "wrong # args: should be \"", argv[0],
" ID\"", 0);
" ID\"", NULL);
return TCL_ERROR;
}
pBt = sqlite3TestTextToPtr(argv[1]);
rc = sqlite3BtreeClose(pBt);
if( rc!=SQLITE_OK ){
Tcl_AppendResult(interp, sqlite3ErrName(rc), 0);
Tcl_AppendResult(interp, sqlite3ErrName(rc), NULL);
return TCL_ERROR;
}
nRefSqlite3--;
@@ -124,7 +125,7 @@ static int SQLITE_TCLAPI btree_begin_transaction(
int rc;
if( argc!=2 ){
Tcl_AppendResult(interp, "wrong # args: should be \"", argv[0],
" ID\"", 0);
" ID\"", NULL);
return TCL_ERROR;
}
pBt = sqlite3TestTextToPtr(argv[1]);
@@ -132,7 +133,7 @@ static int SQLITE_TCLAPI btree_begin_transaction(
rc = sqlite3BtreeBeginTrans(pBt, 1, 0);
sqlite3BtreeLeave(pBt);
if( rc!=SQLITE_OK ){
Tcl_AppendResult(interp, sqlite3ErrName(rc), 0);
Tcl_AppendResult(interp, sqlite3ErrName(rc), NULL);
return TCL_ERROR;
}
return TCL_OK;
@@ -155,7 +156,7 @@ static int SQLITE_TCLAPI btree_pager_stats(
if( argc!=2 ){
Tcl_AppendResult(interp, "wrong # args: should be \"", argv[0],
" ID\"", 0);
" ID\"", NULL);
return TCL_ERROR;
}
pBt = sqlite3TestTextToPtr(argv[1]);
@@ -208,7 +209,7 @@ static int SQLITE_TCLAPI btree_cursor(
if( argc!=4 ){
Tcl_AppendResult(interp, "wrong # args: should be \"", argv[0],
" ID TABLENUM WRITEABLE\"", 0);
" ID TABLENUM WRITEABLE\"", NULL);
return TCL_ERROR;
}
pBt = sqlite3TestTextToPtr(argv[1]);
@@ -229,11 +230,11 @@ static int SQLITE_TCLAPI btree_cursor(
sqlite3_mutex_leave(pBt->db->mutex);
if( rc ){
ckfree((char *)pCur);
Tcl_AppendResult(interp, sqlite3ErrName(rc), 0);
Tcl_AppendResult(interp, sqlite3ErrName(rc), NULL);
return TCL_ERROR;
}
sqlite3_snprintf(sizeof(zBuf), zBuf,"%p", pCur);
Tcl_AppendResult(interp, zBuf, 0);
Tcl_AppendResult(interp, zBuf, NULL);
return SQLITE_OK;
}
@@ -253,7 +254,7 @@ static int SQLITE_TCLAPI btree_close_cursor(
if( argc!=2 ){
Tcl_AppendResult(interp, "wrong # args: should be \"", argv[0],
" ID\"", 0);
" ID\"", NULL);
return TCL_ERROR;
}
pCur = sqlite3TestTextToPtr(argv[1]);
@@ -271,7 +272,7 @@ static int SQLITE_TCLAPI btree_close_cursor(
#endif
ckfree((char *)pCur);
if( rc ){
Tcl_AppendResult(interp, sqlite3ErrName(rc), 0);
Tcl_AppendResult(interp, sqlite3ErrName(rc), NULL);
return TCL_ERROR;
}
return SQLITE_OK;
@@ -297,7 +298,7 @@ static int SQLITE_TCLAPI btree_next(
if( argc!=2 ){
Tcl_AppendResult(interp, "wrong # args: should be \"", argv[0],
" ID\"", 0);
" ID\"", NULL);
return TCL_ERROR;
}
pCur = sqlite3TestTextToPtr(argv[1]);
@@ -309,11 +310,11 @@ static int SQLITE_TCLAPI btree_next(
}
sqlite3BtreeLeave(pCur->pBtree);
if( rc ){
Tcl_AppendResult(interp, sqlite3ErrName(rc), 0);
Tcl_AppendResult(interp, sqlite3ErrName(rc), NULL);
return TCL_ERROR;
}
sqlite3_snprintf(sizeof(zBuf),zBuf,"%d",res);
Tcl_AppendResult(interp, zBuf, 0);
Tcl_AppendResult(interp, zBuf, NULL);
return SQLITE_OK;
}
@@ -336,7 +337,7 @@ static int SQLITE_TCLAPI btree_first(
if( argc!=2 ){
Tcl_AppendResult(interp, "wrong # args: should be \"", argv[0],
" ID\"", 0);
" ID\"", NULL);
return TCL_ERROR;
}
pCur = sqlite3TestTextToPtr(argv[1]);
@@ -344,11 +345,11 @@ static int SQLITE_TCLAPI btree_first(
rc = sqlite3BtreeFirst(pCur, &res);
sqlite3BtreeLeave(pCur->pBtree);
if( rc ){
Tcl_AppendResult(interp, sqlite3ErrName(rc), 0);
Tcl_AppendResult(interp, sqlite3ErrName(rc), NULL);
return TCL_ERROR;
}
sqlite3_snprintf(sizeof(zBuf),zBuf,"%d",res);
Tcl_AppendResult(interp, zBuf, 0);
Tcl_AppendResult(interp, zBuf, NULL);
return SQLITE_OK;
}
@@ -370,7 +371,7 @@ static int SQLITE_TCLAPI btree_eof(
if( argc!=2 ){
Tcl_AppendResult(interp, "wrong # args: should be \"", argv[0],
" ID\"", 0);
" ID\"", NULL);
return TCL_ERROR;
}
pCur = sqlite3TestTextToPtr(argv[1]);
@@ -378,7 +379,7 @@ static int SQLITE_TCLAPI btree_eof(
rc = sqlite3BtreeEof(pCur);
sqlite3BtreeLeave(pCur->pBtree);
sqlite3_snprintf(sizeof(zBuf),zBuf, "%d", rc);
Tcl_AppendResult(interp, zBuf, 0);
Tcl_AppendResult(interp, zBuf, NULL);
return SQLITE_OK;
}
@@ -399,7 +400,7 @@ static int SQLITE_TCLAPI btree_payload_size(
if( argc!=2 ){
Tcl_AppendResult(interp, "wrong # args: should be \"", argv[0],
" ID\"", 0);
" ID\"", NULL);
return TCL_ERROR;
}
pCur = sqlite3TestTextToPtr(argv[1]);
@@ -407,7 +408,7 @@ static int SQLITE_TCLAPI btree_payload_size(
n = sqlite3BtreePayloadSize(pCur);
sqlite3BtreeLeave(pCur->pBtree);
sqlite3_snprintf(sizeof(zBuf),zBuf, "%u", n);
Tcl_AppendResult(interp, zBuf, 0);
Tcl_AppendResult(interp, zBuf, NULL);
return SQLITE_OK;
}
@@ -437,7 +438,7 @@ static int SQLITE_TCLAPI btree_varint_test(
unsigned char zBuf[100];
if( argc!=5 ){
Tcl_AppendResult(interp, "wrong # args: should be \"", argv[0],
" START MULTIPLIER COUNT INCREMENT\"", 0);
" START MULTIPLIER COUNT INCREMENT\"", NULL);
return TCL_ERROR;
}
if( Tcl_GetInt(interp, argv[1], (int*)&start) ) return TCL_ERROR;
@@ -452,20 +453,20 @@ static int SQLITE_TCLAPI btree_varint_test(
if( n1>9 || n1<1 ){
sqlite3_snprintf(sizeof(zErr), zErr,
"putVarint returned %d - should be between 1 and 9", n1);
Tcl_AppendResult(interp, zErr, 0);
Tcl_AppendResult(interp, zErr, NULL);
return TCL_ERROR;
}
n2 = getVarint(zBuf, &out);
if( n1!=n2 ){
sqlite3_snprintf(sizeof(zErr), zErr,
"putVarint returned %d and getVarint returned %d", n1, n2);
Tcl_AppendResult(interp, zErr, 0);
Tcl_AppendResult(interp, zErr, NULL);
return TCL_ERROR;
}
if( in!=out ){
sqlite3_snprintf(sizeof(zErr), zErr,
"Wrote 0x%016llx and got back 0x%016llx", in, out);
Tcl_AppendResult(interp, zErr, 0);
Tcl_AppendResult(interp, zErr, NULL);
return TCL_ERROR;
}
if( (in & 0xffffffff)==in ){
@@ -476,14 +477,14 @@ static int SQLITE_TCLAPI btree_varint_test(
sqlite3_snprintf(sizeof(zErr), zErr,
"putVarint returned %d and GetVarint32 returned %d",
n1, n2);
Tcl_AppendResult(interp, zErr, 0);
Tcl_AppendResult(interp, zErr, NULL);
return TCL_ERROR;
}
if( in!=out ){
sqlite3_snprintf(sizeof(zErr), zErr,
"Wrote 0x%016llx and got back 0x%016llx from GetVarint32",
in, out);
Tcl_AppendResult(interp, zErr, 0);
Tcl_AppendResult(interp, zErr, NULL);
return TCL_ERROR;
}
}
@@ -523,12 +524,12 @@ static int SQLITE_TCLAPI btree_from_db(
if( argc!=2 && argc!=3 ){
Tcl_AppendResult(interp, "wrong # args: should be \"", argv[0],
" DB-HANDLE ?N?\"", 0);
" DB-HANDLE ?N?\"", NULL);
return TCL_ERROR;
}
if( 1!=Tcl_GetCommandInfo(interp, argv[1], &info) ){
Tcl_AppendResult(interp, "No such db-handle: \"", argv[1], "\"", 0);
Tcl_AppendResult(interp, "No such db-handle: \"", argv[1], "\"", NULL);
return TCL_ERROR;
}
if( argc==3 ){
@@ -561,7 +562,7 @@ static int SQLITE_TCLAPI btree_ismemdb(
if( argc!=2 ){
Tcl_AppendResult(interp, "wrong # args: should be \"", argv[0],
" ID\"", 0);
" ID\"", NULL);
return TCL_ERROR;
}
pBt = sqlite3TestTextToPtr(argv[1]);
@@ -591,7 +592,7 @@ static int SQLITE_TCLAPI btree_set_cache_size(
if( argc!=3 ){
Tcl_AppendResult(
interp, "wrong # args: should be \"", argv[0], " BT NCACHE\"", 0);
interp, "wrong # args: should be \"", argv[0], " BT NCACHE\"", NULL);
return TCL_ERROR;
}
pBt = sqlite3TestTextToPtr(argv[1]);
@@ -646,7 +647,7 @@ static int SQLITE_TCLAPI btree_insert(
Tcl_ResetResult(interp);
if( rc ){
Tcl_AppendResult(interp, sqlite3ErrName(rc), 0);
Tcl_AppendResult(interp, sqlite3ErrName(rc), NULL);
return TCL_ERROR;
}
return TCL_OK;
+40 -40
View File
@@ -119,7 +119,7 @@ static void *test_thread_main(void *pArg){
*/
static int parse_thread_id(Tcl_Interp *interp, const char *zArg){
if( zArg==0 || zArg[0]==0 || zArg[1]!=0 || !isupper((unsigned char)zArg[0]) ){
Tcl_AppendResult(interp, "thread ID must be an upper case letter", 0);
Tcl_AppendResult(interp, "thread ID must be an upper case letter", NULL);
return -1;
}
return zArg[0] - 'A';
@@ -143,13 +143,13 @@ static int SQLITE_TCLAPI tcl_thread_create(
if( argc!=3 ){
Tcl_AppendResult(interp, "wrong # args: should be \"", argv[0],
" ID FILENAME", 0);
" ID FILENAME", NULL);
return TCL_ERROR;
}
i = parse_thread_id(interp, argv[1]);
if( i<0 ) return TCL_ERROR;
if( threadset[i].busy ){
Tcl_AppendResult(interp, "thread ", argv[1], " is already running", 0);
Tcl_AppendResult(interp, "thread ", argv[1], " is already running", NULL);
return TCL_ERROR;
}
threadset[i].busy = 1;
@@ -159,7 +159,7 @@ static int SQLITE_TCLAPI tcl_thread_create(
threadset[i].completed = 0;
rc = pthread_create(&x, 0, test_thread_main, &threadset[i]);
if( rc ){
Tcl_AppendResult(interp, "failed to create the thread", 0);
Tcl_AppendResult(interp, "failed to create the thread", NULL);
sqlite3_free(threadset[i].zFilename);
threadset[i].busy = 0;
return TCL_ERROR;
@@ -192,13 +192,13 @@ static int SQLITE_TCLAPI tcl_thread_wait(
if( argc!=2 ){
Tcl_AppendResult(interp, "wrong # args: should be \"", argv[0],
" ID", 0);
" ID", NULL);
return TCL_ERROR;
}
i = parse_thread_id(interp, argv[1]);
if( i<0 ) return TCL_ERROR;
if( !threadset[i].busy ){
Tcl_AppendResult(interp, "no such thread", 0);
Tcl_AppendResult(interp, "no such thread", NULL);
return TCL_ERROR;
}
test_thread_wait(&threadset[i]);
@@ -236,7 +236,7 @@ static int SQLITE_TCLAPI tcl_thread_halt(
if( argc!=2 ){
Tcl_AppendResult(interp, "wrong # args: should be \"", argv[0],
" ID", 0);
" ID", NULL);
return TCL_ERROR;
}
if( argv[1][0]=='*' && argv[1][1]==0 ){
@@ -247,7 +247,7 @@ static int SQLITE_TCLAPI tcl_thread_halt(
i = parse_thread_id(interp, argv[1]);
if( i<0 ) return TCL_ERROR;
if( !threadset[i].busy ){
Tcl_AppendResult(interp, "no such thread", 0);
Tcl_AppendResult(interp, "no such thread", NULL);
return TCL_ERROR;
}
test_stop_thread(&threadset[i]);
@@ -272,18 +272,18 @@ static int SQLITE_TCLAPI tcl_thread_argc(
if( argc!=2 ){
Tcl_AppendResult(interp, "wrong # args: should be \"", argv[0],
" ID", 0);
" ID", NULL);
return TCL_ERROR;
}
i = parse_thread_id(interp, argv[1]);
if( i<0 ) return TCL_ERROR;
if( !threadset[i].busy ){
Tcl_AppendResult(interp, "no such thread", 0);
Tcl_AppendResult(interp, "no such thread", NULL);
return TCL_ERROR;
}
test_thread_wait(&threadset[i]);
sqlite3_snprintf(sizeof(zBuf), zBuf, "%d", threadset[i].argc);
Tcl_AppendResult(interp, zBuf, 0);
Tcl_AppendResult(interp, zBuf, NULL);
return TCL_OK;
}
@@ -304,22 +304,22 @@ static int SQLITE_TCLAPI tcl_thread_argv(
if( argc!=3 ){
Tcl_AppendResult(interp, "wrong # args: should be \"", argv[0],
" ID N", 0);
" ID N", NULL);
return TCL_ERROR;
}
i = parse_thread_id(interp, argv[1]);
if( i<0 ) return TCL_ERROR;
if( !threadset[i].busy ){
Tcl_AppendResult(interp, "no such thread", 0);
Tcl_AppendResult(interp, "no such thread", NULL);
return TCL_ERROR;
}
if( Tcl_GetInt(interp, argv[2], &n) ) return TCL_ERROR;
test_thread_wait(&threadset[i]);
if( n<0 || n>=threadset[i].argc ){
Tcl_AppendResult(interp, "column number out of range", 0);
Tcl_AppendResult(interp, "column number out of range", NULL);
return TCL_ERROR;
}
Tcl_AppendResult(interp, threadset[i].argv[n], 0);
Tcl_AppendResult(interp, threadset[i].argv[n], NULL);
return TCL_OK;
}
@@ -340,22 +340,22 @@ static int SQLITE_TCLAPI tcl_thread_colname(
if( argc!=3 ){
Tcl_AppendResult(interp, "wrong # args: should be \"", argv[0],
" ID N", 0);
" ID N", NULL);
return TCL_ERROR;
}
i = parse_thread_id(interp, argv[1]);
if( i<0 ) return TCL_ERROR;
if( !threadset[i].busy ){
Tcl_AppendResult(interp, "no such thread", 0);
Tcl_AppendResult(interp, "no such thread", NULL);
return TCL_ERROR;
}
if( Tcl_GetInt(interp, argv[2], &n) ) return TCL_ERROR;
test_thread_wait(&threadset[i]);
if( n<0 || n>=threadset[i].argc ){
Tcl_AppendResult(interp, "column number out of range", 0);
Tcl_AppendResult(interp, "column number out of range", NULL);
return TCL_ERROR;
}
Tcl_AppendResult(interp, threadset[i].colv[n], 0);
Tcl_AppendResult(interp, threadset[i].colv[n], NULL);
return TCL_OK;
}
@@ -376,18 +376,18 @@ static int SQLITE_TCLAPI tcl_thread_result(
if( argc!=2 ){
Tcl_AppendResult(interp, "wrong # args: should be \"", argv[0],
" ID", 0);
" ID", NULL);
return TCL_ERROR;
}
i = parse_thread_id(interp, argv[1]);
if( i<0 ) return TCL_ERROR;
if( !threadset[i].busy ){
Tcl_AppendResult(interp, "no such thread", 0);
Tcl_AppendResult(interp, "no such thread", NULL);
return TCL_ERROR;
}
test_thread_wait(&threadset[i]);
zName = sqlite3ErrName(threadset[i].rc);
Tcl_AppendResult(interp, zName, 0);
Tcl_AppendResult(interp, zName, NULL);
return TCL_OK;
}
@@ -407,17 +407,17 @@ static int SQLITE_TCLAPI tcl_thread_error(
if( argc!=2 ){
Tcl_AppendResult(interp, "wrong # args: should be \"", argv[0],
" ID", 0);
" ID", NULL);
return TCL_ERROR;
}
i = parse_thread_id(interp, argv[1]);
if( i<0 ) return TCL_ERROR;
if( !threadset[i].busy ){
Tcl_AppendResult(interp, "no such thread", 0);
Tcl_AppendResult(interp, "no such thread", NULL);
return TCL_ERROR;
}
test_thread_wait(&threadset[i]);
Tcl_AppendResult(interp, threadset[i].zErr, 0);
Tcl_AppendResult(interp, threadset[i].zErr, NULL);
return TCL_OK;
}
@@ -451,13 +451,13 @@ static int SQLITE_TCLAPI tcl_thread_compile(
int i;
if( argc!=3 ){
Tcl_AppendResult(interp, "wrong # args: should be \"", argv[0],
" ID SQL", 0);
" ID SQL", NULL);
return TCL_ERROR;
}
i = parse_thread_id(interp, argv[1]);
if( i<0 ) return TCL_ERROR;
if( !threadset[i].busy ){
Tcl_AppendResult(interp, "no such thread", 0);
Tcl_AppendResult(interp, "no such thread", NULL);
return TCL_ERROR;
}
test_thread_wait(&threadset[i]);
@@ -505,13 +505,13 @@ static int SQLITE_TCLAPI tcl_thread_step(
int i;
if( argc!=2 ){
Tcl_AppendResult(interp, "wrong # args: should be \"", argv[0],
" IDL", 0);
" IDL", NULL);
return TCL_ERROR;
}
i = parse_thread_id(interp, argv[1]);
if( i<0 ) return TCL_ERROR;
if( !threadset[i].busy ){
Tcl_AppendResult(interp, "no such thread", 0);
Tcl_AppendResult(interp, "no such thread", NULL);
return TCL_ERROR;
}
test_thread_wait(&threadset[i]);
@@ -548,13 +548,13 @@ static int SQLITE_TCLAPI tcl_thread_finalize(
int i;
if( argc!=2 ){
Tcl_AppendResult(interp, "wrong # args: should be \"", argv[0],
" IDL", 0);
" IDL", NULL);
return TCL_ERROR;
}
i = parse_thread_id(interp, argv[1]);
if( i<0 ) return TCL_ERROR;
if( !threadset[i].busy ){
Tcl_AppendResult(interp, "no such thread", 0);
Tcl_AppendResult(interp, "no such thread", NULL);
return TCL_ERROR;
}
test_thread_wait(&threadset[i]);
@@ -581,20 +581,20 @@ static int SQLITE_TCLAPI tcl_thread_swap(
sqlite3 *temp;
if( argc!=3 ){
Tcl_AppendResult(interp, "wrong # args: should be \"", argv[0],
" ID1 ID2", 0);
" ID1 ID2", NULL);
return TCL_ERROR;
}
i = parse_thread_id(interp, argv[1]);
if( i<0 ) return TCL_ERROR;
if( !threadset[i].busy ){
Tcl_AppendResult(interp, "no such thread", 0);
Tcl_AppendResult(interp, "no such thread", NULL);
return TCL_ERROR;
}
test_thread_wait(&threadset[i]);
j = parse_thread_id(interp, argv[2]);
if( j<0 ) return TCL_ERROR;
if( !threadset[j].busy ){
Tcl_AppendResult(interp, "no such thread", 0);
Tcl_AppendResult(interp, "no such thread", NULL);
return TCL_ERROR;
}
test_thread_wait(&threadset[j]);
@@ -622,13 +622,13 @@ static int SQLITE_TCLAPI tcl_thread_db_get(
extern int sqlite3TestMakePointerStr(Tcl_Interp*, char*, void*);
if( argc!=2 ){
Tcl_AppendResult(interp, "wrong # args: should be \"", argv[0],
" ID", 0);
" ID", NULL);
return TCL_ERROR;
}
i = parse_thread_id(interp, argv[1]);
if( i<0 ) return TCL_ERROR;
if( !threadset[i].busy ){
Tcl_AppendResult(interp, "no such thread", 0);
Tcl_AppendResult(interp, "no such thread", NULL);
return TCL_ERROR;
}
test_thread_wait(&threadset[i]);
@@ -653,13 +653,13 @@ static int SQLITE_TCLAPI tcl_thread_db_put(
extern void *sqlite3TestTextToPtr(const char *);
if( argc!=3 ){
Tcl_AppendResult(interp, "wrong # args: should be \"", argv[0],
" ID DB", 0);
" ID DB", NULL);
return TCL_ERROR;
}
i = parse_thread_id(interp, argv[1]);
if( i<0 ) return TCL_ERROR;
if( !threadset[i].busy ){
Tcl_AppendResult(interp, "no such thread", 0);
Tcl_AppendResult(interp, "no such thread", NULL);
return TCL_ERROR;
}
test_thread_wait(&threadset[i]);
@@ -685,13 +685,13 @@ static int SQLITE_TCLAPI tcl_thread_stmt_get(
extern int sqlite3TestMakePointerStr(Tcl_Interp*, char*, void*);
if( argc!=2 ){
Tcl_AppendResult(interp, "wrong # args: should be \"", argv[0],
" ID", 0);
" ID", NULL);
return TCL_ERROR;
}
i = parse_thread_id(interp, argv[1]);
if( i<0 ) return TCL_ERROR;
if( !threadset[i].busy ){
Tcl_AppendResult(interp, "no such thread", 0);
Tcl_AppendResult(interp, "no such thread", NULL);
return TCL_ERROR;
}
test_thread_wait(&threadset[i]);
+3 -3
View File
@@ -67,7 +67,7 @@ static int SQLITE_TCLAPI test_value_overhead(
if( objc!=3 ){
Tcl_AppendResult(interp, "wrong # args: should be \"",
Tcl_GetStringFromObj(objv[0], 0), " <repeat-count> <do-calls>", 0);
Tcl_GetStringFromObj(objv[0], 0), " <repeat-count> <do-calls>", NULL);
return TCL_ERROR;
}
@@ -106,7 +106,7 @@ static u8 name_to_enc(Tcl_Interp *interp, Tcl_Obj *pObj){
}
}
if( !pEnc->enc ){
Tcl_AppendResult(interp, "No such encoding: ", z, 0);
Tcl_AppendResult(interp, "No such encoding: ", z, NULL);
}
if( pEnc->enc==SQLITE_UTF16 ){
return SQLITE_UTF16NATIVE;
@@ -135,7 +135,7 @@ static int SQLITE_TCLAPI test_translate(
if( objc!=4 && objc!=5 ){
Tcl_AppendResult(interp, "wrong # args: should be \"",
Tcl_GetStringFromObj(objv[0], 0),
" <string/blob> <from enc> <to enc>", 0
" <string/blob> <from enc> <to enc>", NULL
);
return TCL_ERROR;
}
+5 -5
View File
@@ -755,12 +755,12 @@ static int processDevSymArgs(
){
Tcl_AppendResult(interp,
"Bad option: \"", zOpt,
"\" - must be \"-characteristics\" or \"-sectorsize\"", 0
"\" - must be \"-characteristics\" or \"-sectorsize\"", NULL
);
return TCL_ERROR;
}
if( i==objc-1 ){
Tcl_AppendResult(interp, "Option requires an argument: \"", zOpt, "\"",0);
Tcl_AppendResult(interp, "Option requires an argument: \"", zOpt, "\"", NULL);
return TCL_ERROR;
}
@@ -934,7 +934,7 @@ static int SQLITE_TCLAPI crashParamsObjCmd(
zCrashFile = Tcl_GetStringFromObj(objv[objc-1], &nCrashFile);
if( nCrashFile>=sizeof(g.zCrashFile) ){
Tcl_AppendResult(interp, "Filename is too long: \"", zCrashFile, "\"", 0);
Tcl_AppendResult(interp, "Filename is too long: \"", zCrashFile, "\"", NULL);
goto error;
}
if( Tcl_GetIntFromObj(interp, objv[objc-2], &iDelay) ){
@@ -1044,7 +1044,7 @@ static int SQLITE_TCLAPI jtObjCmd(
if( objc==3 ){
if( strcmp(zParent, "-default") ){
Tcl_AppendResult(interp,
"bad option \"", zParent, "\": must be -default", 0
"bad option \"", zParent, "\": must be -default", NULL
);
return TCL_ERROR;
}
@@ -1055,7 +1055,7 @@ static int SQLITE_TCLAPI jtObjCmd(
zParent = 0;
}
if( jt_register(zParent, objc==3) ){
Tcl_AppendResult(interp, "Error in jt_register", 0);
Tcl_AppendResult(interp, "Error in jt_register", NULL);
return TCL_ERROR;
}
+3 -3
View File
@@ -56,7 +56,7 @@ static int SQLITE_TCLAPI c_collation_test(
error_out:
Tcl_ResetResult(interp);
Tcl_AppendResult(interp, "Error testing function: ", zErrFunction, 0);
Tcl_AppendResult(interp, "Error testing function: ", zErrFunction, NULL);
return TCL_ERROR;
}
@@ -96,7 +96,7 @@ static int SQLITE_TCLAPI c_realloc_test(
error_out:
Tcl_ResetResult(interp);
Tcl_AppendResult(interp, "Error testing function: ", zErrFunction, 0);
Tcl_AppendResult(interp, "Error testing function: ", zErrFunction, NULL);
return TCL_ERROR;
}
@@ -174,7 +174,7 @@ static int SQLITE_TCLAPI c_misuse_test(
error_out:
Tcl_ResetResult(interp);
Tcl_AppendResult(interp, "Error testing function: ", zErrFunction, 0);
Tcl_AppendResult(interp, "Error testing function: ", zErrFunction, NULL);
return TCL_ERROR;
}
+1 -1
View File
@@ -135,7 +135,7 @@ static int SQLITE_TCLAPI backupTestInit(
pBackup = sqlite3_backup_init(pDestDb, zDestName, pSrcDb, zSrcName);
if( !pBackup ){
Tcl_AppendResult(interp, "sqlite3_backup_init() failed", 0);
Tcl_AppendResult(interp, "sqlite3_backup_init() failed", NULL);
return TCL_ERROR;
}
+1 -1
View File
@@ -237,7 +237,7 @@ static int SQLITE_TCLAPI test_blob_read(
if( nByte>0 ){
zBuf = (unsigned char *)Tcl_AttemptAlloc(nByte);
if( zBuf==0 ){
Tcl_AppendResult(interp, "out of memory in " __FILE__, 0);
Tcl_AppendResult(interp, "out of memory in " __FILE__, NULL);
return TCL_ERROR;
}
}
+2 -2
View File
@@ -63,7 +63,7 @@ static int sqlite3DeleteUnlinkIfExists(
int *pbExists
){
int rc = SQLITE_ERROR;
#if SQLITE_OS_WIN
#ifdef _WIN32
if( pVfs ){
if( pbExists ) *pbExists = 1;
rc = pVfs->xDelete(pVfs, zFile, 0);
@@ -115,7 +115,7 @@ SQLITE_API int sqlite3_delete_database(
{ "%s-wal%03d", SQLITE_MULTIPLEX_WAL_8_3_OFFSET, 1 },
};
#ifdef SQLITE_OS_WIN
#ifdef _WIN32
sqlite3_vfs *pVfs = sqlite3_vfs_find("win32");
#else
sqlite3_vfs *pVfs = 0;
+5 -8
View File
@@ -69,18 +69,15 @@
#include <sys/stat.h>
#include <fcntl.h>
#if SQLITE_OS_UNIX || defined(__MINGW_H)
#if !defined(_WIN32) || defined(__MSVCRT__)
# include <unistd.h>
# include <dirent.h>
# ifndef DIRENT
# define DIRENT dirent
# endif
#endif
#if SQLITE_OS_WIN
#else
# include <io.h>
# if !defined(__MINGW_H)
# include "test_windirent.h"
# endif
# include "test_windirent.h"
# ifndef S_ISREG
# define S_ISREG(mode) (((mode) & S_IFMT) == S_IFREG)
# endif
@@ -485,7 +482,7 @@ static int fstreeFilter(
int nDir;
char aWild[2] = { '\0', '\0' };
#if SQLITE_OS_WIN
#ifdef _WIN32
const char *zDrive = windirent_getenv("fstreeDrive");
if( zDrive==0 ){
zDrive = windirent_getenv("SystemDrive");
@@ -538,7 +535,7 @@ static int fstreeFilter(
sqlite3_bind_text(pCsr->pStmt, 2, zRoot, nRoot, SQLITE_TRANSIENT);
sqlite3_bind_text(pCsr->pStmt, 3, zPrefix, nPrefix, SQLITE_TRANSIENT);
#if SQLITE_OS_WIN
#ifdef _WIN32
sqlite3_free(zPrefix);
sqlite3_free(zRoot);
#endif
+5 -5
View File
@@ -122,7 +122,7 @@ static int SQLITE_TCLAPI hexio_read(
in = fopen(zFile, "r");
}
if( in==0 ){
Tcl_AppendResult(interp, "cannot open input file ", zFile, 0);
Tcl_AppendResult(interp, "cannot open input file ", zFile, NULL);
return TCL_ERROR;
}
fseek(in, offset, SEEK_SET);
@@ -132,7 +132,7 @@ static int SQLITE_TCLAPI hexio_read(
got = 0;
}
sqlite3TestBinToHex(zBuf, got);
Tcl_AppendResult(interp, zBuf, 0);
Tcl_AppendResult(interp, zBuf, NULL);
sqlite3_free(zBuf);
return TCL_OK;
}
@@ -175,7 +175,7 @@ static int SQLITE_TCLAPI hexio_write(
out = fopen(zFile, "r+");
}
if( out==0 ){
Tcl_AppendResult(interp, "cannot open output file ", zFile, 0);
Tcl_AppendResult(interp, "cannot open output file ", zFile, NULL);
return TCL_ERROR;
}
fseek(out, offset, SEEK_SET);
@@ -324,12 +324,12 @@ static int SQLITE_TCLAPI utf8_to_utf8(
z[n] = 0;
nOut = sqlite3Utf8To8(z);
sqlite3TestBinToHex(z,nOut);
Tcl_AppendResult(interp, (char*)z, 0);
Tcl_AppendResult(interp, (char*)z, NULL);
sqlite3_free(z);
return TCL_OK;
#else
Tcl_AppendResult(interp,
"[utf8_to_utf8] unavailable - SQLITE_DEBUG not defined", 0
"[utf8_to_utf8] unavailable - SQLITE_DEBUG not defined", NULL
);
return TCL_ERROR;
#endif
+1 -1
View File
@@ -201,7 +201,7 @@ static int SQLITE_TCLAPI init_wrapper_install(
}else if( strcmp(z, "pcache")==0 ){
wrapped.pcache_fail = 1;
}else{
Tcl_AppendResult(interp, "Unknown argument: \"", z, "\"");
Tcl_AppendResult(interp, "Unknown argument: \"", z, "\"", NULL);
return TCL_ERROR;
}
}
+1 -1
View File
@@ -646,7 +646,7 @@ static int SQLITE_TCLAPI test_memdebug_fail(
}
if( zErr ){
Tcl_AppendResult(interp, zErr, zOption, 0);
Tcl_AppendResult(interp, zErr, zOption, NULL);
return TCL_ERROR;
}
}
+2 -2
View File
@@ -1315,8 +1315,8 @@ static int SQLITE_TCLAPI test_multiplex_control(
}
if( 0==Tcl_GetCommandInfo(interp, Tcl_GetString(objv[1]), &cmdInfo) ){
Tcl_AppendResult(interp, "expected database handle, got \"", 0);
Tcl_AppendResult(interp, Tcl_GetString(objv[1]), "\"", 0);
Tcl_AppendResult(interp, "expected database handle, got \"", NULL);
Tcl_AppendResult(interp, Tcl_GetString(objv[1]), "\"", NULL);
return TCL_ERROR;
}else{
db = *(sqlite3 **)cmdInfo.objClientData;
+2 -2
View File
@@ -225,8 +225,8 @@ static int SQLITE_TCLAPI test_install_mutex_counters(
assert(isInstall==0 || isInstall==1);
assert(g.isInstalled==0 || g.isInstalled==1);
if( isInstall==g.isInstalled ){
Tcl_AppendResult(interp, "mutex counters are ", 0);
Tcl_AppendResult(interp, isInstall?"already installed":"not installed", 0);
Tcl_AppendResult(interp, "mutex counters are ", NULL);
Tcl_AppendResult(interp, isInstall?"already installed":"not installed", NULL);
return TCL_ERROR;
}
+13 -14
View File
@@ -71,9 +71,8 @@
#include "sqlite3.h"
#include "os_setup.h"
#if SQLITE_OS_WIN
# include "os_win.h"
#ifdef _WIN32
#include <windows.h>
#endif
#include <string.h>
@@ -219,14 +218,7 @@ static sqlite3_io_methods vfslog_io_methods = {
vfslogShmUnmap /* xShmUnmap */
};
#if SQLITE_OS_UNIX && !defined(NO_GETTOD)
#include <sys/time.h>
static sqlite3_uint64 vfslog_time(){
struct timeval sTime;
gettimeofday(&sTime, 0);
return sTime.tv_usec + (sqlite3_uint64)sTime.tv_sec * 1000000;
}
#elif SQLITE_OS_WIN
#ifdef _WIN32
#include <time.h>
static sqlite3_uint64 vfslog_time(){
FILETIME ft;
@@ -241,6 +233,13 @@ static sqlite3_uint64 vfslog_time(){
/* ft is 100-nanosecond intervals, we want microseconds */
return u64time /(sqlite3_uint64)10;
}
#elif !defined(NO_GETTOD)
#include <sys/time.h>
static sqlite3_uint64 vfslog_time(){
struct timeval sTime;
gettimeofday(&sTime, 0);
return sTime.tv_usec + (sqlite3_uint64)sTime.tv_sec * 1000000;
}
#else
static sqlite3_uint64 vfslog_time(){
return 0;
@@ -1146,7 +1145,7 @@ static int SQLITE_TCLAPI test_vfslog(
zMsg = Tcl_GetString(objv[3]);
rc = sqlite3_vfslog_annotate(zVfs, zMsg);
if( rc!=SQLITE_OK ){
Tcl_AppendResult(interp, "failed", 0);
Tcl_AppendResult(interp, "failed", (char*)0);
return TCL_ERROR;
}
break;
@@ -1160,7 +1159,7 @@ static int SQLITE_TCLAPI test_vfslog(
zVfs = Tcl_GetString(objv[2]);
rc = sqlite3_vfslog_finalize(zVfs);
if( rc!=SQLITE_OK ){
Tcl_AppendResult(interp, "failed", 0);
Tcl_AppendResult(interp, "failed", (char*)0);
return TCL_ERROR;
}
break;
@@ -1180,7 +1179,7 @@ static int SQLITE_TCLAPI test_vfslog(
if( *zParent=='\0' ) zParent = 0;
rc = sqlite3_vfslog_new(zVfs, zParent, zLog);
if( rc!=SQLITE_OK ){
Tcl_AppendResult(interp, "failed", 0);
Tcl_AppendResult(interp, "failed", (char*)0);
return TCL_ERROR;
}
break;
+24 -30
View File
@@ -44,14 +44,12 @@
#define sqlite3_mutex_notheld(X) ((void)(X),1)
#endif /* SQLITE_THREADSAFE==0 */
#include "os_setup.h"
#if SQLITE_OS_UNIX
# include <unistd.h>
#endif
#if SQLITE_OS_WIN
# include "os_win.h"
#ifdef _WIN32
# include <windows.h>
# include <io.h>
#else
# include <unistd.h>
#endif
@@ -130,7 +128,7 @@ struct quota_FILE {
FILE *f; /* Open stdio file pointer */
sqlite3_int64 iOfst; /* Current offset into the file */
quotaFile *pFile; /* The file record in the quota system */
#if SQLITE_OS_WIN
#ifdef _WIN32
char *zMbcsName; /* Full MBCS pathname of the file */
#endif
};
@@ -375,7 +373,7 @@ static quotaFile *quotaFindFile(
** used to store the returned pointer when done.
*/
static char *quota_utf8_to_mbcs(const char *zUtf8){
#if SQLITE_OS_WIN
#ifdef _WIN32
size_t n; /* Bytes in zUtf8 */
int nWide; /* number of UTF-16 characters */
int nMbcs; /* Bytes of MBCS */
@@ -410,7 +408,7 @@ static char *quota_utf8_to_mbcs(const char *zUtf8){
** Deallocate any memory allocated by quota_utf8_to_mbcs().
*/
static void quota_mbcs_free(char *zOld){
#if SQLITE_OS_WIN
#ifdef _WIN32
sqlite3_free(zOld);
#else
/* No-op on unix */
@@ -970,7 +968,7 @@ quota_FILE *sqlite3_quota_fopen(const char *zFilename, const char *zMode){
}
quotaLeave();
sqlite3_free(zFull);
#if SQLITE_OS_WIN
#ifdef _WIN32
p->zMbcsName = zFullTranslated;
#endif
return p;
@@ -1073,7 +1071,7 @@ int sqlite3_quota_fclose(quota_FILE *p){
}
quotaLeave();
}
#if SQLITE_OS_WIN
#ifdef _WIN32
quota_mbcs_free(p->zMbcsName);
#endif
sqlite3_free(p);
@@ -1087,11 +1085,10 @@ int sqlite3_quota_fflush(quota_FILE *p, int doFsync){
int rc;
rc = fflush(p->f);
if( rc==0 && doFsync ){
#if SQLITE_OS_UNIX
rc = fsync(fileno(p->f));
#endif
#if SQLITE_OS_WIN
#ifdef _WIN32
rc = _commit(_fileno(p->f));
#else
rc = fsync(fileno(p->f));
#endif
}
return rc!=0;
@@ -1143,17 +1140,16 @@ int sqlite3_quota_ftruncate(quota_FILE *p, sqlite3_int64 szNew){
pGroup->iSize += szNew - pFile->iSize;
quotaLeave();
}
#if SQLITE_OS_UNIX
rc = ftruncate(fileno(p->f), szNew);
#endif
#if SQLITE_OS_WIN
# if defined(__MINGW32__) && defined(SQLITE_TEST)
#ifdef _WIN32
# if defined(__MSVCRT__) && defined(SQLITE_TEST)
/* _chsize_s() is missing from MingW (as of 2012-11-06). Use
** _chsize() as a work-around for testing purposes. */
rc = _chsize(_fileno(p->f), (long)szNew);
# else
rc = _chsize_s(_fileno(p->f), szNew);
# endif
#else
rc = ftruncate(fileno(p->f), szNew);
#endif
if( pFile && rc==0 ){
quotaGroup *pGroup = pFile->pGroup;
@@ -1172,13 +1168,12 @@ int sqlite3_quota_ftruncate(quota_FILE *p, sqlite3_int64 szNew){
*/
int sqlite3_quota_file_mtime(quota_FILE *p, time_t *pTime){
int rc;
#if SQLITE_OS_UNIX
struct stat buf;
rc = fstat(fileno(p->f), &buf);
#endif
#if SQLITE_OS_WIN
#ifdef _WIN32
struct _stati64 buf;
rc = _stati64(p->zMbcsName, &buf);
#else
struct stat buf;
rc = fstat(fileno(p->f), &buf);
#endif
if( rc==0 ) *pTime = buf.st_mtime;
return rc;
@@ -1190,13 +1185,12 @@ int sqlite3_quota_file_mtime(quota_FILE *p, time_t *pTime){
*/
sqlite3_int64 sqlite3_quota_file_truesize(quota_FILE *p){
int rc;
#if SQLITE_OS_UNIX
struct stat buf;
rc = fstat(fileno(p->f), &buf);
#endif
#if SQLITE_OS_WIN
#ifdef _WIN32
struct _stati64 buf;
rc = _stati64(p->zMbcsName, &buf);
#else
struct stat buf;
rc = fstat(fileno(p->f), &buf);
#endif
return rc==0 ? buf.st_size : -1;
}
+1 -1
View File
@@ -84,7 +84,7 @@
#include <sys/types.h>
#include <unistd.h>
static int getProcessId(void){
#if SQLITE_OS_WIN
#ifdef _WIN32
return (int)_getpid();
#else
return (int)getpid();
+1 -1
View File
@@ -338,7 +338,7 @@ static int SQLITE_TCLAPI superlock_cmd(
if( rc!=SQLITE_OK ){
extern const char *sqlite3ErrStr(int);
Tcl_ResetResult(interp);
Tcl_AppendResult(interp, sqlite3ErrStr(rc), 0);
Tcl_AppendResult(interp, sqlite3ErrStr(rc), NULL);
return TCL_ERROR;
}
+2 -2
View File
@@ -686,7 +686,7 @@ static int SQLITE_TCLAPI test_syscall_pagesize(
}
}else{
if( pgsz<512 || (pgsz & (pgsz-1)) ){
Tcl_AppendResult(interp, "pgsz out of range", 0);
Tcl_AppendResult(interp, "pgsz out of range", NULL);
return TCL_ERROR;
}
gSyscall.orig_getpagesize = pVfs->xGetSystemCall(pVfs, "getpagesize");
@@ -729,7 +729,7 @@ static int SQLITE_TCLAPI test_syscall(
return TCL_ERROR;
}
if( pVfs->iVersion<3 || pVfs->xSetSystemCall==0 ){
Tcl_AppendResult(interp, "VFS does not support xSetSystemCall", 0);
Tcl_AppendResult(interp, "VFS does not support xSetSystemCall", NULL);
rc = TCL_ERROR;
}else{
rc = Tcl_GetIndexFromObjStruct(interp,
+5 -5
View File
@@ -201,7 +201,7 @@ static int SQLITE_TCLAPI sqlthread_spawn(
rc = Tcl_CreateThread(&x, tclScriptThread, (void *)pNew, nStack, flags);
if( rc!=TCL_OK ){
Tcl_AppendResult(interp, "Error in Tcl_CreateThread()", 0);
Tcl_AppendResult(interp, "Error in Tcl_CreateThread()", NULL);
ckfree((char *)pNew);
return TCL_ERROR;
}
@@ -235,7 +235,7 @@ static int SQLITE_TCLAPI sqlthread_parent(
UNUSED_PARAMETER(objc);
if( p==0 ){
Tcl_AppendResult(interp, "no parent thread", 0);
Tcl_AppendResult(interp, "no parent thread", NULL);
return TCL_ERROR;
}
@@ -287,7 +287,7 @@ static int SQLITE_TCLAPI sqlthread_open(
sqlite3_busy_handler(db, xBusy, 0);
if( sqlite3TestMakePointerStr(interp, zBuf, db) ) return TCL_ERROR;
Tcl_AppendResult(interp, zBuf, 0);
Tcl_AppendResult(interp, zBuf, NULL);
return TCL_OK;
}
@@ -614,13 +614,13 @@ static int SQLITE_TCLAPI blocking_prepare_v2_proc(
if( rc!=SQLITE_OK ){
assert( pStmt==0 );
sqlite3_snprintf(sizeof(zBuf), zBuf, "%s ", (char *)sqlite3ErrName(rc));
Tcl_AppendResult(interp, zBuf, sqlite3_errmsg(db), 0);
Tcl_AppendResult(interp, zBuf, sqlite3_errmsg(db), NULL);
return TCL_ERROR;
}
if( pStmt ){
if( sqlite3TestMakePointerStr(interp, zBuf, pStmt) ) return TCL_ERROR;
Tcl_AppendResult(interp, zBuf, 0);
Tcl_AppendResult(interp, zBuf, NULL);
}
return TCL_OK;
}
+5 -5
View File
@@ -1138,7 +1138,7 @@ static int SQLITE_TCLAPI testvfs_obj_cmd(
);
if( rc!=SQLITE_OK ){
Tcl_AppendResult(interp, "failed to get full path: ",
Tcl_GetString(objv[2]), 0);
Tcl_GetString(objv[2]), NULL);
ckfree(zName);
return TCL_ERROR;
}
@@ -1147,7 +1147,7 @@ static int SQLITE_TCLAPI testvfs_obj_cmd(
}
ckfree(zName);
if( !pBuffer ){
Tcl_AppendResult(interp, "no such file: ", Tcl_GetString(objv[2]), 0);
Tcl_AppendResult(interp, "no such file: ", Tcl_GetString(objv[2]), NULL);
return TCL_ERROR;
}
if( objc==4 ){
@@ -1225,7 +1225,7 @@ static int SQLITE_TCLAPI testvfs_obj_cmd(
}
}
if( iMethod==ArraySize(vfsmethod) ){
Tcl_AppendResult(interp, "unknown method: ", zElem, 0);
Tcl_AppendResult(interp, "unknown method: ", zElem, NULL);
return TCL_ERROR;
}
}
@@ -1353,7 +1353,7 @@ static int SQLITE_TCLAPI testvfs_obj_cmd(
return TCL_ERROR;
}
if( aFlag[idx].iValue<0 && nFlags>1 ){
Tcl_AppendResult(interp, "bad flags: ", Tcl_GetString(objv[2]), 0);
Tcl_AppendResult(interp, "bad flags: ", Tcl_GetString(objv[2]), NULL);
return TCL_ERROR;
}
iNew |= aFlag[idx].iValue;
@@ -1673,7 +1673,7 @@ static int SQLITE_TCLAPI test_vfs_set_readmark(
return TCL_ERROR;
}
if( pShm==0 ){
Tcl_AppendResult(interp, "*-shm is not yet mapped", 0);
Tcl_AppendResult(interp, "*-shm is not yet mapped", NULL);
return TCL_ERROR;
}
aShm = (u32*)pShm;
+2 -4
View File
@@ -871,10 +871,8 @@ static void walChecksumBytes(
s1 = s2 = 0;
}
assert( nByte>=8 );
assert( (nByte&0x00000007)==0 );
assert( nByte<=65536 );
assert( nByte%4==0 );
/* nByte is a multiple of 8 between 8 and 65536 */
assert( nByte>=8 && (nByte&7)==0 && nByte<=65536 );
if( !nativeCksum ){
do {
+1 -1
View File
@@ -42,7 +42,7 @@ run_test_suite pcache100
run_test_suite prepare
run_test_suite mmap
if {$::tcl_platform(platform)=="unix"} {
if {$::tcl_platform(platform) eq "unix"} {
ifcapable !default_autovacuum {
run_test_suite autovacuum_crash
}
+1 -1
View File
@@ -19,7 +19,7 @@ ifcapable !vtab {
return
}
if {$tcl_platform(platform)=="windows"} {
if {$tcl_platform(platform) eq "windows"} {
set PROG "sqlite3_analyzer.exe"
} else {
set PROG "./sqlite3_analyzer"
+1 -1
View File
@@ -759,7 +759,7 @@ do_test attach-6.1 {
ATTACH DATABASE 'no-such-file' AS nosuch;
}
} {0 {}}
if {$tcl_platform(platform)=="unix"} {
if {$tcl_platform(platform) eq "unix"} {
do_test attach-6.2 {
sqlite3 dbx cannot-read
dbx eval {CREATE TABLE t1(a,b,c)}
+1 -1
View File
@@ -903,7 +903,7 @@ for {set i 2} {$i<=$limit} {incr i} {
INSERT INTO t3 SELECT randstr(10,400) FROM t3 WHERE random()%10==0;
}
} {}
if {$tcl_platform(platform)=="unix"} {
if {$tcl_platform(platform) eq "unix"} {
do_test avtrans-9.$i.4-$cnt {
expr {$sqlite_sync_count>0}
} 1
+1 -1
View File
@@ -141,7 +141,7 @@ do_test backup2-9 {
# Try to restore from an unreadable file.
#
if {$tcl_platform(platform)=="windows"} {
if {$::tcl_platform(os) eq "Windows NT"} {
set msg {cannot open source database: unable to open database file}
} elseif {[string match *BSD $tcl_platform(os)]} {
set msg {}
+1 -1
View File
@@ -9,7 +9,7 @@ proc bc_find_binaries {zCaption} {
set binaries [list]
set self [info nameofexec]
set pattern "$self?*"
if {$::tcl_platform(platform)=="windows"} {
if {$::tcl_platform(platform) eq "windows"} {
set pattern [string map {\.exe {}} $pattern]
}
foreach file [glob -nocomplain $pattern] {
+41
View File
@@ -183,6 +183,47 @@ do_execsql_test 4.3 {
do_execsql_test 4.4 {
SELECT * FROM t0 LEFT JOIN t1 LEFT JOIN t2 ON (b NOTNULL)==(c IN ()) WHERE c;
} {xyz {} 7.0}
reset_db
do_execsql_test 5.0 {
CREATE TABLE t1 (c1);
INSERT INTO t1 VALUES (101);
CREATE TABLE t2 ( x );
INSERT INTO t2 VALUES(404);
}
do_execsql_test 5.1 {
SELECT 'val' in (
select 'val' from ( select 'valueB' from t1 order by 1 )
union all
select 'val'
);
} {1}
do_execsql_test 5.2 {
select * from t2
where 'val' in (
select 'val' from ( select 'valueB' from t1 order by 1 )
union all
select 'val'
);
} {404}
do_execsql_test 5.3 {
SELECT subq_1.c_0 as c_0
FROM ( SELECT 0 as c_0) as subq_1
WHERE (subq_1.c_0) IN (
SELECT subq_2.c_0 as c_0
FROM (
SELECT 0 as c_0
FROM t1 as ref_1
WHERE (ref_1.c1) = (2)
ORDER BY c_0 desc
) as subq_2
UNION ALL
SELECT 0 as c_0
);
} {0}
finish_test
+1 -1
View File
@@ -14,7 +14,7 @@ set testdir [file dirname $argv0]
source $testdir/tester.tcl
set testprefix chunksize
if {$::tcl_platform(platform)!="unix"} {
if {$::tcl_platform(platform) ne "unix"} {
finish_test
return
}
+1 -1
View File
@@ -356,7 +356,7 @@ ifcapable pragma {
# is not created on F2FS file-systems that support atomic
# write. So do not run these tests in that case either.
#
if {$::tcl_platform(platform)=="unix" && [atomic_batch_write test.db]==0 } {
if {$::tcl_platform(os) ne "Windows NT" && [atomic_batch_write test.db]==0 } {
for {set i 1} {$i < 10} {incr i} {
catch { db close }
forcedelete test.db test.db-journal
+2 -2
View File
@@ -60,7 +60,7 @@ do_test 1.5 {
} {0}
do_test 1.6 {
if {$::tcl_platform(platform)=="unix"} {
if {$::tcl_platform(os) ne "Windows NT"} {
file attributes ./file2.txt -permissions r--r--r--
} else {
file attributes ./file2.txt -readonly 1
@@ -70,7 +70,7 @@ do_test 1.6 {
}
} {nil}
do_test 1.7 {
if {$::tcl_platform(platform)=="unix"} {
if {$::tcl_platform(os) ne "Windows NT"} {
file attributes ./file2.txt -permissions rw-r--r--
} else {
file attributes ./file2.txt -readonly 0
+1 -1
View File
@@ -19,7 +19,7 @@ ifcapable !wal {
finish_test
return
}
if {$::tcl_platform(platform)!="unix"} {
if {$::tcl_platform(os) eq "Windows NT"} {
finish_test
return
}
+1 -1
View File
@@ -47,7 +47,7 @@ db close
forcedelete .test_control_lockproxy.db-conch test.proxy
forcedelete test.db test2.db
if {$tcl_platform(platform)=="windows"} {
if {$tcl_platform(platform) eq "windows"} {
do_test filectrl-2.1 {
sqlite3 db test2.db
set size [file size test2.db]
+70 -4
View File
@@ -391,6 +391,21 @@ static void renderDbSqlForCLI(
if( nSql>0 && zSql[nSql-1]!='\n' ) fprintf(out, "\n");
}
/*
** Find the tail (the last component) of a pathname.
*/
static const char *pathTail(const char *zPath){
const char *zTail = zPath;
while( zPath[0] ){
if( zPath[0]=='/' && zPath[1]!=0 ) zTail = &zPath[1];
#ifndef __unix__
if( zPath[0]=='\\' && zPath[1]!=0 ) zTail = &zPath[1];
#endif
zPath++;
}
return zTail;
}
/*
** Read the complete content of a file into memory. Add a 0x00 terminator
** and return a pointer to the result.
@@ -1847,6 +1862,7 @@ static void showHelp(void){
"Read databases and SQL scripts from SOURCE-DB and execute each script against\n"
"each database, checking for crashes and memory leaks.\n"
"Options:\n"
" --brief Output only a summary of results at the end\n"
" --cell-size-check Set the PRAGMA cell_size_check=ON\n"
" --dbid M..N Use only the databases where dbid between M and N\n"
" \"M..\" for M and afterwards. Just \"M\" for M only\n"
@@ -1873,6 +1889,7 @@ static void showHelp(void){
" --result-trace Show the results of each SQL command\n"
" --script Output CLI script instead of running tests\n"
" --skip N Skip the first N test cases\n"
" --slice M N Run only the M-th out of each group of N tests\n"
" --spinner Use a spinner to show progress\n"
" --sqlid M..N Use only SQL where sqlid between M..N\n"
" \"M..\" for M and afterwards. Just \"M\" for M only\n"
@@ -1887,6 +1904,7 @@ static void showHelp(void){
int main(int argc, char **argv){
sqlite3_int64 iBegin; /* Start time of this program */
int quietFlag = 0; /* True if --quiet or -q */
int briefFlag = 0; /* Output summary report at the end */
int verboseFlag = 0; /* True if --verbose or -v */
char *zInsSql = 0; /* SQL statement for --load-db or --load-sql */
int iFirstInsArg = 0; /* First argv[] for --load-db or --load-sql */
@@ -1934,6 +1952,8 @@ int main(int argc, char **argv){
int nV; /* How much to increase verbosity with -vvvv */
sqlite3_int64 tmStart; /* Start of each test */
int iEstTime = 0; /* LPF for the time-to-go */
int iSliceSz = 0; /* Divide the test space into this many pieces */
int iSliceIdx = 0; /* Only run the piece with this index */
sqlite3_config(SQLITE_CONFIG_URI,1);
registerOomSimulator();
@@ -1954,6 +1974,12 @@ int main(int argc, char **argv){
if( z[0]=='-' ){
z++;
if( z[0]=='-' ) z++;
if( strcmp(z,"brief")==0 ){
briefFlag = 1;
quietFlag = 1;
verboseFlag = 1;
eVerbosity = 0;
}else
if( strcmp(z,"cell-size-check")==0 ){
cellSzCkFlag = 1;
}else
@@ -2044,6 +2070,7 @@ int main(int argc, char **argv){
g.uRandom = atoi(argv[++i]);
}else
if( strcmp(z,"quiet")==0 || strcmp(z,"q")==0 ){
briefFlag = 0;
quietFlag = 1;
verboseFlag = 0;
eVerbosity = 0;
@@ -2062,12 +2089,19 @@ int main(int argc, char **argv){
if( i>=argc-1 ) fatalError("missing arguments on %s", argv[i]);
nSkip = atoi(argv[++i]);
}else
if( strcmp(z,"slice")==0 ){
if( i>=argc-2 ) fatalError("missing arguments on %s", argv[i]);
iSliceIdx = integerValue(argv[++i]);
iSliceSz = integerValue(argv[++i]);
/* --slice implices --brief */
briefFlag = 1;
quietFlag = 1;
verboseFlag = 1;
eVerbosity = 0;
}else
if( strcmp(z,"spinner")==0 ){
bSpinner = 1;
}else
if( strcmp(z,"timer")==0 ){
bTimer = 1;
}else
if( strcmp(z,"sqlid")==0 ){
const char *zDotDot;
if( i>=argc-1 ) fatalError("missing arguments on %s", argv[i]);
@@ -2093,10 +2127,14 @@ int main(int argc, char **argv){
fatalError("timeout is not available on non-unix systems");
#endif
}else
if( strcmp(z,"timer")==0 ){
bTimer = 1;
}else
if( strcmp(z,"vdbe-debug")==0 ){
bVdbeDebug = 1;
}else
if( strcmp(z,"verbose")==0 ){
briefFlag = 0;
quietFlag = 0;
verboseFlag++;
eVerbosity++;
@@ -2163,6 +2201,12 @@ int main(int argc, char **argv){
fatalError("cannot import into more than one database");
}
}
if( iSliceSz<=iSliceIdx
|| iSliceSz<=0
|| iSliceIdx<0
){
iSliceSz = iSliceIdx = 0;
}
/* Process each source database separately */
for(iSrcDb=0; iSrcDb<nSrcDb; iSrcDb++){
@@ -2452,6 +2496,10 @@ int main(int argc, char **argv){
for(pSql=g.pFirstSql; pSql; pSql=pSql->pNext){
tmStart = timeOfDay();
if( isDbSql(pSql->a, pSql->sz) ){
if( iSliceSz>0 && (nTest%iSliceSz)!=iSliceIdx ){
nTest++;
continue;
}
sqlite3_snprintf(sizeof(g.zTestName), g.zTestName, "sqlid=%d",pSql->id);
if( bScript ){
/* No progress output */
@@ -2510,6 +2558,10 @@ int main(int argc, char **argv){
for(pDb=g.pFirstDb; pDb; pDb=pDb->pNext){
int openFlags;
const char *zVfs = "inmem";
if( iSliceSz>0 && (nTest%iSliceSz)!=iSliceIdx ){
nTest++;
continue;
}
sqlite3_snprintf(sizeof(g.zTestName), g.zTestName, "sqlid=%d,dbid=%d",
pSql->id, pDb->id);
if( bScript ){
@@ -2616,7 +2668,20 @@ int main(int argc, char **argv){
}
}
}
if( bScript ){
if( briefFlag ){
sqlite3_int64 iElapse = timeOfDay() - iBegin;
if( iSliceSz>0 ){
printf("%s %s: slice %d/%d of %d tests, %d.%03d seconds\n",
pathTail(argv[0]), pathTail(g.zDbFile),
iSliceIdx, iSliceSz, nTest,
(int)(iElapse/1000), (int)(iElapse%1000));
}else{
printf("%s %s: 0 errors, %d tests, %d.%03d seconds\n",
pathTail(argv[0]), pathTail(g.zDbFile), nTest,
(int)(iElapse/1000), (int)(iElapse%1000));
}
iBegin = timeOfDay();
}else if( bScript ){
/* No progress output */
}else if( bSpinner ){
int nTotal = g.nDb*g.nSql;
@@ -2634,6 +2699,7 @@ int main(int argc, char **argv){
} /* End loop over all source databases */
if( !quietFlag && !bScript ){
sqlite3_int64 iElapse = timeOfDay() - iBegin;
if( g.nInvariant ){
BIN
View File
Binary file not shown.
+2 -2
View File
@@ -443,7 +443,7 @@ sqlite3_simulate_device -char safe_append
# on the journal file between steps (2) and (3) above.
#
set expected_sync_count 2
if {$::tcl_platform(platform)=="unix"} {
if {$::tcl_platform(os) ne "Windows NT"} {
ifcapable dirsync {
incr expected_sync_count
}
@@ -465,7 +465,7 @@ do_test io-4.2.1 {
execsql { INSERT INTO abc VALUES('c', 'd') }
file exists test.db-journal
} {1}
if {$::tcl_platform(platform)=="unix"} {
if {$::tcl_platform(platform) eq "unix"} {
do_test io-4.2.2 {
hexio_read test.db-journal 8 4
} {FFFFFFFF}
+2 -2
View File
@@ -172,7 +172,7 @@ ifcapable crashtest&&attach {
# These tests can't be run on windows because the windows version of
# SQLite holds a mandatory exclusive lock on journal files it has open.
#
if {$tcl_platform(platform)!="windows" && ![atomic_batch_write test.db]} {
if {$tcl_platform(platform) ne"windows" && ![atomic_batch_write test.db]} {
do_ioerr_test ioerr-7 -tclprep {
db close
sqlite3 db2 test2.db
@@ -211,7 +211,7 @@ do_ioerr_test ioerr-8 -ckrefcount true -tclprep {
# For test coverage: Cause an IO error whilst reading the master-journal
# name from a journal file.
if {$tcl_platform(platform)=="unix" && [atomic_batch_write test.db]==0} {
if {$tcl_platform(platform) eq "unix" && [atomic_batch_write test.db]==0} {
do_ioerr_test ioerr-9 -ckrefcount true -tclprep {
execsql {
CREATE TABLE t1(a,b,c);
+1 -1
View File
@@ -25,7 +25,7 @@ source $testdir/tester.tcl
# Or with atomic_batch_write systems, as journal files are
# not created.
#
if {$tcl_platform(platform)=="windows"
if {$tcl_platform(platform) eq "windows"
|| [atomic_batch_write test.db]
} {
finish_test
+1 -1
View File
@@ -20,7 +20,7 @@ source $testdir/malloc_common.tcl
# If a connection is required to create a journal file, it creates it with
# the same file-system permissions as the database file itself. Test this.
#
if {$::tcl_platform(platform) == "unix"
if {$::tcl_platform(os) ne "Windows NT"
&& [atomic_batch_write test.db]==0
} {
+6 -2
View File
@@ -66,9 +66,13 @@ if {$::tcl_platform(os) eq "Darwin"} {
set dlerror_nosymbol {dlsym.XXX, %2$s.: symbol not found}
}
if {$::tcl_platform(platform) eq "windows"} {
if {$::tcl_platform(os) eq "Windows NT"} {
set dlerror_nosuchfile {The specified module could not be found.*}
set dlerror_notadll {%%1 is not a valid Win32 application.*}
if {$::tcl_platform(platform) eq "unix"} {
set dlerror_notadll $dlerror_nosuchfile
} else {
set dlerror_notadll {%%1 is not a valid Win32 application.*}
}
set dlerror_nosymbol {The specified procedure could not be found.*}
}
+1 -1
View File
@@ -145,7 +145,7 @@ do_test lock-1.21 {
# connections, because UNIX supports reader/writer locks. Under windows,
# this is not possible.
#
if {$::tcl_platform(platform)=="unix"} {
if {$::tcl_platform(platform) eq "unix"} {
do_test lock-1.22 {
db eval {SELECT * FROM t1} qv {
set r [catch {db2 eval {SELECT a FROM t1}} msg]
+1 -1
View File
@@ -329,7 +329,7 @@ ifcapable crashtest&&attach {
}
}
if {$tcl_platform(platform)!="windows" && [atomic_batch_write test.db]==0} {
if {$tcl_platform(platform) ne "windows" && [atomic_batch_write test.db]==0} {
do_malloc_test 14 -tclprep {
catch {db close}
sqlite3 db2 test2.db
+3 -3
View File
@@ -100,7 +100,7 @@ proc do_fileopen_test {prefix sql} {
execsql { CREATE TABLE abc(a PRIMARY KEY, b, c); }
db close
if {$tcl_platform(platform)!="windows"} {
if {$tcl_platform(platform) ne "windows"} {
do_fileopen_test misc7-6.1 {
BEGIN;
INSERT INTO abc VALUES(1, 2, 3);
@@ -390,7 +390,7 @@ do_test misc7-16.X {
# These tests do not work on windows due to restrictions in the
# windows file system.
#
if {$tcl_platform(platform)!="windows"} {
if {$tcl_platform(platform) ne "windows"} {
# Some network filesystems (ex: AFP) do not support setting read-only
# permissions. Only run these tests if full unix permission setting
@@ -534,7 +534,7 @@ do_test misc7-22.4 {
catch { db close }
forcedelete test.db
if {$::tcl_platform(platform)=="unix"
if {$::tcl_platform(platform) eq "unix"
&& [atomic_batch_write test.db]==0
} {
reset_db
+2 -2
View File
@@ -21,10 +21,10 @@ set testdir [file dirname $argv0]
source $testdir/tester.tcl
set testprefix mmap2
if {$::tcl_platform(platform)!="unix" || [test_syscall defaultvfs] != "unix"} {
if {[llength [info commands test_syscall]]==0} {
finish_test
return
}
}
ifcapable !mmap {
finish_test
return
+4 -2
View File
@@ -61,7 +61,7 @@ do_test 1.14 { sqlite3_db_config db NO_CKPT_ON_CLOSE 1 } {1}
do_execsql_test 1.14 { PRAGMA main.journal_mode = delete } {delete}
do_test 1.15 { file exists test.db-wal } {0}
if {$::tcl_platform(platform)!="windows"} {
if {$::tcl_platform(platform) ne "windows"} {
#-------------------------------------------------------------------------
# Test an unusual scenario:
#
@@ -102,7 +102,9 @@ sqlite3_close_v2 $::db1
# Delete the database, wal and shm files.
#
forcedelete test.db test.db-wal test.db-shm
catch {forcedelete test.db}
catch {forcedelete test.db-wal}
catch {forcedelete test.db-shm}
# Open and populate a new database file at the same file-system location
# as the one just deleted. Contrive a partial checkpoint on it.
+4 -1
View File
@@ -16,7 +16,10 @@
set testdir [file dirname $argv0]
source $testdir/tester.tcl
if {$::tcl_platform(platform)!="unix"} { finish_test ; return }
if {[llength [info commands test_syscall]]==0} {
finish_test
return
}
set ::testprefix oserror
db close
+6 -6
View File
@@ -454,7 +454,7 @@ do_test pager1.4.2.1 {
tstvfs delete
} {}
if {$::tcl_platform(platform)!="windows"} {
if {$::tcl_platform(os) ne "Windows NT"} {
do_test pager1.4.2.2 {
faultsim_restore_and_reopen
execsql {
@@ -567,7 +567,7 @@ foreach {tn1 tcl} {
# make sure SQLite doesn't get confused by this.
#
set nPadding [expr 511 - $::mj_filename_length]
if {$tcl_platform(platform)=="windows"} {
if {$tcl_platform(platform) eq "windows"} {
# TBD need to figure out how to do this correctly for Windows!!!
set nPadding [expr 255 - $::mj_filename_length]
}
@@ -1714,7 +1714,7 @@ do_execsql_test pager1-13.1.1 {
UPDATE t1 SET b = a_string(400);
} {persist}
if {$::tcl_platform(platform)!="windows"} {
if {$::tcl_platform(os) ne "Windows NT"} {
# Run transactions of increasing sizes. Eventually, one (or more than one)
# of these will write just enough content that one of the old headers created
# by the transaction in the block above lies immediately after the content
@@ -1739,7 +1739,7 @@ for {set nUp 1} {$nUp<64} {incr nUp} {
}
}
if {$::tcl_platform(platform)!="windows"} {
if {$::tcl_platform(os) ne "Windows NT"} {
# Same test as above. But this time with an index on the table.
#
do_execsql_test pager1-13.2.1 {
@@ -2538,7 +2538,7 @@ do_test pager1-30.1 {
# file can still be rolled back. This is required for backward compatibility -
# versions of SQLite prior to 3.5.8 always set this field to zero.
#
if {$tcl_platform(platform)=="unix"} {
if {$::tcl_platform(os) ne "Windows NT"} {
do_test pager1-31.1 {
faultsim_delete_and_reopen
execsql {
@@ -2612,7 +2612,7 @@ forcedelete test.db
# and the call to unlink() returns an ENOENT error, the COMMIT does not
# succeed.
#
if {$::tcl_platform(platform)=="unix"} {
if {$::tcl_platform(os) ne "Windows NT"} {
do_test pager1-33.1 {
sqlite3 db test.db
execsql {
+1 -1
View File
@@ -13,7 +13,7 @@
# is unlinked or renamed out from under SQLite.
#
if {$tcl_platform(platform)!="unix"} return
if {$tcl_platform(os) eq "Windows NT"} return
set testdir [file dirname $argv0]
source $testdir/tester.tcl
+1 -1
View File
@@ -20,7 +20,7 @@ if {[permutation] == "inmemory_journal"} {
return
}
if {$::tcl_platform(platform)=="windows"} {
if {$::tcl_platform(os) eq "Windows NT"} {
finish_test
return
}
+1 -1
View File
@@ -104,7 +104,7 @@ foreach f [glob -nocomplain $testdir/../ext/session/*.test] {
}
unset f
if {$::tcl_platform(platform)!="unix"} {
if {$::tcl_platform(platform) ne "unix"} {
set alltests [test_set $alltests -exclude crash.test crash2.test]
}
set alltests [test_set $alltests -exclude {
+1 -1
View File
@@ -1823,7 +1823,7 @@ do_test pragma-19.5 {
file tail [lindex [execsql {PRAGMA filename}] 0]
} {test.db}
if {$tcl_platform(platform)=="windows"} {
if {$tcl_platform(platform) eq "windows"} {
# Test data_store_directory pragma
#
db close
+3 -3
View File
@@ -216,7 +216,7 @@ do_test quota-3.2.9 {
set ::quota [list]
proc quota_callback {file limitvar size} {
upvar $limitvar limit
if {$::tcl_platform(platform)=="windows"} {
if {$::tcl_platform(platform) eq "windows"} {
set file [ lindex [string map {\\ \/} $file] 0 ]
}
lappend ::quota $file $size
@@ -351,7 +351,7 @@ do_test quota-4.3.1 {
} {}
unset -nocomplain quotagroup
if {$tcl_platform(platform)=="windows"} {
if {$tcl_platform(platform) eq "windows"} {
set quotagroup *\\quota-test-A?.db
} else {
set quotagroup */quota-test-A?.db
@@ -402,7 +402,7 @@ do_test quota-4.4.7 {
} [expr {[file size quota-test-A1.db]+[file size quota-test-A2.db]}]
unset -nocomplain quotagroup
if {$tcl_platform(platform)=="windows"} {
if {$tcl_platform(platform) eq "windows"} {
set quotagroup *\\quota-test-B*
} else {
set quotagroup */quota-test-B*
+1 -1
View File
@@ -15,7 +15,7 @@
set testdir [file dirname $argv0]
source $testdir/tester.tcl
if {$tcl_platform(platform)=="windows"} {
if {$tcl_platform(platform) eq "windows"} {
finish_test
return
}
+2 -2
View File
@@ -161,7 +161,7 @@ do_test shared-$av.1.8 {
do_test shared-$av.2.1 {
# Open connection db3 to the database.
if {$::tcl_platform(platform)=="unix"} {
if {$::tcl_platform(platform) eq "unix"} {
sqlite3 db3 "file:test.db?cache=private" -uri 1
} else {
sqlite3 db3 TEST.DB
@@ -797,7 +797,7 @@ do_test shared-$av.10.2 {
do_test shared-$av.10.3 {
# An external connection should be able to read the database, but not
# prepare a write operation.
if {$::tcl_platform(platform)=="unix"} {
if {$::tcl_platform(platform) eq "unix"} {
sqlite3 db3 "file:test.db?cache=private" -uri 1
} else {
sqlite3 db3 TEST.DB
+1 -1
View File
@@ -70,7 +70,7 @@ do_test shared3-2.5 {
# test case shared3-2.3 above). The goal of the following tests is to
# ensure that the cache-size really is 10 pages.
#
#if {$::tcl_platform(platform)=="unix"} {
#if {$::tcl_platform(platform) eq "unix"} {
# set alternative_name ./test.db
#} else {
# set alternative_name TEST.DB
+1 -1
View File
@@ -139,7 +139,7 @@ do_test shared6-1.X {
# that connect to the same file using different VFS implementations do
# not share a cache.
#
if {$::tcl_platform(platform) eq "unix"} {
if {$::tcl_platform(os) ne "Windows NT"} {
do_test shared6-2.1 {
sqlite3 db1 test.db -vfs unix
sqlite3 db2 test.db -vfs unix
+10 -8
View File
@@ -515,6 +515,7 @@ do_test shell1-3.15.3 {
} {1 {ERROR: extra parameter: "BAD". Usage:
.output ?FILE? Send output to FILE or stdout if FILE is omitted
If FILE begins with '|' then open it as a pipe.
If FILE is 'off' then output is disabled.
Options:
--bom Prefix output with a UTF8 byte-order mark
-e Send output to the system text editor
@@ -533,6 +534,7 @@ do_test shell1-3.16.2 {
} {1 {ERROR: extra parameter: "BAD". Usage:
.output ?FILE? Send output to FILE or stdout if FILE is omitted
If FILE begins with '|' then open it as a pipe.
If FILE is 'off' then output is disabled.
Options:
--bom Prefix output with a UTF8 byte-order mark
-e Send output to the system text editor
@@ -1064,20 +1066,20 @@ do_test shell1-5.0 {
# return character (and on Windows, the end-of-file character)
# cannot be used here.
#
if {$i==0x0D || ($tcl_platform(platform)=="windows" && $i==0x1A)} {
if {$i==0x0D || ($tcl_platform(platform) eq "windows" && $i==0x1A)} {
continue
}
# Tcl 8.7 maps 0x80 through 0x9f into valid UTF8. So skip those tests.
if {$i>=0x80} {
if {$i<=0x9F || $tcl_version>=9.0} continue
if {$tcl_platform(platform)=="windows"} continue
if {$tcl_platform(platform) eq "windows"} continue
}
if {$i>=0xE0 && $tcl_platform(os)=="OpenBSD"} continue
if {$i>=0xE0 && $i<=0xEF && $tcl_platform(os)=="Linux"} continue
if {$i>=0xE0 && $tcl_platform(os) eq "OpenBSD"} continue
if {$i>=0xE0 && $i<=0xEF && $tcl_platform(os) eq "Linux"} continue
set hex [format %02X $i]
set char [subst \\x$hex]; set oldChar $char
set escapes [list]
if {$tcl_platform(platform)=="windows"} {
if {$tcl_platform(platform) eq "windows"} {
#
# NOTE: On Windows, we need to escape all the whitespace characters,
# the alarm (\a) character, and those with special meaning to
@@ -1228,7 +1230,7 @@ do_test shell1-8.1 {
FROM pow2, c WHERE pow2.x=ieee754_exponent(c.n);
}
} {0 47.49000000000000198951966012828052043914794921875}
do_test shell1-8.2 {
do_test_with_ansi_output shell1-8.2 {
catchcmd :memory: {
.mode box
SELECT ieee754(47.49) AS x;
@@ -1238,7 +1240,7 @@ SELECT ieee754(47.49) AS x;
├───────────────────────────────┤
│ ieee754(6683623321994527,-47) │
└───────────────────────────────┘}}
do_test shell1-8.3 {
do_test_with_ansi_output shell1-8.3 {
catchcmd ":memory: --box" {
select ieee754(6683623321994527,-47) as x;
}
@@ -1254,7 +1256,7 @@ do_test shell1-8.4 {
+------------------+-----+
| 6683623321994527 | -47 |
+------------------+-----+}}
do_test shell1-8.5 {
do_test_with_ansi_output shell1-8.5 {
catchcmd ":memory: --box" {
create table t(a text, b int);
insert into t values ('too long for one line', 1), ('shorter', NULL);
+6 -6
View File
@@ -224,24 +224,24 @@ do_test shell2-1.4.10 {
set res [catchcmd :memory: [string trim {
SELECT * FROM generate_series(9223372036854775807,9223372036854775807,1);
SELECT * FROM generate_series(9223372036854775807,9223372036854775807,-1);
SELECT avg(rowid),min(value),max(value) FROM generate_series(
SELECT avg(value),min(value),max(value) FROM generate_series(
-9223372036854775808,9223372036854775807,1085102592571150095);
SELECT * FROM generate_series(-9223372036854775808,9223372036854775807,
9223372036854775807);
SELECT value,rowid FROM generate_series(-4611686018427387904,
SELECT value FROM generate_series(-4611686018427387904,
4611686018427387904, 4611686018427387904) ORDER BY value DESC;
SELECT * FROM generate_series(0,-2,-1);
SELECT * FROM generate_series(0,-2);
SELECT * FROM generate_series(0,2) LIMIT 3;}]]
} {0 {9223372036854775807
9223372036854775807
9.5|-9223372036854775808|9223372036854775807
-0.5|-9223372036854775808|9223372036854775807
-9223372036854775808
-1
9223372036854775806
4611686018427387904|3
0|2
-4611686018427387904|1
4611686018427387904
0
-4611686018427387904
0
-1
-2
+1 -1
View File
@@ -36,7 +36,7 @@ sqlite3 db test.db
# different. This causes problems for the tests below. To avoid
# issues, these tests are disabled for windows.
#
if {$::tcl_platform(platform)=="windows"} {
if {$::tcl_platform(platform) eq "windows"} {
finish_test
return
}

Some files were not shown because too many files have changed in this diff Show More