Compare commits

..

61 Commits

Author SHA1 Message Date
drh 2400eaa08c Bring all the latest trunk fixes and enhancements into the commit-and-continue branch.
FossilOrigin-Name: 19e47df37a1ab76625de4a9643e78d2ab8d1241c9fb58ca2f9e3708622050d10
2024-12-09 21:01:19 +00:00
drh e57527c14f Make the TCL interface more rebust against very large strings coming
out of TCL9.

FossilOrigin-Name: e2bae4143afd07de1ae55a6d2606a3b541a5b94568aa41f6a96e5d1245471653
2024-12-09 20:46:36 +00:00
drh e85e33d39c Enhance the ".import" command of the CLI so that it is able to insert into a
view that has an instead-of trigger.
[forum:/info/3e03c73150f8b9f8|Forum post 3e03c73150f8b9f8].

FossilOrigin-Name: 7dcc3731a9057a91f1b173fbab2841d8a666a945d9bc61d4c20f8a2a279d5ff1
2024-12-09 20:37:18 +00:00
drh cb591953e4 Enhance the ".import" command of the CLI so that it is able to insert into a
view that has an instead-of trigger.
[forum:/info/3e03c73150f8b9f8|Forum post 3e03c73150f8b9f8].

FossilOrigin-Name: c71acee1cf45abf0429e8b1668315c75b155d7c300d53833aeacd92c9bb3395d
2024-12-09 20:36:14 +00:00
drh c29bc733be Add NEVER() around branches that seems to have been made obsolete by
[a350ea7c6b89725b].

FossilOrigin-Name: cb5bad5c748b7435c43f3ec051736c1cf91ced2be317b0519e5e22523c137290
2024-12-09 13:02:13 +00:00
drh 54f96dc50e Further improvements to the decimal-to-float conversion for values close
to LARGEST_UINT64.

FossilOrigin-Name: 453c949914770e8f7b9b9dd882db492bf8756c212c816f87bb2e3ed98bcd64e3
2024-12-09 11:47:28 +00:00
dan 94ad4abc65 Fix an obscure problem with multiple outer joins, ON clauses and query flattening. Forum [forum:5c8a069d23|thread 5c8a069d23].
FossilOrigin-Name: a350ea7c6b89725ba1a0058c77fc8e918f5cb78e868d100f5425cdee114d1320
2024-12-09 11:37:37 +00:00
dan 4f5ae3fc4e Fix an obscure problem with multiple outer joins, ON clauses and query flattening. Forum [forum:5c8a069d23|thread 5c8a069d23].
FossilOrigin-Name: 289daf6cee39625e8f068179cd58efcc1d28242f46064e58ec4175a019cf48ad
2024-12-09 11:12:12 +00:00
drh a42db7ff40 Add a note in Makefile.msc about EXTRA_SRC files possibly requiring manual editing.
FossilOrigin-Name: a0a36bad454fab55ff39cbada68bf9ec6494d48dc4fc88496c0f637ab100734c
2024-12-09 10:57:01 +00:00
drh fd360c3943 Resynchronize autoconf/Makefile.msc
FossilOrigin-Name: 8f9c640818871c451e69f186224bf276f8a03c8d31a76806d81f34922a169f82
2024-12-09 10:52:28 +00:00
stephan 29d1d91502 Add a note in Makefile.msc about EXTRA_SRC files possibly requiring manual editing, as discussed in [forum:903f721f3e7c0d25|forum thread 903f721f3e7c0d25].
FossilOrigin-Name: 229c2f013c171bc220148c78f7db5396578f2c6aac28ad6ff9b687c9fa4998ac
2024-12-08 18:38:40 +00:00
drh 9f53d0c817 Yet another iteration of the solution to the floating-point conversion
problem - this what avoids complaints about oversize double values
from -fsanitize.

FossilOrigin-Name: fc6904a508eb732b1cb5cc12321a0d637d97e1e066a022a2c93cb50595f3a86a
2024-12-07 19:57:30 +00:00
drh 8703642803 A cleaner and more robust solution to the floating-point conversion problem
originally fixed by [81342fa6dd03fffb].

FossilOrigin-Name: 351de57f80b73045448c71d3402d877ff5d72418b1f5fc34c8147a04f7c5cb78
2024-12-07 19:06:25 +00:00
drh 92d252e06d Fix more harmless compiler warnings.
FossilOrigin-Name: f5b8fd77635e5e6d2d88a1ce74e1bd6c4311260a2b695e5055b898b880bf5718
2024-12-07 17:08:13 +00:00
drh 4597870108 Fix harmless compiler warning caused by the previous check-in.
FossilOrigin-Name: 462700aeb7c183d739ead4d726ce5384b3297bcf7929abd010987fa3a5f64807
2024-12-07 16:53:42 +00:00
drh 1a4b2117f1 On x64 hardware, round-trip uint64_t→double→uint64_t conversions
fail for values greater than UINT64_MAX-2047.  This caused the SQLite
text-to-float converter routine to give incorrect results for values
between '1.8446744073709550592eNNN' and '1.8446744073709551609eNNN' for any
exponent NNN.  This problem was introduced by check-in [761d8fd18b0ee868]
and first appeared in version 3.47.0 and was reported by
[forum:/forumpost/569a7209179a7f5e|forum post 569a7209179a7f5e].  Fixed
by this check-in.

FossilOrigin-Name: 81342fa6dd03fffbe7d4d699ff049dcef4d30344578bb6f91cb58a4e5a4f6036
2024-12-07 14:48:55 +00:00
drh ef636cc3cd Add the SQLITE_PREPARE_DONT_LOG option for sqlite3_prepare_v3(), that prevents
errors in the compilation of the SQL from being sent to sqlite3_log().

FossilOrigin-Name: 870403425493866232cf9e8fa62288861b7d0a4091b15d75727f8bb31da46f94
2024-12-06 18:35:16 +00:00
stephan c40329c9bf Minor doc update in auto.def. No functional changes.
FossilOrigin-Name: d324be296de443bd2853c732b10960178bf3ba9f18c80c509f6b41e2cfb2f3af
2024-12-06 00:12:43 +00:00
stephan 0448e00aaf Ensure that the post-config checks for @UNEXPANDED_VARS@ pass even if --disable-tcl is used, as reported in [forum:74ef8059fc|forum post 74ef8059fc].
FossilOrigin-Name: a38606bf44a1b5d0f684f67174c33f8c88c7927e23fc6a715e8d3ae7a6614bbd
2024-12-06 00:09:05 +00:00
drh eed134c4d3 Fix the build of sqlite3_analyzer.exe on Windows that was broken by
check-in [80f3bf8c2ee31ba1].

FossilOrigin-Name: 223f47b2db8d80629d60a642942eb8b288611e3e466cf904964285229a5809fc
2024-12-05 23:53:16 +00:00
stephan 76412af157 Minor doc correction in ext/misc/shathree.c, as reported in the forum. No functional changes.
FossilOrigin-Name: 3b82d2c6b732617b9be205efadd07326057c93b71c47ffd42de63fc05093667b
2024-12-04 16:01:25 +00:00
drh 33c120f9b7 Improve the output from the ".testctrl opt" command in the CLI.
FossilOrigin-Name: de7064d118c33aab0fff39d072593b287c291870b843d093045300bde464420f
2024-12-02 19:55:39 +00:00
dan 4b491d8565 Ensure that the query flattener does not change an ON clause term to a WHERE clause term.
FossilOrigin-Name: bdd408a2557ff05c9ea962a94b442f7c078d8e1ec27035aa95bc23d4d2bd5606
2024-12-02 17:21:52 +00:00
drh c9ac238b92 Fix a comment typo on the sqlite3ExprIsSingleTableConstraint() routine.
FossilOrigin-Name: 346a845bf1cd1c7e542f7bf763d86c197d9a3b4f3ea38ade416790a1cf80e6f2
2024-12-02 16:24:47 +00:00
drh bfdeb1f6d5 Fix a harmless typo in debugging output.
FossilOrigin-Name: 578f76cfb2e298fe6bfd278b545091fe682d01feb0be56ef57b6c9f2c179ac61
2024-12-02 16:07:38 +00:00
stephan ed7fe45c7c Reformulate [9e09d5d6] so that memsys5 shows up in the late-config summary as being enabled and does the right thing if both --debug and --memsys3 are used.
FossilOrigin-Name: 447db1cd0a6575432996e9735e78bbb09c83827c5e3080339b34df176ab86af0
2024-12-02 14:14:30 +00:00
drh 3e1f302dbe Enable MEMSYS5 with the --dev configure option.
FossilOrigin-Name: 9e09d5d60ac91423e1dec1169e9eb60a531f84261b48490c550cf4529540e6dc
2024-12-02 13:47:53 +00:00
drh 224e356081 Slighly less confusing output from treeview during debugging.
FossilOrigin-Name: 7aef0b93050cdb79cae68361e84047cea2e8e7251d0581ce917da03352bb1f16
2024-12-02 13:29:29 +00:00
stephan d004268b27 Trim a bit more from the sqlite370.svg border to get it closer in scaled size to the logo currently on the docsrc site.
FossilOrigin-Name: 81c7277fc59af833365f0ee5af603db49c19a6ba87bd5f252ecdfe72df252d4e
2024-12-01 15:23:40 +00:00
stephan fd66549cb6 Correct the fill color for the background of sqlite370.svg - it was slightly darker than it should have been.
FossilOrigin-Name: 732132407b3881aaa7fee151baafb6569664f1d2b82ef7743d89bd0a86cf0a09
2024-12-01 14:20:19 +00:00
stephan a13a645cdf Re-export sqlite370.svg to retain the gradient part and clip the size using the cutting guides in sqlite370.eps.
FossilOrigin-Name: 12017b01c8e6c12fdd8de3c3c325e56b5be80343a1a392538b6e6ed066e46cee
2024-12-01 14:14:50 +00:00
stephan 9bc351b3c7 Export a clipped copy of sqlite370.eps as sqlite370.svg, based on discussion in [forum:1bbd6d17ca|forum post 1bbd6d17ca].
FossilOrigin-Name: dd3a13c1209d0bac3d6eb105826429ef29b36682c347995dc266bf42e46a2193
2024-12-01 14:02:19 +00:00
stephan d6d9c54bb2 At the end of the configure script ensure that none of the files which are filtered for @VARS@ contain any unresolved @VAR@ placeholders, failing fatally if any do.
FossilOrigin-Name: 301df5c2beb08e8e2944f7a9e46a10114603518385c05a9c30a838ab436369d4
2024-11-30 17:48:31 +00:00
drh c5b9da34f2 In sqlite_dbpage, cancel any pending truncate operation if there an error
occurs later in the transaction.

FossilOrigin-Name: 1abab10f85a4dba5ffe51a30eeef30853c120e5566ed97b3af1526fff597c647
2024-11-30 14:13:35 +00:00
drh 03e306b3a1 A NEVER() that was added by [eb5ac9e5b9a4f9c8] is violated by the ifnull()
in-line function.  This check-in fixes that problem.

FossilOrigin-Name: 2220ccf4d6fea2413015c72fd318003b4b5afeae7cb7586b714fce36212d8c49
2024-11-30 12:00:38 +00:00
drh 5c208f36a4 Fix a NEVER() in the iif() logic that can be true if compiled with
SQLITE_ENABLE_UNKNOWN_SQL_FUNCTIONS.  Problem introduced by [eb5ac9e5b9a4f9c8].

FossilOrigin-Name: 3ec2df5a6c731b59b0ab132ee59c74d107f9c4bd32cf47d9776887858b9c0dea
2024-11-29 11:49:05 +00:00
stephan 2aac896611 Remove some outdated docs from Makefile.in.
FossilOrigin-Name: cc2c5fc98b2d1957bd26f41f0b646921ecabe2ffe544b3c3565965ba8850b2ff
2024-11-28 23:55:35 +00:00
stephan 25e042c0b0 Typo fixes and cleanups in autosetup/README.md.
FossilOrigin-Name: 7f366565f41fa4eb532cfaf83074106e235436bfc377116e3bf823ac08fd01a5
2024-11-28 20:46:51 +00:00
stephan 187c115a69 Configure script doc updates and cleanups. Skip check for EMSDK when doing an out-of-tree build, as ext/wasm does not support that build mode.
FossilOrigin-Name: 9d2f4148db1641e9bf2989c2b1adf5b9dcb2b123526ecacd063bca208b3c36cf
2024-11-28 16:14:19 +00:00
stephan fed5234fb3 ext/icu/README.txt: clean up EOL whitespace and add a mention of the --with-icu-... configure flags available as of version 3.48.
FossilOrigin-Name: 4976ac717bec2f2c89d94ac1d9b96afd1da573ba34e3c78637c3937287635e72
2024-11-28 15:52:21 +00:00
drh e8233f14bd Improvements to sqlite3ExprImpliesExpr() so that it recognizes that expressions like "iif(X,Y)" and "CASE WHEN X THEN Y END" imply X.
FossilOrigin-Name: eb5ac9e5b9a4f9c85a2203107697da14c07c1667037dff672f9d786cea964a37
2024-11-28 11:52:18 +00:00
drh 49e053f873 Use the P5 rather than the P3 parameter of OP_AutoCommit to avoid an
unnecessary conflict in the begin-concurrent branch.  Fix some comments.

FossilOrigin-Name: e6f63526189bdd081af4f3de81ef2ba5e78dd2e722f9796eff9662bfd125a8c8
2024-11-27 14:41:08 +00:00
drh 4bab0fdb37 Merge the latest trunk enhancements into the commit-and-continue branch.
FossilOrigin-Name: adaddf49485d5c1bf71e4a1aa116eaebd77fef88f5a0061d441c13e3e58c330f
2024-11-27 14:16:34 +00:00
drh 5f152d5794 Merge the latest trunk fixes and makefile enhancements into the commit-and-continue branch.
FossilOrigin-Name: 34cb6029cc79955b4e4790af2647d6db428b38757470f6990d8f8d8ed4979d8f
2024-11-20 20:24:28 +00:00
drh ada583f6e1 Disable commit-and-continue tests under the inmemory-journal and journaltest
permutations.

FossilOrigin-Name: 2f31c2b0a14e278c4bdb3ab19811b9a3cdfeb788e4fb2308408d9d11a11a7313
2024-11-18 14:54:34 +00:00
drh 6e81f2af83 The COMMIT AND CONTINUE TRANSACTION syntax is disabled by default. Enable it
using the SQLITE_DBCONFIG_CONTINUE_TRANSACTION configuration option.

FossilOrigin-Name: a2b784cb876f8c7e5b713a5ae5b7c8072e40d1fb48837bff085683bf1b71c68f
2024-11-18 11:49:47 +00:00
drh 1a9e667c81 Fix a typo in a variable name.
FossilOrigin-Name: 9c7f569acdc2fb829354cefda42389a554f5fd957a7ef47e6e093f30789bb28e
2024-11-18 11:14:58 +00:00
drh 7fbebfdddb Fix an uninitialized variable that appears to be the cause of the problems
with check-in [80b98446fc070d9a].

FossilOrigin-Name: 22393c3a08e9473eef23a3182720b0f908253d3c02ebaad77e120355326023be
2024-11-17 23:53:27 +00:00
drh e3c97544e1 Merge the latest trunk enhancements into the commit-and-continue branch.
FossilOrigin-Name: 1742af1215c37c83b84b072773ddaa2ec3bacc2f0baa29a49dfeb666e6f13e63
2024-11-17 11:46:47 +00:00
drh 30d5b2fd21 Add simple test cases. In doing so I found that the feature does not work
on a Linux ramdisk.

FossilOrigin-Name: 80b98446fc070d9a2ab5816dd941cb829f067b2fcf2a3db7a19bf73806fbcdcc
2024-11-16 23:32:56 +00:00
drh 71fb34f757 Merge all the latest trunk enhancements into the commit-and-continue branch.
FossilOrigin-Name: d217b4847ecc4b3ce3eb3d1dc5e4774758d1f1f93b0df02c11f3c5944557c799
2024-11-16 18:59:31 +00:00
drh d209bd2d64 Clean up the implementation now that it only has to deal with the
much simplier concept of COMMIT AND CONTINUE TRANSACTION.

FossilOrigin-Name: 17360660bbaf1b6009fc608f9687914789853f25ae38c1377a1ea5e5a621f34c
2024-11-16 18:37:56 +00:00
drh 92c526e71b Simplify the new syntax to be just "COMMIT AND CONTINUE TRANSACTION".
FossilOrigin-Name: 61797109a2f0fee84bc3e0a0c021544c87e4b985e7e7b549e387e396cf1f86ec
2024-11-16 14:40:11 +00:00
drh 06315a8c67 Load all the latest trunk enhancements, and especially the enhancements to
vfstrace, into the commit-and-begin branch.

FossilOrigin-Name: 605889b02122d98011e9a8d458ba01010423680dd69446458ffe7230a1d47937
2024-11-15 20:42:12 +00:00
drh 85aded1952 Another approach at implementing COMMIT AND BEGIN.
FossilOrigin-Name: a905bd5dd6ccb6f2e5671a5b691e61c853aa425e6a53e7e6b6dbc12e4020ef14
2024-11-15 17:28:57 +00:00
drh c367ef3593 Attempt to hold a lock across the COMMIT AND BEGIN boundary so that no other
process can start a new transaction in between the COMMIT and the BEGIN.

FossilOrigin-Name: bc8bcc53ff7a0cbe1c2e3a96e1bded055622b667c27284798433cc6d58c7f9fe
2024-11-14 22:59:16 +00:00
drh a8602768f4 Fix assertion faults in the COMMIT AND BEGIN path.
FossilOrigin-Name: a9a4ac17c2169fa7f97434177dfb01eaf4fae7f99b9203677d985d048eea4559
2024-11-14 19:59:02 +00:00
drh 083aaa551c Merge more makefile enhancements from trunk into the commit-and-begin branch.
FossilOrigin-Name: 098400d36140b90e1d6dab5f54b080568c633875916a1130b6627599b4f99469
2024-11-14 19:36:41 +00:00
drh 361549342c Merge makefile enhancements from trunk into the commit-and-begin branch.
FossilOrigin-Name: b5dd11e0ac059573c2cc14640f0cd127a9f4c3d629023b21745f5442cb2de28a
2024-11-14 19:08:15 +00:00
drh 458ce5f8f5 Merge the latest trunk enhancements and fixes into the commit-and-begin branch.
FossilOrigin-Name: 05fb5d30750d20db86bbee1c27bd5965f999116a05de6414ab2aef060b407ad2
2024-11-14 17:25:28 +00:00
drh 3e97909bc5 Early prototype code for COMMIT AND BEGIN. Does not currently work.
FossilOrigin-Name: ddac5973215478d0cacdd99c697345019018916453ec0657868a4e2c21601779
2024-11-14 12:03:13 +00:00
40 changed files with 825 additions and 319 deletions
+6 -40
View File
@@ -41,45 +41,13 @@ all:
# that contains this "Makefile.in" and the "configure" script.
#
TOP = @abs_top_srcdir@
#
# Just testing some default dir expansions...
# srcdir = @srcdir@
# builddir = @builddir@
# top_srcdir = @top_srcdir@
# abs_top_srcdir = @abs_top_srcdir@
# abs_top_builddir = @abs_top_builddir@
#
#
# Autotools-conventional vars which are used by package installation
# rules in main.mk.
#
# Autosetup allows the various XYZdir vars to be overridden at
# configure-time with, e.g. --libdir=X and --mandir=Y. However,
# defining them at configure-time, instead of at make-time, leads to
# later awkwardness:
#
# $ ./configure --prefix=/usr
# $ make prefix=/bar
#
# In that invocation, libdir will be /usr/foo, not /bar/foo as it
# normally should, unless the user _also_ passes libdir=... to make.
#
# In 99%+ of use cases, setting prefix=X has the desired effect of
# calculating conventional defaults for various other dirs, like
# $prefix/lib, $prefix/include, etc. If, however, we export those at
# configure-time, the passing prefix=... to make will update only
# $prefix and none of its derived dirs.
#
# Because it is more important (for our use cases) that these vars be
# overridable via a make invocation than a configure invocation, and
# they conventionally derive from $(prefix) in all but the most exotic
# of use cases, we do not export the configure-defined overrides of
# those vars to this makefile. Instead, we export only $prefix and
# its derived vars are set to their conventional default values in
# main.mk, which users can then override at make-time as needed.
# Overriding $prefix via make will also calculate any derived vars, as
# one would expect, unless each is specifically overridden.
# rules in main.mk. To get sane handling when a user overrides only
# a subset of these, we perform some acrobatics with these vars
# in the configure script: see [proj-remap-autoconf-dir-vars] for
# full details.
#
# For completeness's sake, the aforementioned conventional vars which
# are relevant to our installation rules are:
@@ -128,9 +96,7 @@ T.cc = $(CC)
# are, in that build, no uses of CPPFLAGS in the configure-expanded
# Makefile. Ergo: if a client configures with CPPFLAGS=... and then
# explicitly passes CFLAGS=... to make, the CPPFLAGS will be
# lost. That behavior is retained in 3.48+ because also honoring
# CPPFLAGS at make-time may have undesired side effects on any number
# of builds.
# lost. That behavior is retained in 3.48+.
#
CFLAGS = @CFLAGS@ @CPPFLAGS@
#
@@ -248,7 +214,7 @@ TCLLIBDIR = @TCLLIBDIR@
#
# Additional options when running tests using testrunner.tcl
# This is usually either blank, or else --status
# This is usually either blank or --status.
#
TSTRNNR_OPTS = @TSTRNNR_OPTS@
+4 -2
View File
@@ -19,7 +19,9 @@ USE_AMALGAMATION = 1
# <</mark>>
# Optionally set EXTRA_SRC to a list of C files to append to
# the generated sqlite3.c.
# the generated sqlite3.c. Any sqlite3 extensions added this
# way may require manual editing, as described in
# https://sqlite.org/forum/forumpost/903f721f3e7c0d25
#
!IFNDEF EXTRA_SRC
EXTRA_SRC =
@@ -2669,7 +2671,7 @@ shelltest: $(TESTPROGS)
.\testfixture.exe $(TOP)\test\permutations.test shell
sqlite3_analyzer.c: $(SQLITE3C) $(SQLITE3H) $(TOP)\src\tclsqlite.c $(TOP)\tool\spaceanal.tcl $(TOP)\tool\mkccode.tcl $(TOP)\tool\sqlite3_analyzer.c.in $(TOP)\ext\misc\sqlite3_stdio.h $(TOP)\ext\misc\sqlite3_stdio.c $(SQLITE_TCL_DEP)
$(TCLSH_CMD) $(TOP)\tool\mkccode.tcl $(TOP)\tool\sqlite3_analyzer.c.in > $@
$(TCLSH_CMD) $(TOP)\tool\mkccode.tcl -DINCLUDE_SQLITE3_C $(TOP)\tool\sqlite3_analyzer.c.in > $@
sqlite3_analyzer.exe: sqlite3_analyzer.c $(LIBRESOBJS)
$(LTLINK) $(NO_WARN) -DBUILD_sqlite -I$(TCLINCDIR) sqlite3_analyzer.c \
+104
View File
@@ -0,0 +1,104 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg
width="103.73447mm"
height="46.723713mm"
viewBox="0 0 103.73447 46.723713"
version="1.1"
id="svg470"
xmlns="http://www.w3.org/2000/svg"
xmlns:svg="http://www.w3.org/2000/svg">
<defs
id="defs467">
<clipPath
clipPathUnits="userSpaceOnUse"
id="clipPath41">
<path
d="m 994.055,997.609 c 6.725,-11.629 35.115,-61.371 40.815,-77.398 6.42,-18.121 7.77,-23.313 7.77,-23.313 0,0 -15.57,80.114 -41.12,126.862 5.6,18.9 12.29,39.79 19.86,62.12 8.85,-15.53 28.96,-51.2 36.23,-68.1 0.27,3.19 0.54,6.38 0.82,9.54 -6.44,24.75 -16.22,57.15 -28.74,82.54 32.14,167.25 135.59,386.25 247.04,504.48 H 509.602 c -37.883,0 -68.711,-30.82 -68.711,-68.71 V 731.789 c 173.738,66.68 383.23,127.633 563.529,125.02 -6.693,25.812 -14.315,49.152 -22.318,62.679 -4.122,6.981 0.449,35.653 11.953,78.121 z"
id="path39" />
</clipPath>
<linearGradient
x1="0"
y1="0"
x2="1"
y2="0"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(-4.02e-5,-918.907,-918.907,4.02e-5,858.809,1614.34)"
spreadMethod="pad"
id="linearGradient51">
<stop
style="stop-opacity:1;stop-color:#97d9f6"
offset="0"
id="stop43" />
<stop
style="stop-opacity:1;stop-color:#0f80cc"
offset="0.66199914"
id="stop45" />
<stop
style="stop-opacity:1;stop-color:#0f80cc"
offset="0.920245"
id="stop47" />
<stop
style="stop-opacity:1;stop-color:#0f80cc"
offset="1"
id="stop49" />
</linearGradient>
</defs>
<g
id="g337">
<rect
style="fill:#ffffff;stroke:#ffffff;stroke-width:0.239562;stroke-linecap:round;stroke-linejoin:round"
id="rect366"
width="103.4949"
height="46.48415"
x="0.119781"
y="0.119781"
ry="0" />
<g
id="g465"
transform="translate(-56.57816,-61.353828)">
<path
d="m 79.198545,96.729705 c -0.02011,-0.25467 -0.0321,-0.420158 -0.0321,-0.420158 0,0 -0.77223,-5.206224 -1.691499,-6.759822 -0.145415,-0.246275 0.01584,-1.257759 0.421676,-2.755936 0.237243,0.410245 1.238779,2.165033 1.439862,2.73043 0.226484,0.639268 0.274109,0.822431 0.274109,0.822431 0,0 -0.549275,-2.826244 -1.450623,-4.47541 0.197556,-0.66675 0.433564,-1.403703 0.700617,-2.191456 0.341489,0.599017 1.158875,2.049286 1.338792,2.552348 0.03634,0.103364 0.06703,0.191205 0.09454,0.271639 0.0088,-0.04833 0.01764,-0.09666 0.02646,-0.144992 -0.206375,-0.875595 -0.611716,-2.399242 -1.166636,-3.524956 1.231195,-6.408209 5.430309,-14.973654 9.735256,-18.795296 H 60.806192 c -1.88214,0 -3.422086,1.540228 -3.422086,3.422298 v 30.970081 c 0,1.881964 1.539946,3.421944 3.422086,3.421944 h 18.49607 c -0.13335,-1.61438 -0.1778,-3.40046 -0.103717,-5.123145"
style="fill:#0f80cc;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:0.0352778"
id="path21" />
<path
d="m 99.934471,84.584659 h 0.474839 v 3.954957 h -0.503061 c -0.115005,-1.093188 -0.510469,-1.946593 -1.186392,-2.560426 -0.676627,-0.612775 -1.526822,-0.920045 -2.5527,-0.920045 -0.911578,0 -1.64465,0.230364 -2.200628,0.690387 -0.555977,0.459669 -0.833966,1.073467 -0.833966,1.840759 0,0.709401 0.230011,1.356536 0.690386,1.940948 0.459669,0.585258 1.457325,1.337134 2.991556,2.258907 1.782939,1.063978 2.981325,1.992912 3.594805,2.789414 0.61348,0.795549 0.92004,1.706421 0.92004,2.732229 0,1.322916 -0.46813,2.454275 -1.405815,3.393691 -0.939094,0.93983 -2.069042,1.40945 -3.389489,1.40945 -0.766233,0 -1.742369,-0.21096 -2.929467,-0.63334 -0.487891,-0.17237 -0.799394,-0.25781 -0.933097,-0.25781 -0.277989,0 -0.492831,0.21523 -0.646289,0.64699 h -0.503414 v -4.558981 h 0.503414 c 0.0092,1.256206 0.418747,2.262752 1.227314,3.020521 0.808567,0.75667 1.753306,1.13524 2.834217,1.13524 1.024819,0 1.844322,-0.27231 2.462389,-0.81979 0.617008,-0.54723 0.925689,-1.276066 0.925689,-2.188068 0,-0.681143 -0.254,-1.333394 -0.760942,-1.956823 -0.506589,-0.623958 -1.567392,-1.427621 -3.180292,-2.412259 -1.31445,-0.812765 -2.192161,-1.452422 -2.63278,-1.923027 -0.44062,-0.470182 -0.766234,-0.985591 -0.976842,-1.547284 -0.210608,-0.560564 -0.316089,-1.177537 -0.316089,-1.848485 0,-1.294659 0.424744,-2.345302 1.273175,-3.151399 0.848431,-0.805392 1.953331,-1.208264 3.314347,-1.208264 0.747889,0 1.563159,0.148519 2.445103,0.445558 0.411692,0.134409 0.699559,0.201436 0.862189,0.201436 0.135114,0 0.225778,-0.02858 0.27305,-0.08608 0.04868,-0.05786 0.1016,-0.186973 0.15875,-0.388409"
style="fill:#003b57;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:0.0352778"
id="path23" />
<path
d="m 119.14851,93.38576 c 0,-2.579547 -0.59019,-4.611476 -1.76953,-6.097835 -1.17969,-1.48583 -2.70369,-2.22878 -4.57412,-2.22878 -1.98437,0 -3.56799,0.746125 -4.75191,2.235977 -1.18463,1.491438 -1.77553,3.482834 -1.77553,5.975562 0,2.42577 0.58702,4.398857 1.76106,5.918271 1.17511,1.519415 2.70616,2.278595 4.59458,2.278595 1.96568,0 3.5426,-0.73562 4.7311,-2.207334 1.18851,-1.472177 1.78435,-3.430094 1.78435,-5.874456 z m 2.93265,12.9716 0.18662,0.46041 c -0.82409,0.37402 -1.7586,0.56085 -2.80353,0.56085 -0.86289,0 -1.66405,-0.11314 -2.40206,-0.33789 -0.73731,-0.22571 -1.43122,-0.57051 -2.07751,-1.03572 -0.647,-0.46496 -1.43616,-1.23941 -2.36608,-2.32198 -0.82515,-0.95928 -1.45768,-1.55445 -1.8983,-1.78404 -1.92723,-0.39232 -3.58246,-1.40973 -4.96852,-3.048067 -1.38536,-1.639323 -2.07822,-3.509716 -2.07822,-5.609167 0,-1.5627 0.39794,-3.033889 1.19345,-4.414556 0.79587,-1.380772 1.87466,-2.461718 3.23709,-3.242416 1.36031,-0.782108 2.87055,-1.172633 4.52896,-1.172633 2.56011,0 4.71699,0.851253 6.47206,2.55263 1.75366,1.7012 2.63067,3.79416 2.63067,6.276975 0,2.09102 -0.67522,3.951923 -2.02706,5.586695 -1.3522,1.635479 -3.08293,2.658779 -5.19148,3.070539 0.20179,0.16151 0.56233,0.5697 1.0795,1.22234 1.10031,1.36204 2.02071,2.28604 2.75837,2.76998 0.73871,0.48274 1.47214,0.72542 2.20133,0.72542 0.53728,0 1.04634,-0.0868 1.52471,-0.25937"
style="fill:#003b57;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:0.0352778"
id="path25" />
<path
d="m 134.47177,99.116318 -0.28116,2.694482 h -11.00385 l 0.0233,-0.53619 c 0.59654,-0.061 1.01458,-0.21413 1.25835,-0.45861 0.24342,-0.24624 0.36654,-0.81111 0.37571,-1.699682 l 0.0127,-11.904593 c -0.004,-0.621877 -0.0346,-1.050502 -0.0861,-1.284393 -0.13828,-0.653698 -0.75565,-0.980017 -1.85984,-0.980017 l -0.0236,-0.535164 h 5.74393 l 0.0219,0.535164 c -0.61242,0.04163 -1.03152,0.206728 -1.26612,0.496711 -0.23212,0.291042 -0.34713,0.880533 -0.34678,1.767699 l -0.0441,12.029053 c 0.002,0.204646 0.0191,0.391901 0.0572,0.565538 0.1845,0.877674 0.88053,1.315474 2.08774,1.315474 h 1.03681 c 1.34161,0 2.27259,-0.15088 2.79788,-0.45226 0.52388,-0.29919 0.8569,-0.818023 1.00048,-1.553212 h 0.49565"
style="fill:#003b57;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:0.0352778"
id="path27" />
<path
d="m 138.12055,87.618936 c 0.25965,0 0.49883,0.09095 0.71967,0.273685 0.21837,0.182034 0.36054,0.407071 0.41522,0.674829 0.0533,0.25975 0.009,0.48507 -0.133,0.676769 -0.14217,0.191523 -0.34114,0.28702 -0.60078,0.28702 -0.26846,0 -0.51858,-0.0955 -0.75001,-0.28702 -0.23283,-0.191699 -0.37535,-0.417019 -0.42827,-0.676769 -0.0547,-0.267758 -0.0106,-0.492795 0.14605,-0.674829 0.15311,-0.182738 0.36266,-0.273685 0.63112,-0.273685 z m 1.75754,4.127783 -0.0176,7.535404 c 0.003,0.526662 0.03,0.900957 0.0769,1.122117 0.0607,0.30688 0.19685,0.5147 0.40111,0.6248 0.20778,0.11081 0.67133,0.1662 1.39065,0.1662 l 0.0166,0.50299 h -5.17702 l 0.0123,-0.50299 c 0.70979,0 1.14582,-0.0656 1.31198,-0.1947 0.16475,-0.12887 0.24941,-0.56307 0.25859,-1.301433 l 0.0325,-5.335094 c -0.006,-0.291042 -0.0243,-0.518548 -0.0586,-0.683613 -0.1016,-0.493219 -0.42686,-0.740587 -0.97367,-0.740587 l -1.12324,0.143616 -0.005,-0.589527 3.26319,-0.747183 h 0.59161"
style="fill:#003b57;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:0.0352778"
id="path29" />
<path
d="m 148.56207,92.004952 0.0247,0.805074 h -2.70545 l -0.0194,6.728955 c 0,0.183409 0.0109,0.341065 0.0423,0.476109 0.11465,0.55605 0.41945,0.83467 0.90946,0.83467 0.79728,0 1.70709,-0.52239 2.73967,-1.567637 l 0.43427,0.366148 c -1.43016,1.587219 -2.79682,2.380119 -4.10033,2.380119 -0.901,0 -1.43828,-0.41229 -1.6129,-1.23677 -0.072,-0.34438 -0.10795,-1.025556 -0.11077,-2.041838 l 0.037,-5.939756 h -1.76954 l -0.0205,-0.502708 c 1.51836,-0.153105 2.50472,-1.106981 2.96087,-2.861769 h 0.51752 l -0.005,2.559403 h 2.67758"
style="fill:#003b57;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:0.0352778"
id="path31" />
<path
d="m 152.6931,96.836244 c 2.82998,-0.546417 4.09434,-1.527845 3.79906,-2.9464 -0.0603,-0.288819 -0.24483,-0.55245 -0.54716,-0.791527 -0.30656,-0.239925 -0.61418,-0.359975 -0.92921,-0.359975 -0.71932,0 -1.3081,0.424462 -1.76178,1.272505 -0.4572,0.848854 -0.6417,1.791017 -0.56091,2.825397 z m -0.0162,0.533436 c 0.024,0.248708 0.0575,0.48394 0.10442,0.704179 0.36089,1.725437 1.3328,2.588371 2.91395,2.588371 1.15005,0 2.67264,-0.694412 3.42829,-2.08471 l 0.38312,0.395217 c -0.47378,1.071703 -0.9899,1.848523 -1.54658,2.331513 -0.55527,0.48327 -1.87678,0.72414 -2.82434,0.72414 -1.01776,0 -1.86161,-0.28497 -2.53259,-0.85548 -0.67204,-0.57076 -1.11407,-1.378306 -1.33456,-2.423128 -0.37465,-1.783751 -0.0843,-3.405012 0.86854,-4.868334 0.95779,-1.460853 2.19145,-2.19329 3.70593,-2.19329 0.59584,0 1.66511,0.152118 2.07574,0.453637 0.40535,0.30166 0.66393,0.707072 0.77118,1.214614 0.18027,0.85411 -0.78352,1.660948 -1.74484,2.423689 -0.96203,0.762318 -2.38725,1.291767 -4.26826,1.589582"
style="fill:#003b57;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:0.0352778"
id="path33" />
<g
id="g37"
clip-path="url(#clipPath41)"
transform="matrix(0.03527778,0,0,-0.03527778,42.828565,121.98722)">
<path
d="m 994.055,997.609 c 6.725,-11.629 35.115,-61.371 40.815,-77.398 6.42,-18.121 7.77,-23.313 7.77,-23.313 0,0 -15.57,80.114 -41.12,126.862 5.6,18.9 12.29,39.79 19.86,62.12 8.85,-15.53 28.96,-51.2 36.23,-68.1 0.27,3.19 0.54,6.38 0.82,9.54 -6.44,24.75 -16.22,57.15 -28.74,82.54 32.14,167.25 135.59,386.25 247.04,504.48 H 509.602 c -37.883,0 -68.711,-30.82 -68.711,-68.71 V 731.789 c 173.738,66.68 383.23,127.633 563.529,125.02 -6.693,25.812 -14.315,49.152 -22.318,62.679 -4.122,6.981 0.449,35.653 11.953,78.121"
style="fill:url(#linearGradient51);fill-opacity:1;fill-rule:nonzero;stroke:none"
id="path53" />
</g>
<path
d="m 95.439377,63.024997 c -1.923345,-1.715206 -4.252031,-1.026231 -6.550379,1.01353 -0.341136,0.303037 -0.681566,0.639234 -1.020233,0.998362 -3.931709,4.170892 -7.581195,11.896725 -8.715023,17.796934 0.441678,0.895703 0.786695,2.038703 1.013884,2.911828 0.05821,0.224014 0.110772,0.43427 0.152752,0.613128 0.09984,0.423298 0.153459,0.697794 0.153459,0.697794 0,0 -0.03528,-0.133385 -0.179917,-0.552802 -0.02752,-0.08043 -0.05821,-0.168275 -0.09454,-0.271639 -0.01552,-0.04269 -0.03704,-0.09454 -0.06068,-0.149931 -0.25647,-0.596194 -0.965906,-1.854553 -1.278114,-2.402417 -0.267053,0.787753 -0.503061,1.524706 -0.700617,2.191456 0.901348,1.649166 1.450623,4.47541 1.450623,4.47541 0,0 -0.04762,-0.183163 -0.274109,-0.822431 -0.201083,-0.565397 -1.202619,-2.320185 -1.439862,-2.73043 -0.405836,1.498177 -0.567091,2.509661 -0.421676,2.755936 0.282328,0.477202 0.551216,1.300586 0.78733,2.211176 0.5334,2.051367 0.904169,4.548646 0.904169,4.548646 0,0 0.01199,0.165488 0.0321,0.420158 -0.07408,1.722685 -0.02963,3.508765 0.103717,5.123145 0.176741,2.13706 0.509411,3.97288 0.93345,4.9554 l 0.287866,-0.15695 c -0.622652,-1.93573 -0.875594,-4.47255 -0.764822,-7.39814 0.16757,-4.471846 1.196623,-9.86469 3.098095,-15.485534 3.212395,-8.485012 7.669389,-15.292918 11.748559,-18.544118 -3.717925,3.357739 -8.749948,14.22647 -10.256309,18.251312 -1.686631,4.50709 -2.881842,8.736578 -3.602214,12.788831 1.242836,-3.798959 5.261328,-5.431932 5.261328,-5.431932 0,0 1.97097,-2.430745 4.274256,-5.903454 -1.379714,0.314678 -3.645253,0.853369 -4.404078,1.172281 -1.119364,0.469547 -1.420989,0.629708 -1.420989,0.629708 0,0 3.62585,-2.208036 6.736645,-3.207809 4.278136,-6.738056 8.939042,-16.310328 4.245328,-20.497448"
style="fill:#003b57;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:0.0352778"
id="path55" />
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 12 KiB

+137 -102
View File
@@ -36,14 +36,15 @@ set DUMP_DEFINES_JSON ""; #./config.defines.json
#
# 1) --debug is used by autosetup itself, so we have to rename it to
# --with-debug. We cannot use --enable-debug because that is, for
# autosetup, and alias for --debug=1. Alternately, we can patch
# autosetup, an alias for --debug=1. Alternately, we can patch
# autosetup to use --autosetup-debug for its own purposes instead.
#
# 2) In autosetup, all flags starting with (--enable, --disable) are
# forced to be booleans and receive special handling in how they're
# resolved. Because of that we have to rename:
#
# 2.1) --enable-tempstore[=no] to --with-tempstore[=no].
# 2.1) --enable-tempstore[=no] to --with-tempstore[=no], noting that
# it has four legal values, not two.
#
########################################################################
# A gentle introduction to flags handling in autosetup
@@ -65,17 +66,16 @@ set DUMP_DEFINES_JSON ""; #./config.defines.json
#
# Autosetup does no small amount of specialized handling for flags,
# especially booleans. Each bool-type --FLAG implicitly gets
# --enable-FLAG and --disable-FLAG forms, and explicitly adding flags
# with those prefixes will force them to be boolean flags. e.g. we
# define a flag "readline", which will be interpreted in one of two
# ways, depending on how it's invoked and how its default is defined:
# --enable-FLAG and --disable-FLAG forms. e.g. we define a flag
# "readline", which will be interpreted in one of two ways, depending
# on how it's invoked and how its default is defined:
#
# --enable-readline ==> boolean true
# --disable-readline ==> boolean false
#
# Trying to pass --readline or --readline=1 or --readline=0 will
# result in an "unrecognized option" error, despite the the [options]
# call listing the flag as "readline".
# Passing --readline or --readline=1 is equivalent to passing
# --enable-readline, and --readline=0 is equivalent to
# --disable-readline.
#
# The behavior described above can lead lead to some confusion when
# writing help text. For example:
@@ -83,7 +83,7 @@ set DUMP_DEFINES_JSON ""; #./config.defines.json
# options { json=1 {Disable JSON functions} }
#
# The reason the help text says "disable" is because a boolean option
# defaulting to true is, in the --help text, rendered as:
# which defaults to true is, in the --help text, rendered as:
#
# --disable-json Disable JSON functions
#
@@ -93,22 +93,7 @@ set DUMP_DEFINES_JSON ""; #./config.defines.json
#
# Non-boolean flags, in contrast, use the names specifically given to
# them in the [options] invocation. e.g. "with-tcl" is the --with-tcl
# flag. Autosetup may, however, choose to automatically alter the help
# text, as demonstrated here:
#
# options {
# readline=1 => {Disable readline support}
# with-readline-lib: => {Readline library}
# with-readline-inc: => {Readline include paths}
# }
#
# $ ./configure --help | grep readline
# --disable-readline disable readline support
# --with-readline-lib specify readline library
# --with-readline-inc specify readline include paths
#
# Note that it prefixed and lower-case the help message. Whether
# that's a feature or a bug can be debated.
# flag.
#
# Fetching values for flags:
#
@@ -120,12 +105,15 @@ set DUMP_DEFINES_JSON ""; #./config.defines.json
#
# Non-boolean (i.e. string) flags:
# - [opt-val FLAG ?default?]
# - [opt-str ...] - see the docs in ./autosetup/autosetup
#
########################################################################
set flags {
# When writing {help text blocks}, be aware that autosetup formats
# them differently (left-aligned, under the --flag, if the block
# starts with a newline.
# them differently (left-aligned, directly under the --flag) if the
# block starts with a newline. It does NOT expand vars and commands,
# but we use a [subst] call below which will replace (only) var
# refs.
# <build-modes>
shared=1 => {Disable build of shared libary}
@@ -153,7 +141,9 @@ set flags {
# <tcl>
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.}
that, from which we can derive a directory containing tclConfig.sh.
A dir name of "prefix" is equivalent to the directory specified by
the --prefix flag.}
with-tclsh:PATH =>
{Full pathname of tclsh to use. It is used for (A) trying to find
tclConfig.sh and (B) all TCL-based code generation. Warning: if
@@ -315,18 +305,17 @@ proj-file-extensions
if {".exe" eq [get-define TARGET_EXEEXT]} {
define SQLITE_OS_UNIX 0
define SQLITE_OS_WIN 1
# todo? add -DSQLITE_OS_WIN=1 to CFLAGS or CFLAGS_sqlite3_os?
} else {
define SQLITE_OS_UNIX 1
define SQLITE_OS_WIN 0
# todo? add -DSQLITE_OS_UNIX=1 to CFLAGS or CFLAGS_sqlite3_os
}
#########
# Programs needed
cc-check-tools ld ar ; # must come before sqlite-check-wasi-sdk
cc-check-tools ld ar ; # must come before [sqlite-check-wasi-sdk]
if {"" eq [proj-bin-define install]} {
proj-warn "Cannot find install binary, so 'make install' will not work."
define BIN_INSTALL false
}
########################################################################
@@ -341,21 +330,18 @@ define BUILD_CFLAGS [proj-get-env BUILD_CFLAGS {-g}]
proj-if-opt-truthy dev {
# --enable-dev needs to come early so that the downstream tests
# which check for these flags will show the user their updated
# state.
# which check for the following flags use their updated state.
proj-opt-set all 1
proj-opt-set debug 1
proj-opt-set amalgamation 0
define CFLAGS [get-env CFLAGS {-O0 -g}]
}
define LINK_TOOLS_DYNAMICALLY [proj-opt-was-provided dynlink-tools]
########################################################################
# Handle --with-wasi-sdk=DIR
#
# This must be run early on because it may change the toolchain and
# disable a number of config options.
# This must be run relatively early on because it may change the
# toolchain and disable a number of config options.
proc sqlite-check-wasi-sdk {} {
set wasiSdkDir [opt-val with-wasi-sdk] ; # ??? [lindex [opt-val with-wasi-sdk] end]
define HAVE_WASI_SDK 0
@@ -374,6 +360,7 @@ proc sqlite-check-wasi-sdk {} {
msg-result "Using wasi-sdk clang. Disabling CLI shell modifying config flags:"
# Boolean (--enable-/--disable-) flags which must be switched off:
foreach opt {
dynlink-tools
editline
gcov
icu-collations
@@ -425,6 +412,11 @@ proc sqlite-check-wasi-sdk {} {
}; # sqlite-check-wasi-sdk
sqlite-check-wasi-sdk
########################################################################
# --dynlink-tools tells the build to dynamically link certain binaries
# to libsqlite3.so instead of embedding a copy of the amalgamation.
define LINK_TOOLS_DYNAMICALLY [proj-opt-was-provided dynlink-tools]
#
# Enable large file support (if special flags are necessary)
define HAVE_LFS 0
@@ -475,7 +467,11 @@ apply {{} {
if {[proj-opt-was-provided soname]} {
set soname [join [opt-val soname] ""]
} else {
set soname none; # enabling soname breaks linking for the --dynlink-tools feature
# Enabling soname breaks linking for the --dynlink-tools feature,
# and this project has no direct use for soname, so default to
# none. Package maintainers, on the other hand, like to have an
# soname.
set soname none
}
switch -exact -- $soname {
none - "" { return 0 }
@@ -498,6 +494,7 @@ apply {{} {
# --soname was explicitly requested but not available, so fail fatally
proj-fatal "This environment does not support SONAME."
} else {
# --soname was not explicitly requested but not available, so just warn
msg-result "This environment does not support SONAME."
}
}}
@@ -523,6 +520,7 @@ 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
} {
define TARGET_DEBUG {-DNDEBUG}
@@ -560,16 +558,25 @@ proj-if-opt-truthy debug {
# failure to find TCL is not fatal but a loud warning will be emitted.
#
proc sqlite-check-tcl {} {
rename sqlite-check-tcl ""
define TCLSH_CMD false ; # Significant is that it exits with non-0
define HAVE_TCL 0 ; # Will be enabled via --tcl or a successful search
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 ""
}
file delete -force ".tclenv.sh"; # ensure no stale state from previous configures.
if {![opt-bool tcl]} {
proj-indented-notice {
NOTE: TCL is disabled via --disable-tcl. This means that none
of the TCL-based components, including tests and sqlite3_analyzer,
will be built.
of the TCL-based components will be built, including tests
and sqlite3_analyzer.
}
return
}
@@ -687,8 +694,8 @@ proc sqlite-check-tcl {} {
# in main.mk (search it for T.tcl.env.sh) so that
# static/hand-written makefiles which import main.mk do not have
# to define that before importing main.mk. Even so, we export
# TCLLIBDIR from here, which will cause the makefile to use this
# one rather than to re-calculate it at make-time.
# TCLLIBDIR from here, which will cause the canonical makefile to
# use this one rather than to re-calculate it at make-time.
set tcllibdir [get-env TCLLIBDIR ""]
if {"" eq $tcllibdir} {
# Attempt to extract TCLLIBDIR from TCL's $auto_path
@@ -743,7 +750,7 @@ sqlite-check-tcl
# sqlite-determine-codegen-tcl checks which TCL to use as a code
# generator. By default, prefer jimsh simply because we have it
# in-tree (it's part of autosetup) unless --with-tclsh=X is used, in
# which case prefix X.
# which case prefer X.
#
# Returns the human-readable name of the TCL it selects. Fails fatally
# if it cannot detect a TCL appropriate for code generation.
@@ -759,9 +766,16 @@ sqlite-check-tcl
set useJimForCodeGen 0 ; # Set to 1 when using jimsh for code generation.
# May affect later decisions.
proc sqlite-determine-codegen-tcl {} {
rename sqlite-determine-codegen-tcl ""
msg-result "Checking for TCL to use for code generation... "
define CFLAGS_JIMSH [proj-get-env CFLAGS_JIMSH {-O1}]
set cgtcl [opt-val with-tclsh jimsh]
if {"jimsh" ne $cgtcl} {
# When --with-tclsh=X is used, use that for all TCL purposes,
# including in-tree code generation, per developer request.
define BTCLSH "\$(TCLSH_CMD)"
return $cgtcl
}
set flagsToRestore {CC CFLAGS AS_CFLAGS CPPFLAGS AS_CPPFLAGS LDFLAGS LINKFLAGS LIBS CROSS}
define-push $flagsToRestore {
# We have to swap CC to CC_FOR_BUILD for purposes of the various
@@ -775,56 +789,50 @@ proc sqlite-determine-codegen-tcl {} {
# block.
foreach flag $flagsToRestore {define $flag ""}
define CC [get-define CC_FOR_BUILD]
if {"jimsh" ne $cgtcl} {
# When --with-tclsh=X is used, use that for all TCL purposes,
# including in-tree code generation, per developer request.
# These headers are technically optional for JimTCL but necessary if
# we want to use it for code generation:
set sysh [cc-check-includes dirent.h sys/time.h]
# jimsh0.c hard-codes #define's for HAVE_DIRENT_H and
# HAVE_SYS_TIME_H on the platforms it supports, so we do not
# need to add -D... flags for those. We check for them here only
# so that we can avoid the situation that we later, at
# make-time, try to compile jimsh but it then fails due to
# missing headers (i.e. fail earlier rather than later).
if {$sysh && [cc-check-functions realpath]} {
define-append CFLAGS_JIMSH -DHAVE_REALPATH
define BTCLSH "\$(JIMSH)"
set ::useJimForCodeGen 1
} elseif {$sysh && [cc-check-functions _fullpath]} {
# _fullpath() is a Windows API. It's not entirely clear
# whether we need to add {-DHAVE_SYS_TIME_H -DHAVE_DIRENT_H}
# to CFLAGS_JIMSH in this case. On MinGW32 we definitely do
# not want to because it already hard-codes them. On _MSC_VER
# builds it does not.
define-append CFLAGS_JIMSH -DHAVE__FULLPATH
define BTCLSH "\$(JIMSH)"
set ::useJimForCodeGen 1
} elseif {[file-isexec [get-define TCLSH_CMD]]} {
set cgtcl [get-define TCLSH_CMD]
define BTCLSH "\$(TCLSH_CMD)"
} else {
# These headers are technically optional for JimTCL but necessary if
# we want to use it for code generation:
set sysh [cc-check-includes dirent.h sys/time.h]
# jimsh0.c hard-codes #define's for HAVE_DIRENT_H and
# HAVE_SYS_TIME_H on the platforms it supports, so we do not
# need to add -D... flags for those. We check for them here only
# so that we can avoid the situation that we later, at
# make-time, try to compile jimsh but it then fails due to
# missing headers (i.e. fail earlier rather than later).
if {$sysh && [cc-check-functions realpath]} {
define-append CFLAGS_JIMSH -DHAVE_REALPATH
define BTCLSH "\$(JIMSH)"
set ::useJimForCodeGen 1
} elseif {$sysh && [cc-check-functions _fullpath]} {
# _fullpath() is a Windows API. It's not entirely clear
# whether we need to add {-DHAVE_SYS_TIME_H -DHAVE_DIRENT_H}
# to CFLAGS_JIMSH in this case. On MinGW32 we definitely do
# not want to because it already hard-codes them. On _MSC_VER
# builds it does not.
define-append CFLAGS_JIMSH -DHAVE__FULLPATH
define BTCLSH "\$(JIMSH)"
set ::useJimForCodeGen 1
} elseif {[file-isexec [get-define TCLSH_CMD]]} {
set cgtcl [get-define TCLSH_CMD]
define BTCLSH "\$(TCLSH_CMD)"
} else {
# One last-ditch effort to find TCLSH_CMD: use info from
# tclConfig.sh to try to find a tclsh
if {"" eq [get-define TCLSH_CMD]} {
set tpre [get-define TCL_EXEC_PREFIX]
if {"" ne $tpre} {
set tv [get-define TCL_VERSION]
if {[file-isexec "${tpre}/bin/tclsh${tv}"]} {
define TCLSH_CMD "${tpre}/bin/tclsh${tv}"
} elseif {[file-isexec "${tpre}/bin/tclsh"]} {
define TCLSH_CMD "${tpre}/bin/tclsh"
}
# One last-ditch effort to find TCLSH_CMD: use info from
# tclConfig.sh to try to find a tclsh
if {"" eq [get-define TCLSH_CMD]} {
set tpre [get-define TCL_EXEC_PREFIX]
if {"" ne $tpre} {
set tv [get-define TCL_VERSION]
if {[file-isexec "${tpre}/bin/tclsh${tv}"]} {
define TCLSH_CMD "${tpre}/bin/tclsh${tv}"
} elseif {[file-isexec "${tpre}/bin/tclsh"]} {
define TCLSH_CMD "${tpre}/bin/tclsh"
}
}
set cgtcl [get-define TCLSH_CMD]
if {![file-isexec $cgtcl]} {
proj-fatal "Cannot find a tclsh to use for code generation."
}
define BTCLSH "\$(TCLSH_CMD)"
}
set cgtcl [get-define TCLSH_CMD]
if {![file-isexec $cgtcl]} {
proj-fatal "Cannot find a tclsh to use for code generation."
}
define BTCLSH "\$(TCLSH_CMD)"
}
}; # CC swap-out
return $cgtcl
@@ -845,6 +853,8 @@ proj-if-opt-truthy threadsafe {
}
define LDFLAGS_PTHREAD [get-define lib_pthread_create]
undefine lib_pthread_create
# Recall that LDFLAGS_PTHREAD might be empty even if pthreads if
# found because it's in -lc on some platforms.
} {
msg-result no
sqlite-add-feature-flag -DSQLITE_THREADSAFE=0
@@ -858,7 +868,7 @@ apply {{} {
set ts [opt-val with-tempstore no]
set tsn 1
msg-checking "Use an in-RAM database for temporary tables? "
switch -- $ts {
switch -exact -- $ts {
never { set tsn 0 }
no { set tsn 1 }
yes { set tsn 2 }
@@ -908,6 +918,7 @@ apply {{} {
# corresponding --FEATURE flag was explicitly given, fail fatally,
# else fail silently.
proc sqlite-check-line-editing {} {
rename sqlite-check-line-editing ""
msg-result "Checking for line-editing capability..."
define HAVE_READLINE 0
define HAVE_LINENOISE 0
@@ -1161,22 +1172,13 @@ proj-if-opt-truthy math {
# are cumulative. If neither are provided, icu-collations is not
# honored and a warning is emitted if it is provided.
#
# Design note: though we can automatically enable ICU if the
# Design note: though we could automatically enable ICU if the
# icu-config binary or (pkg-config icu-io) are found, we specifically
# do not. ICU is always an opt-in feature.
#
# Maintenance reminder: check-in 09caa94c9e84 added pkg-config support
# to this but the result fails to link on both Linux and OpenBSD
# (other systems were untested) because the pkg-config results are
# missing a required library.
proc sqlite-check-icu {} {
rename sqlite-check-icu ""
define LDFLAGS_ICU [join [opt-val with-icu-ldflags ""]]
define CFLAGS_ICU [join [opt-val with-icu-cflags ""]]
# Flags sets seen in the wild for ICU:
# - -licui18n -licuuc -licudata
# - -licui18n -licuuc
# - /usr/local/bin/icu-config --ldflags
#
if {[proj-opt-was-provided with-icu-config]} {
set icuConfigBin [opt-val with-icu-config]
set tryIcuConfigBin 1; # set to 0 if we end up using pkg-config
@@ -1237,8 +1239,18 @@ sqlite-check-icu
########################################################################
# Check for the Emscripten SDK for building the web-based wasm
# components.
# components. The core lib and tools do not require this but ext/wasm
# does.
apply {{} {
if {$::autosetup(srcdir) ne $::autosetup(builddir)} {
# The EMSDK pieces require writing to the original source tree
# even when doing an out-of-tree build. The ext/wasm pieces do not
# support an out-of-tree build so we catch that case and treat it
# as if EMSDK were not found.
msg-result "Out-of tree build: not checking for EMSDK."
define EMCC_WRAPPER ""
return
}
set emccsh $::srcdir/tool/emcc.sh
if {![get-define HAVE_WASI_SDK] && [proj-check-emsdk]} {
define EMCC_WRAPPER $emccsh
@@ -1397,3 +1409,26 @@ proj-if-opt-truthy dump-defines {
undefine OPT_SHELL.list
}
}
########################################################################
# Perform some high-level validation on the generated files...
#
# 1) Ensure that no unresolved @VAR@ placeholders are in files which
# use those.
#
# 2) TBD
apply {{} {
# Check #1: ensure that files which get filtered for @VAR@ do not
# contain any unresolved @VAR@ refs. That may indicate an
# unexported/unused var or a typo.
foreach f "Makefile sqlite3.pc $::srcdir/tool/emcc.sh" {
if {![file exists $f]} continue
set lnno 1
foreach line [proj-file-content-list $f] {
if {[regexp {(@[A-Za-z_]+@)} $line match]} {
error "Unresolved reference to $match at line $lnno of $f"
}
incr lnno
}
}
}}
+3 -1
View File
@@ -19,7 +19,9 @@ TOP = .
# Optionally set EXTRA_SRC to a list of C files to append to
# the generated sqlite3.c.
# the generated sqlite3.c. Any sqlite3 extensions added this
# way may require manual editing, as described in
# https://sqlite.org/forum/forumpost/903f721f3e7c0d25
#
!IFNDEF EXTRA_SRC
EXTRA_SRC =
+29 -24
View File
@@ -56,14 +56,13 @@ In (mostly) alphabetical order:
- **`file-isexec filename`**\
Should be used in place of `[file executable]`, as it will also
check for `${filename}.exe` on Windows platforms. However, on such
platforms is also assumes that _any_ existing file is executable.
platforms it also assumes that _any_ existing file is executable.
- **`get-env VAR ?default?`**\
Will fetch an "environment variable"
from the first of either: (1) a KEY=VALUE passed to the configure
script or (2) the system's environment variables. Not to be confused
with `getenv`, which only does the latter and is rarely, if ever,
useful in this tree.
Will fetch an "environment variable" from the first of either: (1) a
KEY=VALUE passed to the configure script or (2) the system's
environment variables. Not to be confused with `getenv`, which only
does the latter and is rarely, if ever, useful in this tree.
- **`proj-get-env VAR ?default?`**\
Works like `get-env` but will, if that function finds no match,
look for a file named `./.env-$VAR` and, if found, return its
@@ -73,8 +72,8 @@ In (mostly) alphabetical order:
- **`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
bar baz?" If no `checkingMsg` is provided, the operation is silent.\
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.
@@ -113,14 +112,16 @@ In (mostly) alphabetical order:
(described below).
- **`sqlite-add-feature-flag ?-shell? FLAG...`**\
Adds the given feature flag to the CFLAGS which are specific to building
the library. It's intended to be passed one or more `-DSQLITE_ENABLE_...`,
or similar, flags. If the `-shell` flag is used then it also passes
its arguments to `sqlite-add-shell-opt`. This is a no-op if `FLAG`
is not provided or is empty.
Adds the given feature flag to the CFLAGS which are specific to
building libsqlite3. It's intended to be passed one or more
`-DSQLITE_ENABLE_...`, or similar, flags. If the `-shell` flag is
used then it also passes its arguments to
`sqlite-add-shell-opt`. This is a no-op if `FLAG` is not provided or
is empty.
- **`sqlite-add-shell-opt FLAG...`**\
The shell-specific counterpart of `sqlite-add-feature-flag`.
The shell-specific counterpart of `sqlite-add-feature-flag` which
only adds the given flag(s) to the CLI-shell-specific CFLAGS.
- **`user-notice msg`**\
Queues `$msg` to be sent to stderr, but does not emit it until
@@ -130,6 +131,7 @@ In (mostly) alphabetical order:
its resulting "yes/no/whatever" message in such a way as to not
spoil the layout of such messages.
<a name="tclcompat"></a>
Ensuring TCL Compatibility
========================================================================
@@ -169,14 +171,14 @@ 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
implementation of `[file-normalize]` (note the dash) for portable use
in the configure script.
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.
<a name="conventions"></a>
@@ -193,7 +195,7 @@ Symbolic Names of Feature Flags
Historically, the project's makefile has exclusively used
`UPPER_UNDERSCORE` form for makefile variables. This build, however,
primarily uses `X.y` format, where `X` is often a category label,
e.g. `CFLAGS` and `y` is the specific instance of that category,
e.g. `CFLAGS`, and `y` is the specific instance of that category,
e.g. `CFLAGS.readline`.
When the configure script exports flags for consumption by filtered
@@ -244,7 +246,7 @@ that approach include:
_after_ the test for zlib because the results of the `-rpath` test
implicitly modified global state which broke the zlib feature
test. Because the feature tests no longer (intentionally) modify
global state, that is not an issue.)
shared global state, that is not an issue.)
In this build, cases where feature tests modify global state in such a
way that it may impact later feature tests are either (A) very
@@ -305,9 +307,9 @@ $ fossil status # show the modified files
```
Unless the upgrade made any incompatible changes (which is exceedingly
rare), that's all there is to it. Then **apply a patch for the change
described in the following section**, test the configure process, and
check it in.
rare), that's all there is to it. After that's done, **apply a patch
for the change described in the following section**, test the
configure process, and check it in.
<a name="patching"></a>
Patching Autosetup for Project-local Changes
@@ -322,6 +324,9 @@ 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.
[Autosetup]: https://msteveb.github.io/autosetup/
+6 -1
View File
@@ -138,7 +138,12 @@ proc proj-indented-notice {args} {
}
set lines [split [join $args] \n]
foreach line $lines {
$outFunc " [string trimleft $line]"
set line [string trimleft $line]
if {"" eq $line} {
$outFunc $line
} else {
$outFunc " $line"
}
}
if {"" ne $fErr} {
show-notices
+1
View File
@@ -3667,6 +3667,7 @@ static void fts5InsttokenFunc(
sqlite3_value **apArg /* Function arguments */
){
assert( nArg==1 );
(void)nArg;
sqlite3_result_value(pCtx, apArg[0]);
sqlite3_result_subtype(pCtx, FTS5_INSTTOKEN_SUBTYPE);
}
+20 -16
View File
@@ -1,19 +1,18 @@
This directory contains source code for the SQLite "ICU" extension, an
integration of the "International Components for Unicode" library with
SQLite. Documentation follows.
1. Features
1.1 SQL Scalars upper() and lower()
1.2 Unicode Aware LIKE Operator
1.3 ICU Collation Sequences
1.4 SQL REGEXP Operator
2. Compilation and Usage
3. Bugs, Problems and Security Issues
3.1 The "case_sensitive_like" Pragma
3.2 The SQLITE_MAX_LIKE_PATTERN_LENGTH Macro
3.3 Collation Sequence Security Issue
@@ -23,10 +22,10 @@ SQLite. Documentation follows.
1.1 SQL Scalars upper() and lower()
SQLite's built-in implementations of these two functions only
SQLite's built-in implementations of these two functions only
provide case mapping for the 26 letters used in the English
language. The ICU based functions provided by this extension
provide case mapping, where defined, for the full range of
provide case mapping, where defined, for the full range of
unicode characters.
ICU provides two types of case mapping, "general" case mapping and
@@ -36,7 +35,7 @@ SQLite. Documentation follows.
http://www.icu-project.org/userguide/caseMappings.html
http://www.icu-project.org/userguide/posix.html#case_mappings
To utilise "general" case mapping, the upper() or lower() scalar
To utilise "general" case mapping, the upper() or lower() scalar
functions are invoked with one argument:
upper('abc') -> 'ABC'
@@ -57,7 +56,7 @@ SQLite. Documentation follows.
operator understands case equivalence for the 26 letters of the English
language alphabet. The implementation of LIKE included in this
extension uses the ICU function u_foldCase() to provide case
independent comparisons for the full range of unicode characters.
independent comparisons for the full range of unicode characters.
The U_FOLD_CASE_DEFAULT flag is passed to u_foldCase(), meaning the
dotless 'I' character used in the Turkish language is considered
@@ -66,9 +65,9 @@ SQLite. Documentation follows.
1.3 ICU Collation Sequences
A special SQL scalar function, icu_load_collation() is provided that
A special SQL scalar function, icu_load_collation() is provided that
may be used to register ICU collation sequences with SQLite. It
is always called with exactly two arguments, the ICU locale
is always called with exactly two arguments, the ICU locale
identifying the collation sequence to ICU, and the name of the
SQLite collation sequence to create. For example, to create an
SQLite collation sequence named "turkish" using Turkish language
@@ -87,7 +86,7 @@ SQLite. Documentation follows.
australian_penpal_name TEXT COLLATE australian,
turkish_penpal_name TEXT COLLATE turkish
);
1.4 SQL REGEXP Operator
This extension provides an implementation of the SQL binary
@@ -116,7 +115,7 @@ SQLite. Documentation follows.
and use it as a dynamically loadable SQLite extension. To do this
using gcc on *nix:
gcc -fPIC -shared icu.c `pkg-config --libs --cflags icu-uc icu-io` \
gcc -fPIC -shared icu.c `pkg-config --libs --cflags icu-io` \
-o libSqliteIcu.so
You may need to add "-I" flags so that gcc can find sqlite3ext.h
@@ -124,6 +123,11 @@ SQLite. Documentation follows.
loaded into sqlite in the same way as any other dynamically loadable
extension.
As of version 3.48, it can be enabled in the canonical build process
by passing one of --with-icu-config or --with-icu-ldflags to the
configure script, optionally together with --enable-icu-collations.
See the configure --help for more details.
3 BUGS, PROBLEMS AND SECURITY ISSUES
@@ -144,13 +148,13 @@ SQLite. Documentation follows.
SQLITE_MAX_LIKE_PATTERN_LENGTH macro as the maximum length of a
pattern in bytes (irrespective of encoding). The default value is
defined in internal header file "limits.h".
The ICU extension LIKE implementation suffers from the same
The ICU extension LIKE implementation suffers from the same
problem and uses the same solution. However, since the ICU extension
code does not include the SQLite file "limits.h", modifying
the default value therein does not affect the ICU extension.
The default value of SQLITE_MAX_LIKE_PATTERN_LENGTH used by
the ICU extension LIKE operator is 50000, defined in source
the ICU extension LIKE operator is 50000, defined in source
file "icu.c".
3.3 Collation Sequence Security
+1 -1
View File
@@ -12,7 +12,7 @@
**
** This SQLite extension implements functions that compute SHA3 hashes
** in the way described by the (U.S.) NIST FIPS 202 SHA-3 Standard.
** Two SQL functions are implemented:
** Three SQL functions are implemented:
**
** sha3(X,SIZE)
** sha3_agg(Y,SIZE)
+2 -2
View File
@@ -637,7 +637,7 @@ static int vfstraceFileControl(sqlite3_file *pFile, int op, void *pArg){
}
if( zArg[0]=='x' && isalpha(zArg[1]) ) zArg++;
for(n=0; isalpha(zArg[n]); n++){}
for(jj=0; jj<sizeof(aKw)/sizeof(aKw[0]); jj++){
for(jj=0; jj<(int)(sizeof(aKw)/sizeof(aKw[0])); jj++){
if( sqlite3_strnicmp(aKw[jj].z,(const char*)zArg,n)==0 ){
if( onOff ){
pInfo->mTrace |= aKw[jj].m;
@@ -796,7 +796,7 @@ static int vfstraceShmLock(sqlite3_file *pFile, int ofst, int n, int flags){
if( flags & ~(0xf) ){
sqlite3_snprintf(sizeof(zLck)-i, &zLck[i], "|0x%x", flags);
}
if( ofst>=0 && ofst<sizeof(azLockName)/sizeof(azLockName[0]) ){
if( ofst>=0 && ofst<(int)(sizeof(azLockName)/sizeof(azLockName[0])) ){
vfstrace_printf(pInfo, "%s.xShmLock(%s,ofst=%d(%s),n=%d,%s)",
pInfo->zVfsName, p->zFName, ofst, azLockName[ofst],
n, &zLck[1]);
+43 -41
View File
@@ -1,11 +1,11 @@
C Simplification\sto\sthe\sfix\sin\sthe\sprior\scheck-in.
D 2024-11-28T02:09:27.502
C Bring\sall\sthe\slatest\strunk\sfixes\sand\senhancements\sinto\sthe\scommit-and-continue\sbranch.
D 2024-12-09T21:01:19.036
F .fossil-settings/empty-dirs dbb81e8fc0401ac46a1491ab34a7f2c7c0452f2f06b54ebb845d024ca8283ef1
F .fossil-settings/ignore-glob 35175cdfcf539b2318cb04a9901442804be81cd677d8b889fcc9149c21f239ea
F LICENSE.md e108e1e69ae8e8a59e93c455654b8ac9356a11720d3345df2a4743e9590fb20d
F Makefile.in 85f2c740cadf969abbd9a6210b8b76636dbf231b9d3efe977b060c3055fac5b9
F Makefile.in 86e81bdb118bf332a27865090b7dce96ddde93c2f1586e1b911569acaa228f19
F Makefile.linux-generic bd3e3cacd369821a6241d4ea1967395c962dfe3057e38cb0a435cee0e8b789d0
F Makefile.msc a92237976eb92c5efaa0dd2524746aec12c196e12df8d4dbff9543a4648c3312
F Makefile.msc f402bb6ea63b44f5143aa3c637aa3f69794cf14b1cc964eb97c4f53124198561
F README.md c3c0f19532ce28f6297a71870f3c7b424729f0e6d9ab889616d3587dd2332159
F VERSION 8dc0c3df15fd5ff0622f88fc483533fce990b1cbb2f5fb9fdfb4dbd71eef2889
F art/icon-243x273.gif 9750b734f82fdb3dc43127753d5e6fbf3b62c9f4e136c2fbf573b2f57ea87af5
@@ -13,11 +13,12 @@ F art/icon-80x90.gif 65509ce3e5f86a9cd64fe7fca2d23954199f31fe44c1e09e208c80fb83d
F art/sqlite370.eps aa97a671332b432a54e1d74ff5e8775be34200c2
F art/sqlite370.ico af56c1d00fee7cd4753e8631ed60703ed0fc6e90
F art/sqlite370.jpg d512473dae7e378a67e28ff96a34da7cb331def2
F auto.def 961d2cf22b65d31f9eb97470b50cbbdca34b999cf86f438811c1ec214b296b8b
F art/sqlite370.svg 40b7e2fe8aac3add5d56dd86ab8d427a4eca5bcb3fe4f8946cb3794e1821d531
F auto.def 8f15c373e88c4c5296d6100e3d35893bd6edb57cebcb6a8c1e827e6faaef52e4
F autoconf/INSTALL 83e4a25da9fd053c7b3665eaaaf7919707915903
F autoconf/Makefile.am adedc1324b6a87fdd1265ddd336d2fb7d4f36a0e77b86ea553ae7cc4ea239347
F autoconf/Makefile.fallback 22fe523eb36dfce31e0f6349f782eb084e86a5620b2b0b4f84a2d6133f53f5ac
F autoconf/Makefile.msc 1162ef7b7937ba6927b038f824b050855784d417e785fe35ab71d20afd18022b
F autoconf/Makefile.msc 0735351f6002f0bf78b73b3b7a6a120cff38573dd37c37005b682ecc44c25bc2
F autoconf/README.first 6c4f34fe115ff55d4e8dbfa3cecf04a0188292f7
F autoconf/README.txt 5e946ffb6fbdbb114c81e1bdc862df27fce8beab557d7b0421820b0fe8fc048f
F autoconf/configure.ac ec7fa914c5e74ff212fe879f9bb6918e1234497e05facfb641f30c4d5893b277
@@ -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 083b4417637f134875709dfa8ca149ce9b3634725b65e0f7d9b96f2bf56caa3a
F autosetup/README.md 1a02f5a94fd460eb7ffc8dea5d6f1657e38ddf8ffa2d6c5dce9a630b97021a69
F autosetup/autosetup df8b53928b1fe3c67db5bc77c8e1eb8160c1b6a26c370e9a06c68748f803b7e4 x
F autosetup/autosetup-config.guess dfa101c5e8220e864d5e9c72a85e87110df60260d36cb951ad0a85d6d9eaa463 x
F autosetup/autosetup-config.sub a38fb074d0dece01cf919e9fb534a26011608aa8fa606490864295328526cd73 x
@@ -49,7 +50,7 @@ F autosetup/cc-shared.tcl 4f024e94a47f427ba61de1739f6381ef0080210f9fae89112d5c1d
F autosetup/cc.tcl c0fcc50ca91deff8741e449ddad05bcd08268bc31177e613a6343bbd1fd3e45f
F autosetup/jimsh0.c d40e381ea4526a067590e7b91bd4b2efa6d4980d286f908054c647b3df4aee14
F autosetup/pkg-config.tcl 4e635bf39022ff65e0d5434339dd41503ea48fc53822c9c5bde88b02d3d952ba
F autosetup/proj.tcl 22556a325c964aa5377d4d881722385f41fcd7c1b60102ba8965f7814c83e9ce
F autosetup/proj.tcl 2e817159b997077cb79bd871f6255276b787558f386dfc0830b0f825f6a53767
F autosetup/system.tcl 51d4be76cd9a9074704b584e5c9cbba616202c8468cf9ba8a4f8294a7ab1dba9
F configure 9a00b21dfd13757bbfb8d89b30660a89ec1f8f3a79402b8f9f9b6fc475c3303a x
F contrib/sqlitecon.tcl 210a913ad63f9f991070821e599d600bd913e0ad
@@ -111,7 +112,7 @@ F ext/fts5/fts5_config.c e7d8dd062b44a66cd77e5a0f74f23a2354cd1f3f8575afb967b2773
F ext/fts5/fts5_expr.c 69b8d976058512c07dfe86e229521b7a871768157bd1607cedf1a5038dfd72c9
F ext/fts5/fts5_hash.c adda4272be401566a6e0ba1acbe70ee5cb97fce944bc2e04dc707152a0ec91b1
F ext/fts5/fts5_index.c cef6791bd9f9db4305494292d6dd5d24a7379aabf370a4d6b559e16b740fa88e
F ext/fts5/fts5_main.c a4f6a46e5ede02d40fc23655d3de37e55f75210ae3856b2b518a2295d3331543
F ext/fts5/fts5_main.c 72527efa1d634054b93a21eafe854763cbc5c270e8a4ab99bbb589557b818482
F ext/fts5/fts5_storage.c 337b05e4c66fc822d031e264d65bde807ec2fab08665ca2cc8aaf9c5fa06792c
F ext/fts5/fts5_tcl.c 7fb5a3d3404099075aaa2457307cb459bbc257c0de3dbd52b1e80a5b503e0329
F ext/fts5/fts5_test_mi.c 08c11ec968148d4cb4119d96d819f8c1f329812c568bac3684f5464be177d3ee
@@ -270,7 +271,7 @@ F ext/fts5/tool/fts5txt2db.tcl c0d43c8590656f8240e622b00957b3a0facc49482411a9fdc
F ext/fts5/tool/loadfts5.tcl 95b03429ee6b138645703c6ca192c3ac96eaf093
F ext/fts5/tool/mkfts5c.tcl 135b9e160f8e10211c10c5873d5e8c3eaebd3da9ec56a12ae4db157d4738ffe4
F ext/fts5/tool/showfts5.tcl d54da0e067306663e2d5d523965ca487698e722c
F ext/icu/README.txt 7ab7ced8ae78e3a645b57e78570ff589d4c672b71370f5aa9e1cd7024f400fc9
F ext/icu/README.txt 1f8d76e10d2385fc77914a14ccd99acfbaf68111dfcf26a360ad9063787f57fb
F ext/icu/icu.c 9837f4611915baad1edbe38222f3ee7d1b5e118ab16fec9ba603720f72c78b2a
F ext/icu/sqliteicu.h fa373836ed5a1ee7478bdf8a1650689294e41d0c89c1daab26e9ae78a32075a8
F ext/intck/intck1.test f3a3cba14b6aeff145ffa5515546dd22f7510dad91512e519f43b92b56514012
@@ -436,7 +437,7 @@ F ext/misc/rot13.c 51ac5f51e9d5fd811db58a9c23c628ad5f333c173f1fc53c8491a3603d385
F ext/misc/scrub.c 2a44b0d44c69584c0580ad2553f6290a307a49df4668941d2812135bfb96a946
F ext/misc/series.c cbdda2e2eb8159a1331974d246984c6e2693c6ea93930e6165046c8dbb8db0e9
F ext/misc/sha1.c cb5002148c2661b5946f34561701e9105e9d339b713ec8ac057fd888b196dcb9
F ext/misc/shathree.c 1821d90a0040c9accdbe3e3527d378d30569475d758aa70f6848924c0b430e8c
F ext/misc/shathree.c f3a778f27bf3e71b666a77f28e463a3b931c4dbe4219447e61bb678b4bc121c3
F ext/misc/showauth.c 732578f0fe4ce42d577e1c86dc89dd14a006ab52
F ext/misc/spellfix.c bcc42ef3fd29429bc01a83e751332b8d4690e65d45008449bdffe7656371487f
F ext/misc/sqlar.c a6175790482328171da47095f87608b48a476d4fac78d8a9ff18b03a2454f634
@@ -452,7 +453,7 @@ F ext/misc/urifuncs.c f71360d14fa9e7626b563f1f781c6148109462741c5235ac63ae0f8917
F ext/misc/uuid.c 5bb2264c1b64d163efa46509544fd7500cb8769cb7c16dd52052da8d961505cf
F ext/misc/vfslog.c 3932ab932eeb2601dbc4447cb14d445aaa9fbe43b863ef5f014401c3420afd20
F ext/misc/vfsstat.c a85df08654743922a19410d7b1e3111de41bb7cd07d20dd16eda4e2b808d269d
F ext/misc/vfstrace.c 2f68da859f87be350ede0e8eb94f754219d406161c1595250fc0ca55907460f6
F ext/misc/vfstrace.c 4d8b39570cbede1a05928c77e2142f8a744468443bf649cf86da3924e5e60fca
F ext/misc/vtablog.c 1100250ce8782db37c833e3a9a5c9a3ecf1af5e15b8325572b82e6e0a138ffb5
F ext/misc/vtshim.c 1976e6dd68dd0d64508c91a6dfab8e75f8aaf6cd
F ext/misc/wholenumber.c 0fa0c082676b7868bf2fa918e911133f2b349bcdceabd1198bba5f65b4fc0668
@@ -718,15 +719,15 @@ F src/btmutex.c 79a43670447eacc651519a429f6ece9fd638563cf95b469d6891185ddae2b522
F src/btree.c 63ca6b647342e8cef643863cd0962a542f133e1069460725ba4461dcda92b03c
F src/btree.h 18e5e7b2124c23426a283523e5f31a4bff029131b795bb82391f9d2f3136fc50
F src/btreeInt.h 98aadb6dcb77b012cab2574d6a728fad56b337fc946839b9898c4b4c969e30b6
F src/build.c c6b09342d870a509529244ed8e19b4175a261f2e3163c199241d69e1d8a57607
F src/build.c a933062f4bf848e67993adb20d587cc13de8e987fdb4e0e7191926ef3741278f
F src/callback.c db3a45e376deff6a16c0058163fe0ae2b73a2945f3f408ca32cf74960b28d490
F src/complete.c a3634ab1e687055cd002e11b8f43eb75c17da23e
F src/ctime.c d35723024b963edce9c0fad5b3303e8bb9266083784844baed10a6dedfe26f3b
F src/date.c 89ce1ff20512a7fa5070ba6e7dd5c171148ca7d580955795bf97c79c2456144a
F src/dbpage.c db1be8adaf1f839ad733c08baeac5c22aa912f7b535865c0c061382602081360
F src/dbpage.c 6c52074b0edb914d526c85541ca0f1fd23822b5dac39b6ee9b7f375d9fa592e9
F src/dbstat.c 73362c0df0f40ad5523a6f5501224959d0976757b511299bf892313e79d14f5c
F src/delete.c 03a77ba20e54f0f42ebd8eddf15411ed6bdb06a2c472ac4b6b336521bf7cea42
F src/expr.c b838969c58a38dfedabec18c432204895c7333d7a509a20fa63c39bf92001f0e
F src/expr.c ae41eb87e73a7b2e8748b0cf1e8e1d6b2e57fcb9abd093ef3da78f16fed36f33
F src/fault.c 460f3e55994363812d9d60844b2a6de88826e007
F src/fkey.c 928ed2517e8732113d2b9821aa37af639688d752f4ea9ac6e0e393d713eeb76f
F src/func.c 49489dcce46d2d491cedb451e974264150c473e5f5bba448498a9aa4c1993537
@@ -739,7 +740,7 @@ F src/insert.c f8d1a0f8ee258411009c6b7f2d93170e351bd19f5ad89d57e1180644297cbe70
F src/json.c 68a98c020c22127f2d65f08855f7fc7460ff352a6ce0b543d8931dde83319c22
F src/legacy.c d7874bc885906868cd51e6c2156698f2754f02d9eee1bae2d687323c3ca8e5aa
F src/loadext.c 7432c944ff197046d67a1207790a1b13eec4548c85a9457eb0896bb3641dfb36
F src/main.c efacea3a809ba236233c4bc7648e623c28cb5fd1e1a343e74fe772005f142d8c
F src/main.c 9be9c058d0f0028230f2f06a45c1ff6edc6e6e2edc57e088296677c677dbf1bc
F src/malloc.c 410e570b30c26cc36e3372577df50f7a96ee3eed5b2b161c6b6b48773c650c5e
F src/mem0.c 6a55ebe57c46ca1a7d98da93aaa07f99f1059645
F src/mem1.c 3bb59158c38e05f6270e761a9f435bf19827a264c13d1631c58b84bdc96d73b2
@@ -763,31 +764,31 @@ F src/os_setup.h 6011ad7af5db4e05155f385eb3a9b4470688de6f65d6166b8956e58a3d87210
F src/os_unix.c d2edbd92b07a3f778c2defa8a2e9d75acceb6267bda56948c41e8cdda65224d6
F src/os_win.c 49c7725b500f5867e8360e75eeb30f9d70b62fa1f05c8a101da627210578df32
F src/os_win.h 7b073010f1451abe501be30d12f6bc599824944a
F src/pager.c 9656ad4e8331efb8a4f94f7a0c6440b98caea073950a367ea0c728a53b8e62c9
F src/pager.h 4b1140d691860de0be1347474c51fee07d5420bd7f802d38cbab8ea4ab9f538a
F src/parse.y dcf45a81b61223ac93e61fdfe9b22d635dd371c446e8222634d90aa37e25e5f6
F src/pager.c d29770208271df2adbd96bc5d353aba74f84bbd79926734e9d4d4a081556439a
F src/pager.h 4637ae0c299215d7ed3b54e379123b518e101c0453faa2d0f7db29cb23525cee
F src/parse.y 2b2b7a96e46dff37b85b0476cc2f6c58e61f0ba007928c4121ac726adcae497b
F src/pcache.c 588cc3c5ccaaadde689ed35ce5c5c891a1f7b1f4d1f56f6cf0143b74d8ee6484
F src/pcache.h 1497ce1b823cf00094bb0cf3bac37b345937e6f910890c626b16512316d3abf5
F src/pcache1.c 49516ad7718a3626f28f710fa7448ef1fce3c07fd169acbb4817341950264319
F src/pragma.c a2ec3657a953fa7dea7c1e680e4358b6ce6ae570b6c5234e0f5ef219d308d223
F src/pragma.c 767accbbbe53f6bacd05d35cfe2b3e6b830b01719010e8c684cb8b126dbad46e
F src/pragma.h e690a356c18e98414d2e870ea791c1be1545a714ba623719deb63f7f226d8bb7
F src/prepare.c 1832be043fce7d489959aae6f994c452d023914714c4d5457beaed51c0f3d126
F src/printf.c 96f7f8baeedc7639da94e4e7a4a2c200e2537c4eec9e5e1c2ffc821f40eb3105
F src/random.c 606b00941a1d7dd09c381d3279a058d771f406c5213c9932bbd93d5587be4b9c
F src/resolve.c c8a5372b97b2a2e972a280676f06ddb5b74e885d3b1f5ce383f839907b57ef68
F src/rowset.c 8432130e6c344b3401a8874c3cb49fefe6873fec593294de077afea2dce5ec97
F src/select.c 4b14337a2742f0c0beeba490e9a05507e9b4b12184b9cd12773501d08d48e3fe
F src/shell.c.in 7aa68b305246391984c48f10725416079394a64bf0349fa4087d835c41ef733d
F src/sqlite.h.in 4d93768709c53b7c653a63817a82d5a8625264ca0d8cdf99967ba147bdcf2aa6
F src/select.c 1c2b2321e1658e02f96da96d3071abcaa6839a1d75edd960a75a0ab11b6041bb
F src/shell.c.in aefeced3bc11bc3d2e7b31f14435c7ebc36527f0e3289ed14c64cf0755ccb741
F src/sqlite.h.in 236595e722c256189cfba479dc7c45753665e6d4ae5c2281fb7731b045f92629
F src/sqlite3.rc 5121c9e10c3964d5755191c80dd1180c122fc3a8
F src/sqlite3ext.h 3f046c04ea3595d6bfda99b781926b17e672fd6d27da2ba6d8d8fc39981dcb54
F src/sqliteInt.h 77be043f8694f4a8702d0ee882022b2e5a6489a0493e77c5d9a73f1efc5a2cc1
F src/sqliteInt.h 0e5e4a3cadda1a1dadedd990093ad33d0e898f5b9bcb756f7765a835887708e4
F src/sqliteLimit.h 6993c9cfe3af5b8169ae0e5f15627fc15596726d4f1dc90a221309f79715ce88
F src/status.c cb11f8589a6912af2da3bb1ec509a94dd8ef27df4d4c1a97e0bcf2309ece972b
F src/table.c 0f141b58a16de7e2fbe81c308379e7279f4c6b50eb08efeec5892794a0ba30d1
F src/tclsqlite.c 1c2f697cb12a1d49f5e0b448327f7cf614809423bb43753b2d97f87354298113
F src/tclsqlite.c 90441d3cc16f966a23499d9096a3d2d971e5e8fddb4d1413b096b79c2b2cff07
F src/tclsqlite.h 65e2c761446e1c9fa0342b7d2612a703483643c8b6a316d12a65b745a4727395
F src/test1.c 2d507751bfb4aa254dc22588ef1e3c5c5cfcb2e636d0e6e1fa0bbd307669c2a8
F src/test1.c cbf1c6ca9df2755b86808a671e1b03a787dc18cde9f7f3bfffd03da236f1173b
F src/test2.c 7ebc518e6735939d8979273a6f7b1d9b5702babf059f6ad62499f7f60a9eb9a3
F src/test3.c e7573aa0f78ee4e070a4bc8c3493941c1aa64d5c66d4825c74c0f055451f432b
F src/test4.c 13e57ae7ec7a959ee180970aef09deed141252fe9bb07c61054f0dfa4f1dfd5d
@@ -837,16 +838,16 @@ F src/test_windirent.h da2e5b73c32d09905fbdd00f27cd802212a32a58ead882736fe4f5eb7
F src/test_window.c 6d80e11fba89a1796525e6f0048ff0c7789aa2c6b0b11c80827dc1437bd8ea72
F src/test_wsd.c 41cadfd9d97fe8e3e4e44f61a4a8ccd6f7ca8fe9
F src/threads.c 4ae07fa022a3dc7c5beb373cf744a85d3c5c6c3c
F src/tokenize.c 3f703cacdab728d7741e5a6ac242006d74fe1c2754d4f03ed889d7253259bd68
F src/treeview.c 4eeb155abefd88a60d0c37cc00bcfac38a8dd566970f019e4af7e02672ee2599
F src/tokenize.c fe17e03175cae35b6694d0f879e7bc3d1ddea2fd4ab148cba9bbd025b7a7bb12
F src/treeview.c 921392561385e05ef5703f20a7a72f0a0a45c1fb749558d7467fae2c3f525006
F src/trigger.c 0bb986a5b96047fd597c6aac28588853df56064e576e6b81ba777ef2ccaac461
F src/update.c 0e01aa6a3edf9ec112b33eb714b9016a81241497b1fb7c3e74332f4f71756508
F src/upsert.c 215328c3f91623c520ec8672c44323553f12caeb4f01b1090ebdca99fdf7b4f1
F src/utf.c 8b29d9a5956569ea2700f869669b8ef67a9662ee5e724ff77ab3c387e27094ba
F src/util.c ceebf912f673247e305f16f97f0bb7285fca1d37413b79680714a553a9021d33
F src/util.c e5f6a5eeaa26b69054a43bbd0048cfe3d2851f6961052b35aed8f695df922850
F src/vacuum.c b763b6457bd058d2072ef9364832351fd8d11e8abf70cbb349657360f7d55c40
F src/vdbe.c 8a6eb02823b424b273614bae41579392a5c495424592b60423dd2c443a583df0
F src/vdbe.h c2549a215898a390de6669cfa32adba56f0d7e17ba5a7f7b14506d6fd5f0c36a
F src/vdbe.c 0bcfd21c45c6af8e51ecec9ca10df2a00f5662a1f646aa0874b0ab791e7da8f3
F src/vdbe.h 9676348d342bd04e21e384c63b57224171ce84fac77853357334ef94c4d33cf4
F src/vdbeInt.h 2da01c73e8e3736a9015d5b04aa04d209bc9023d279d237d4d409205e921ea1e
F src/vdbeapi.c 6353de05e8e78e497ccb33381ba5662ccc11c0339e5b1455faff01b6dacc3075
F src/vdbeaux.c f0706ad786b8a6c5bc7ea622f3916c2ba2b883abc872d0b4911c4f021945c0e5
@@ -857,10 +858,10 @@ F src/vdbetrace.c fe0bc29ebd4e02c8bc5c1945f1d2e6be5927ec12c06d89b03ef2a4def34bf8
F src/vdbevtab.c fc46b9cbd759dc013f0b3724549cc0d71379183c667df3a5988f7e2f1bd485f3
F src/vtab.c 316cd48e9320660db3047cd306cd056e4361180cebb4d0f10a39244e10c11422
F src/vxworks.h d2988f4e5a61a4dfe82c6524dd3d6e4f2ce3cdb9
F src/wal.c 8b7e309a8012659ac9275ad8cdcc6acaf73fa04b1090e38a01335f230fd10681
F src/wal.h ba252daaa94f889f4b2c17c027e823d9be47ce39da1d3799886bbd51f0490452
F src/wal.c 73064f1e2d1776cdfb6f6d12943888d83d2f3ab63e76ff2f13a992311def9ca8
F src/wal.h a1ec57934aa26c23805e00ddbc0cd5da5760028d3608d882647345de2e330a3e
F src/walker.c d5006d6b005e4ea7302ad390957a8d41ed83faa177e412f89bc5600a7462a014
F src/where.c b34adb09fdb2a4f57a0bafd4194b501047ef383976fef9f0ac3f395f4881694d
F src/where.c 377f3363983251ec6b23aad5a3963822199d9bff2ad4072a5e006959ee5a2abb
F src/whereInt.h 1e36ec50392f7cc3d93d1152d4338064cd522b87156a0739388b7e273735f0ca
F src/wherecode.c 0c3d3199a2b769a5e2bb70feb5003dc85b3d86842ecaf903a47f2b4205ca5dab
F src/whereexpr.c 0f93a29cabd3a338d09a1f5c6770620a1ac51ec1157f3229502a7e7767c60b6f
@@ -909,7 +910,7 @@ F test/analyzeE.test d2ec7921c162cdc33ac8e7eb01f9ebf78100610af7c94c8552bbf551de1
F test/analyzeF.test 40b5cc3ad7b10e81020d7ca86f1417647ecfae7477cfd88acc5aa7ae1068f949
F test/analyzeG.test 623be33038c49648872746c8dd8b23b5792c08fef173c55e82f1b12fca259852
F test/analyzer1.test 459fa02c445ddbf0101a3bad47b34290a35f2e49
F test/atof1.test 7ec56debc04b32e8f9dc87239f4bbb07d84550fb83dd7475b0ead9e83beb35da
F test/atof1.test bd21c4a0e718ab1470de07a2a79f2544d7903be34feebcc80de04beee4807b00
F test/atomic.test 065a453dde33c77ff586d91ccaa6ed419829d492dbb1a5694b8a09f3f9d7d061
F test/atomic2.test b6863b4aa552543874f80b42fb3063f1c8c2e3d8e56b6562f00a3cc347b5c1da
F test/atrc.c c388fac43dbba05c804432a7135ae688b32e8f25818e9994ffba4b64cf60c27c
@@ -1531,7 +1532,7 @@ F test/pg_common.tcl 3b27542224db1e713ae387459b5d117c836a5f6e328846922993b6d2b76
F test/pragma.test 11cb9310c42f921918f7f563e3c0b6e70f9f9c3a6a1cf12af8fccb6c574f3882
F test/pragma2.test e5d5c176360c321344249354c0c16aec46214c9f
F test/pragma3.test 92a46bbea12322dd94a404f49edcfbfc913a2c98115f0d030a7459bb4712ef31
F test/pragma4.test f93f317693e90ece4ed0f5505d9035cae03f9fc684b718278433f2e48703f693
F test/pragma4.test 336b99c2a9fd35af3cc6da94f794b4cba09bbdb18f0ecbd3f734bb6bb8e1c15c
F test/pragma5.test 7b33fc43e2e41abf17f35fb73f71b49671a380ea92a6c94b6ce530a25f8d9102
F test/pragma6.test c5ec577ba087954b4dfa619a3cbe97b155b60a0af487527abe89b10fc17e6512
F test/pragmafault.test 275edaf3161771d37de60e5c2b412627ac94cef11739236bec12ed1258b240f8
@@ -1540,7 +1541,7 @@ F test/printf.test 685fec5a0c5af2490ab0632775a301554361d674211d690f5bee0a97b0533
F test/printf2.test 3f55c1871a5a65507416076f6eb97e738d5210aeda7595a74ee895f2224cce60
F test/progress.test ebab27f670bd0d4eb9d20d49cef96e68141d92fb
F test/ptrchng.test ef1aa72d6cf35a2bbd0869a649b744e9d84977fc
F test/pushdown.test 84b525767442b3695d671f9df59dd91cf0ed8fb24cbbcdc55959f0dadeee8b39
F test/pushdown.test 46a626ef1c0ca79b85296ff2e078b9da20a50e9b804b38f441590c3987580ddd
F test/queryonly.test 5f653159e0f552f0552d43259890c1089391dcca
F test/quick.test 1681febc928d686362d50057c642f77a02c62e57
F test/quickcheck.test a4b7e878cd97e46108291c409b0bf8214f29e18fddd68a42bc5c1375ad1fb80a
@@ -1606,7 +1607,7 @@ F test/select2.test 352480e0e9c66eda9c3044e412abdf5be0215b56
F test/select3.test 180223af31e1ca5537dd395ef9708ae18e651a233777fd366fd0d75469fc19c6
F test/select4.test f0684d3da3bccacbe2a1ebadf6fb49d9df6f53acb4c6ebc228a88d0d6054cc7b
F test/select5.test 8afc5e5dcdebc2be54472e73ebd9cd1adef1225fd15d37a1c62f969159f390ae
F test/select6.test 9b2fb4ffedf52e1b5703cfcae1212e7a4a063f014c0458d78d29aca3db766d1f
F test/select6.test d455cc36cb5658ba7002ccbf23d3d392801403e64ac6516190266a8ce167ad39
F test/select7.test b825420da8a0b5722fdb77f3369f6396a3d198c46e8787eb26ff9425d4ac9d27
F test/select8.test 8c8f5ae43894c891efc5755ed905467d1d67ad5d
F test/select9.test f7586b207ce2304ab80dc93d3146469a28fd4403621dd3a82d06644563d3c812
@@ -1891,6 +1892,7 @@ F test/trace3.test 4f418ed30d15d9d17dcf13a17f0bd99a92e3038e038798e35db7525f82f4c
F test/trans.test 45f6f9ab6f66a7b5744f1caac06b558f95da62501916906cf55586a896f9f439
F test/trans2.test 62bd045bfc7a1c14c5ba83ba64d21ade31583f76
F test/trans3.test 91a100e5412b488e22a655fe423a14c26403ab94
F test/trans4.test ad936cefc84775723976ca1acb3cfc16e07f7769468b74366299758e0c2ad317
F test/transitive1.test f8ee983600b33d167da1885657f064aec404e1c0d0bc8765fdf163f4c749237a
F test/trigger1.test 2834f8830a1ae338d95c2e3ea0c2a7bc4cda126cdeb715004cf0fd071892e44f
F test/trigger2.test 30fcb3a6aa6782020d47968735ee6086ed795f73a7affa9406c8d5a36e7b5265
@@ -2201,8 +2203,8 @@ F tool/version-info.c 3b36468a90faf1bbd59c65fd0eb66522d9f941eedd364fabccd7227350
F tool/warnings-clang.sh bbf6a1e685e534c92ec2bfba5b1745f34fb6f0bc2a362850723a9ee87c1b31a7
F tool/warnings.sh 49a486c5069de041aedcbde4de178293e0463ae9918ecad7539eedf0ec77a139
F tool/win/sqlite.vsix deb315d026cc8400325c5863eef847784a219a2f
P df95d5209a77c0302e08ea7b1f248646fb2a062ba5beca898678aee0a1d03a3a
R 2a463ba8c7e54a6e85c2163c1e1ce03b
P c71acee1cf45abf0429e8b1668315c75b155d7c300d53833aeacd92c9bb3395d e2bae4143afd07de1ae55a6d2606a3b541a5b94568aa41f6a96e5d1245471653
R 15bda62d46b0272a5326f52c641b86fe
U drh
Z 5b8128e8d052469f340725fed84274b9
Z 03e29135673c9b0005ee6ad7dd6831df
# Remove this line to create a well-formed Fossil manifest.
+1 -1
View File
@@ -1 +1 @@
f79cb748c9447ca4d2184a24219feb19571eb79870e0bedf14704743a3d5f8b9
19e47df37a1ab76625de4a9643e78d2ab8d1241c9fb58ca2f9e3708622050d10
+12 -1
View File
@@ -5198,6 +5198,7 @@ void sqlite3BeginTransaction(Parse *pParse, int type){
int i;
assert( pParse!=0 );
assert( type==TK_DEFERRED || type==TK_IMMEDIATE || type==TK_EXCLUSIVE );
db = pParse->db;
assert( db!=0 );
if( sqlite3AuthCheck(pParse, SQLITE_TRANSACTION, "BEGIN", 0, 0) ){
@@ -5227,14 +5228,20 @@ void sqlite3BeginTransaction(Parse *pParse, int type){
** Generate VDBE code for a COMMIT or ROLLBACK statement.
** Code for ROLLBACK is generated if eType==TK_ROLLBACK. Otherwise
** code is generated for a COMMIT.
**
** If bContinueTrans is true, then do the COMMIT so that past changes are
** made permanent and visible to readers, but hold on to the write lock
** and start a new transaction, without allowing any other database
** connections to do a write or checkpoint.
*/
void sqlite3EndTransaction(Parse *pParse, int eType){
void sqlite3EndTransaction(Parse *pParse, int eType, int bContinueTrans){
Vdbe *v;
int isRollback;
assert( pParse!=0 );
assert( pParse->db!=0 );
assert( eType==TK_COMMIT || eType==TK_END || eType==TK_ROLLBACK );
assert( bContinueTrans==0 || bContinueTrans==1 );
isRollback = eType==TK_ROLLBACK;
if( sqlite3AuthCheck(pParse, SQLITE_TRANSACTION,
isRollback ? "ROLLBACK" : "COMMIT", 0, 0) ){
@@ -5243,6 +5250,10 @@ void sqlite3EndTransaction(Parse *pParse, int eType){
v = sqlite3GetVdbe(pParse);
if( v ){
sqlite3VdbeAddOp2(v, OP_AutoCommit, 1, isRollback);
if( bContinueTrans ){
sqlite3VdbeChangeP5(v, 0x01);
sqlite3BeginTransaction(pParse, TK_IMMEDIATE);
}
}
}
+2
View File
@@ -393,6 +393,8 @@ static int dbpageUpdate(
memcpy(aPage, pData, szPage);
pTab->pgnoTrunc = 0;
}
}else{
pTab->pgnoTrunc = 0;
}
sqlite3PagerUnref(pDbPage);
return rc;
+6 -2
View File
@@ -2646,7 +2646,7 @@ static int sqlite3ExprIsTableConstant(Expr *p, int iCur, int bAllowSubq){
** (4a) pExpr must come from an ON clause..
** (4b) and specifically the ON clause associated with the LEFT JOIN.
**
** (5) If pSrc is not the right operand of a LEFT JOIN or the left
** (5) If pSrc is the right operand of a LEFT JOIN or the left
** operand of a RIGHT JOIN, then pExpr must be from the WHERE
** clause, not an ON clause.
**
@@ -6478,9 +6478,13 @@ static int sqlite3ExprIsIIF(sqlite3 *db, const Expr *pExpr){
if( (z[0]!='i' && z[0]!='I') ) return 0;
if( pExpr->x.pList==0 ) return 0;
pDef = sqlite3FindFunction(db, z, pExpr->x.pList->nExpr, ENC(db), 0);
#ifdef SQLITE_ENABLE_UNKNOWN_SQL_FUNCTION
if( pDef==0 ) return 0;
#else
if( NEVER(pDef==0) ) return 0;
#endif
if( (pDef->funcFlags & SQLITE_FUNC_INLINE)==0 ) return 0;
if( NEVER(SQLITE_PTR_TO_INT(pDef->pUserData)!=INLINEFUNC_iif) ) return 0;
if( SQLITE_PTR_TO_INT(pDef->pUserData)!=INLINEFUNC_iif ) return 0;
}else if( pExpr->op==TK_CASE ){
if( pExpr->pLeft!=0 ) return 0;
}else{
+1
View File
@@ -980,6 +980,7 @@ int sqlite3_db_config(sqlite3 *db, int op, ...){
{ SQLITE_DBCONFIG_TRUSTED_SCHEMA, SQLITE_TrustedSchema },
{ SQLITE_DBCONFIG_STMT_SCANSTATUS, SQLITE_StmtScanStatus },
{ SQLITE_DBCONFIG_REVERSE_SCANORDER, SQLITE_ReverseOrder },
{ SQLITE_DBCONFIG_CONTINUE_TRANSACTION, SQLITE_OkContTrans },
};
unsigned int i;
rc = SQLITE_ERROR; /* IMP: R-42790-23372 */
+19 -1
View File
@@ -643,6 +643,7 @@ struct Pager {
*/
u8 eState; /* Pager state (OPEN, READER, WRITER_LOCKED..) */
u8 eLock; /* Current lock held on database file */
u8 bHoldWrLock; /* Do not release write locks while true */
u8 changeCountDone; /* Set after incrementing the change-counter */
u8 setSuper; /* Super-jrnl name is written into jrnl */
u8 doNotSpill; /* Do not spill the cache when non-zero */
@@ -1145,15 +1146,16 @@ static int pagerUnlockDb(Pager *pPager, int eLock){
assert( !pPager->exclusiveMode || pPager->eLock==eLock );
assert( eLock==NO_LOCK || eLock==SHARED_LOCK );
assert( eLock!=NO_LOCK || pagerUseWal(pPager)==0 );
pPager->changeCountDone = pPager->tempFile; /* ticket fb3b3024ea238d5c */
if( isOpen(pPager->fd) ){
assert( pPager->eLock>=eLock );
if( pPager->bHoldWrLock ) return SQLITE_OK;
rc = pPager->noLock ? SQLITE_OK : sqlite3OsUnlock(pPager->fd, eLock);
if( pPager->eLock!=UNKNOWN_LOCK ){
pPager->eLock = (u8)eLock;
}
IOTRACE(("UNLOCK %p %d\n", pPager, eLock))
}
pPager->changeCountDone = pPager->tempFile; /* ticket fb3b3024ea238d5c */
return rc;
}
@@ -5365,6 +5367,7 @@ int sqlite3PagerSharedLock(Pager *pPager){
assert( pPager->eState==PAGER_OPEN );
assert( (pPager->eLock==SHARED_LOCK)
|| (pPager->exclusiveMode && pPager->eLock>SHARED_LOCK)
|| (pPager->bHoldWrLock && pPager->eLock>=SHARED_LOCK)
);
}
@@ -6887,6 +6890,21 @@ int sqlite3PagerIsMemdb(Pager *pPager){
return pPager->tempFile || pPager->memVfs;
}
/*
** In all pagers associated with db, set or clear the bHoldWrLock
** flag.
*/
void sqlite3PagerHoldWrLock(sqlite3 *db, u8 bOnOff){
int iDb;
Pager *pPager;
for(iDb=0; iDb<db->nDb; iDb++){
if( db->aDb[iDb].pBt==0 ) continue;
pPager = sqlite3BtreePager(db->aDb[iDb].pBt);
pPager->bHoldWrLock = bOnOff;
if( pPager->pWal ) sqlite3WalHoldWrLock(pPager->pWal, bOnOff);
}
}
/*
** Check that there are at least nSavepoint savepoints open. If there are
** currently less than nSavepoints open, then open one or more savepoints
+1
View File
@@ -218,6 +218,7 @@ void *sqlite3PagerTempSpace(Pager*);
int sqlite3PagerIsMemdb(Pager*);
void sqlite3PagerCacheStat(Pager *, int, int, u64*);
void sqlite3PagerClearCache(Pager*);
void sqlite3PagerHoldWrLock(sqlite3*,u8);
int sqlite3SectorSize(sqlite3_file *);
/* Functions used to truncate the database file. */
+16 -2
View File
@@ -176,8 +176,10 @@ transtype(A) ::= . {A = TK_DEFERRED;}
transtype(A) ::= DEFERRED(X). {A = @X; /*A-overwrites-X*/}
transtype(A) ::= IMMEDIATE(X). {A = @X; /*A-overwrites-X*/}
transtype(A) ::= EXCLUSIVE(X). {A = @X; /*A-overwrites-X*/}
cmd ::= COMMIT|END(X) trans_opt. {sqlite3EndTransaction(pParse,@X);}
cmd ::= ROLLBACK(X) trans_opt. {sqlite3EndTransaction(pParse,@X);}
cmd ::= ROLLBACK(X) trans_opt. {sqlite3EndTransaction(pParse,@X,0);}
cmd ::= COMMIT(X) trans_opt. {sqlite3EndTransaction(pParse,@X,0);}
cmd ::= END(X) trans_opt. {sqlite3EndTransaction(pParse,@X,0);}
// See also the COMMIT AND CONTINUE TRANSACTION section below
savepoint_opt ::= SAVEPOINT.
savepoint_opt ::= .
@@ -481,6 +483,18 @@ resolvetype(A) ::= raisetype(A).
resolvetype(A) ::= IGNORE. {A = OE_Ignore;}
resolvetype(A) ::= REPLACE. {A = OE_Replace;}
////////////////////////// COMMIT AND CONTINUE TRANSACTION ////////////////////
//
cmd ::= COMMIT(X) AND(A) ID(Y) TRANSACTION. {
if( (pParse->db->flags & SQLITE_OkContTrans)==0 ){
parserSyntaxError(pParse, &A);
}
if( Y.n!=8 || sqlite3_strnicmp(Y.z,"continue",8)!=0 ){
parserSyntaxError(pParse, &Y);
}
sqlite3EndTransaction(pParse, @X, 1);
}
////////////////////////// The DROP TABLE /////////////////////////////////////
//
cmd ::= DROP TABLE ifexists(E) fullname(X). {
+2 -1
View File
@@ -1279,7 +1279,8 @@ void sqlite3Pragma(
char *zSql = sqlite3MPrintf(db, "SELECT*FROM\"%w\"", pTab->zName);
if( zSql ){
sqlite3_stmt *pDummy = 0;
(void)sqlite3_prepare(db, zSql, -1, &pDummy, 0);
(void)sqlite3_prepare_v3(db, zSql, -1, SQLITE_PREPARE_DONT_LOG,
&pDummy, 0);
(void)sqlite3_finalize(pDummy);
sqlite3DbFree(db, zSql);
}
+23 -22
View File
@@ -3911,32 +3911,32 @@ static Expr *substExpr(
if( pSubst->isOuterJoin ){
ExprSetProperty(pNew, EP_CanBeNull);
}
if( pNew->op==TK_TRUEFALSE ){
pNew->u.iValue = sqlite3ExprTruthValue(pNew);
pNew->op = TK_INTEGER;
ExprSetProperty(pNew, EP_IntValue);
}
/* Ensure that the expression now has an implicit collation sequence,
** just as it did when it was a column of a view or sub-query. */
{
CollSeq *pNat = sqlite3ExprCollSeq(pSubst->pParse, pNew);
CollSeq *pColl = sqlite3ExprCollSeq(pSubst->pParse,
pSubst->pCList->a[iColumn].pExpr
);
if( pNat!=pColl || (pNew->op!=TK_COLUMN && pNew->op!=TK_COLLATE) ){
pNew = sqlite3ExprAddCollateString(pSubst->pParse, pNew,
(pColl ? pColl->zName : "BINARY")
);
}
}
ExprClearProperty(pNew, EP_Collate);
if( ExprHasProperty(pExpr,EP_OuterON|EP_InnerON) ){
sqlite3SetJoinExpr(pNew, pExpr->w.iJoin,
pExpr->flags & (EP_OuterON|EP_InnerON));
}
sqlite3ExprDelete(db, pExpr);
pExpr = pNew;
if( pExpr->op==TK_TRUEFALSE ){
pExpr->u.iValue = sqlite3ExprTruthValue(pExpr);
pExpr->op = TK_INTEGER;
ExprSetProperty(pExpr, EP_IntValue);
}
/* Ensure that the expression now has an implicit collation sequence,
** just as it did when it was a column of a view or sub-query. */
{
CollSeq *pNat = sqlite3ExprCollSeq(pSubst->pParse, pExpr);
CollSeq *pColl = sqlite3ExprCollSeq(pSubst->pParse,
pSubst->pCList->a[iColumn].pExpr
);
if( pNat!=pColl || (pExpr->op!=TK_COLUMN && pExpr->op!=TK_COLLATE) ){
pExpr = sqlite3ExprAddCollateString(pSubst->pParse, pExpr,
(pColl ? pColl->zName : "BINARY")
);
}
}
ExprClearProperty(pExpr, EP_Collate);
}
}
}else{
@@ -4673,6 +4673,7 @@ static int flattenSubquery(
/* Transfer the FROM clause terms from the subquery into the
** outer query.
*/
iNewParent = pSubSrc->a[0].iCursor;
for(i=0; i<nSubSrc; i++){
SrcItem *pItem = &pSrc->a[i+iFrom];
assert( pItem->fg.isTabFunc==0 );
@@ -4682,7 +4683,6 @@ static int flattenSubquery(
if( pItem->fg.isUsing ) sqlite3IdListDelete(db, pItem->u3.pUsing);
*pItem = pSubSrc->a[i];
pItem->fg.jointype |= ltorj;
iNewParent = pSubSrc->a[i].iCursor;
memset(&pSubSrc->a[i], 0, sizeof(pSubSrc->a[i]));
}
pSrc->a[iFrom].fg.jointype &= JT_LTORJ;
@@ -4722,6 +4722,7 @@ static int flattenSubquery(
pWhere = pSub->pWhere;
pSub->pWhere = 0;
if( isOuterJoin>0 ){
assert( pSubSrc->nSrc==1 );
sqlite3SetJoinExpr(pWhere, iNewParent, EP_OuterON);
}
if( pWhere ){
@@ -7821,7 +7822,7 @@ int sqlite3Select(
#endif
assert( pSubq->pSelect && (pSub->selFlags & SF_PushDown)!=0 );
}else{
TREETRACE(0x4000,pParse,p,("WHERE-lcause push-down not possible\n"));
TREETRACE(0x4000,pParse,p,("WHERE-clause push-down not possible\n"));
}
/* Convert unused result columns of the subquery into simple NULL
+39 -23
View File
@@ -6501,14 +6501,20 @@ static void output_reset(ShellState *p){
/*
** Run an SQL command and return the single integer result.
*/
static int db_int(sqlite3 *db, const char *zSql){
static int db_int(sqlite3 *db, const char *zSql, ...){
sqlite3_stmt *pStmt;
int res = 0;
sqlite3_prepare_v2(db, zSql, -1, &pStmt, 0);
char *z;
va_list ap;
va_start(ap, zSql);
z = sqlite3_vmprintf(zSql, ap);
va_end(ap);
sqlite3_prepare_v2(db, z, -1, &pStmt, 0);
if( pStmt && sqlite3_step(pStmt)==SQLITE_ROW ){
res = sqlite3_column_int(pStmt,0);
}
sqlite3_finalize(pStmt);
sqlite3_free(z);
return res;
}
@@ -6611,9 +6617,7 @@ static int shell_dbinfo_command(ShellState *p, int nArg, char **azArg){
zSchemaTab = sqlite3_mprintf("\"%w\".sqlite_schema", zDb);
}
for(i=0; i<ArraySize(aQuery); i++){
char *zSql = sqlite3_mprintf(aQuery[i].zSql, zSchemaTab);
int val = db_int(p->db, zSql);
sqlite3_free(zSql);
int val = db_int(p->db, aQuery[i].zSql, zSchemaTab);
sqlite3_fprintf(p->out, "%-20s %d\n", aQuery[i].zName, val);
}
sqlite3_free(zSchemaTab);
@@ -6637,6 +6641,8 @@ static int shell_dbtotxt_command(ShellState *p, int nArg, char **azArg){
int rc, i, j;
unsigned char bShow[256]; /* Characters ok to display */
UNUSED_PARAMETER(nArg);
UNUSED_PARAMETER(azArg);
memset(bShow, '.', sizeof(bShow));
for(i=' '; i<='~'; i++){
if( i!='{' && i!='}' && i!='"' && i!='\\' ) bShow[i] = (unsigned char)i;
@@ -8269,8 +8275,8 @@ FROM (\
}else{
/* Formulate the columns spec, close the DB, zero *pDb. */
char *zColsSpec = 0;
int hasDupes = db_int(*pDb, zHasDupes);
int nDigits = (hasDupes)? db_int(*pDb, zColDigits) : 0;
int hasDupes = db_int(*pDb, "%s", zHasDupes);
int nDigits = (hasDupes)? db_int(*pDb, "%s", zColDigits) : 0;
if( hasDupes ){
#ifdef SHELL_COLUMN_RENAME_CLEAN
rc = sqlite3_exec(*pDb, zDedoctor, 0, 0, 0);
@@ -8285,7 +8291,7 @@ FROM (\
sqlite3_finalize(pStmt);
if( rc!=SQLITE_DONE ) rc_err_oom_die(SQLITE_NOMEM);
}
assert(db_int(*pDb, zHasDupes)==0); /* Consider: remove this */
assert(db_int(*pDb, "%s", zHasDupes)==0); /* Consider: remove this */
rc = sqlite3_prepare_v2(*pDb, zCollectVar, -1, &pStmt, 0);
rc_err_oom_die(rc);
rc = sqlite3_step(pStmt);
@@ -8713,12 +8719,12 @@ static int do_meta_command(char *zLine, ShellState *p){
}
sqlite3_free(azName);
}else
if( c=='d' && n>=3 && cli_strncmp(azArg[0], "dbconfig", n)==0 ){
static const struct DbConfigChoices {
const char *zName;
int op;
} aDbConfig[] = {
{ "continue_transaction",SQLITE_DBCONFIG_CONTINUE_TRANSACTION },
{ "defensive", SQLITE_DBCONFIG_DEFENSIVE },
{ "dqs_ddl", SQLITE_DBCONFIG_DQS_DDL },
{ "dqs_dml", SQLITE_DBCONFIG_DQS_DML },
@@ -9335,7 +9341,11 @@ static int do_meta_command(char *zLine, ShellState *p){
while( xRead(&sCtx) && sCtx.cTerm==sCtx.cColSep ){}
}
import_append_char(&sCtx, 0); /* To ensure sCtx.z is allocated */
if( sqlite3_table_column_metadata(p->db, zSchema, zTable,0,0,0,0,0,0) ){
if( sqlite3_table_column_metadata(p->db, zSchema, zTable,0,0,0,0,0,0)
&& 0==db_int(p->db, "SELECT count(*) FROM \"%w\".sqlite_schema"
" WHERE name=%Q AND type='view'",
zSchema ? zSchema : "main", zTable)
){
/* Table does not exist. Create it. */
sqlite3 *dbCols = 0;
char *zRenames = 0;
@@ -11465,7 +11475,9 @@ static int do_meta_command(char *zLine, ShellState *p){
};
unsigned int curOpt;
unsigned int newOpt;
unsigned int m;
int ii;
int nOff;
sqlite3_test_control(SQLITE_TESTCTRL_GETOPT, p->db, &curOpt);
newOpt = curOpt;
for(ii=2; ii<nArg; ii++){
@@ -11506,24 +11518,28 @@ static int do_meta_command(char *zLine, ShellState *p){
}
if( curOpt!=newOpt ){
sqlite3_test_control(SQLITE_TESTCTRL_OPTIMIZATIONS,p->db,newOpt);
}else if( nArg<3 ){
curOpt = ~newOpt;
}
if( newOpt==0 ){
sqlite3_fputs("+All\n", p->out);
}else if( newOpt==0xffffffff ){
sqlite3_fputs("-All\n", p->out);
for(ii=nOff=0, m=1; ii<32; ii++, m <<= 1){
if( m & newOpt ) nOff++;
}
if( nOff<12 ){
sqlite3_fputs("+All", p->out);
for(ii=0; ii<ArraySize(aLabel); ii++){
if( !aLabel[ii].bDsply ) continue;
if( (newOpt & aLabel[ii].mask)!=0 ){
sqlite3_fprintf(p->out, " -%s", aLabel[ii].zLabel);
}
}
}else{
int jj;
for(jj=0; jj<ArraySize(aLabel); jj++){
unsigned int m = aLabel[jj].mask;
if( !aLabel[jj].bDsply ) continue;
if( (curOpt&m)!=(newOpt&m) ){
sqlite3_fprintf(p->out, "%c%s\n", (newOpt & m)==0 ? '+' : '-',
aLabel[jj].zLabel);
sqlite3_fputs("-All", p->out);
for(ii=0; ii<ArraySize(aLabel); ii++){
if( !aLabel[ii].bDsply ) continue;
if( (newOpt & aLabel[ii].mask)==0 ){
sqlite3_fprintf(p->out, " +%s", aLabel[ii].zLabel);
}
}
}
sqlite3_fputs("\n", p->out);
rc2 = isOk = 3;
break;
}
+24 -1
View File
@@ -2521,6 +2521,17 @@ struct sqlite3_mem_methods {
** then 0 or 1 is written into the integer that the second argument points to
** depending on if the reverse scan order flag is set after processing the
** first argument.
**
** [[SQLITE_DBCONFIG_CONTINUE_TRANSACTION]]
** <dt>SQLITE_DBCONFIG_CONTINUE_TRANSACTION</dt>
** <dd>The SQLITE_DBCONFIG_CONTINUE_TRANSACTION option enables or disables
** the COMMIT AND CONTINUE TRANSACTION syntax. That special syntax if off
** by default. This option takes two arguments which are an integer and a
** pointer to an integer. The first argument is 1, 0, or -1 to enable,
** disable, or leave unchanged the COMMIT AND CONTINUE TRANSACTION syntax,
** respectively. If the second argument is not NULL, then 0 or 1 is written
** into the integer that the second argument points to depending on whether
** or not the COMMIT AND CONTINUE TRANSACTION syntax is enabled.
** </dd>
**
** </dl>
@@ -2545,7 +2556,8 @@ struct sqlite3_mem_methods {
#define SQLITE_DBCONFIG_TRUSTED_SCHEMA 1017 /* int int* */
#define SQLITE_DBCONFIG_STMT_SCANSTATUS 1018 /* int int* */
#define SQLITE_DBCONFIG_REVERSE_SCANORDER 1019 /* int int* */
#define SQLITE_DBCONFIG_MAX 1019 /* Largest DBCONFIG */
#define SQLITE_DBCONFIG_CONTINUE_TRANSACTION 1020 /* int int* */
#define SQLITE_DBCONFIG_MAX 1020 /* Largest DBCONFIG */
/*
** CAPI3REF: Enable Or Disable Extended Result Codes
@@ -4204,11 +4216,22 @@ int sqlite3_limit(sqlite3*, int id, int newVal);
** <dd>The SQLITE_PREPARE_NO_VTAB flag causes the SQL compiler
** to return an error (error code SQLITE_ERROR) if the statement uses
** any virtual tables.
**
** [[SQLITE_PREPARE_DONT_LOG]] <dt>SQLITE_PREPARE_DONT_LOG</dt>
** <dd>The SQLITE_PREPARE_DONT_LOG flag prevents SQL compiler
** errors from being sent to the error log defined by
** [SQLITE_CONFIG_LOG]. This can be used, for example, to do test
** compiles to see if some SQL syntax is well-formed, without generating
** messages on the global error log when it is not. If the test compile
** fails, the sqlite3_prepare_v3() call returns the same error indications
** with or without this flag; it just omits the call to [sqlite3_log()] that
** logs the error.
** </dl>
*/
#define SQLITE_PREPARE_PERSISTENT 0x01
#define SQLITE_PREPARE_NORMALIZE 0x02
#define SQLITE_PREPARE_NO_VTAB 0x04
#define SQLITE_PREPARE_DONT_LOG 0x10
/*
** CAPI3REF: Compiling An SQL Statement
+5 -4
View File
@@ -1799,8 +1799,7 @@ struct sqlite3 {
#define SQLITE_ShortColNames 0x00000040 /* Show short columns names */
#define SQLITE_TrustedSchema 0x00000080 /* Allow unsafe functions and
** vtabs in the schema definition */
#define SQLITE_NullCallback 0x00000100 /* Invoke the callback once if the */
/* result set is empty */
#define SQLITE_OkContTrans 0x00000100 /* Enable COMMIT AND CONTINUE syntax*/
#define SQLITE_IgnoreChecks 0x00000200 /* Do not enforce check constraints */
#define SQLITE_StmtScanStatus 0x00000400 /* Enable stmt_scanstats() counters */
#define SQLITE_NoCkptOnClose 0x00000800 /* No checkpoint on close()/DETACH */
@@ -1830,6 +1829,8 @@ struct sqlite3 {
#define SQLITE_CorruptRdOnly HI(0x00002) /* Prohibit writes due to error */
#define SQLITE_ReadUncommit HI(0x00004) /* READ UNCOMMITTED in shared-cache */
#define SQLITE_FkNoAction HI(0x00008) /* Treat all FK as NO ACTION */
#define SQLITE_NullCallback HI(0x00010) /* Invoke the callback once if the */
/* result set is empty */
/* Flags used only if debugging */
#ifdef SQLITE_DEBUG
@@ -5072,8 +5073,8 @@ void sqlite3PrngRestoreState(void);
void sqlite3RollbackAll(sqlite3*,int);
void sqlite3CodeVerifySchema(Parse*, int);
void sqlite3CodeVerifyNamedSchema(Parse*, const char *zDb);
void sqlite3BeginTransaction(Parse*, int);
void sqlite3EndTransaction(Parse*,int);
void sqlite3BeginTransaction(Parse*,int);
void sqlite3EndTransaction(Parse*,int,int);
void sqlite3Savepoint(Parse*, int, Token*);
void sqlite3CloseSavepoints(sqlite3 *);
void sqlite3LeaveMutexAndCloseZombie(sqlite3*);
+5 -3
View File
@@ -1133,7 +1133,8 @@ static void tclSqlFunc(sqlite3_context *context, int argc, sqlite3_value**argv){
}
default: {
data = (unsigned char *)Tcl_GetStringFromObj(pVar, &n);
sqlite3_result_text(context, (char *)data, n, SQLITE_TRANSIENT);
sqlite3_result_text64(context, (char *)data, n, SQLITE_TRANSIENT,
SQLITE_UTF8);
break;
}
}
@@ -1519,7 +1520,8 @@ static int dbPrepareAndBind(
sqlite3_bind_int64(pStmt, i, v);
}else{
data = (unsigned char *)Tcl_GetStringFromObj(pVar, &n);
sqlite3_bind_text(pStmt, i, (char *)data, n, SQLITE_STATIC);
sqlite3_bind_text64(pStmt, i, (char *)data, n, SQLITE_STATIC,
SQLITE_UTF8);
Tcl_IncrRefCount(pVar);
pPreStmt->apParm[iParm++] = pVar;
}
@@ -3422,7 +3424,7 @@ deserialize_error:
enum TTYPE_enum {
TTYPE_STMT, TTYPE_PROFILE, TTYPE_ROW, TTYPE_CLOSE
};
int i;
Tcl_Size i;
if( TCL_OK!=Tcl_ListObjLength(interp, objv[3], &len) ){
return TCL_ERROR;
}
+1
View File
@@ -8389,6 +8389,7 @@ static int SQLITE_TCLAPI test_sqlite3_db_config(
{ "DQS_DDL", SQLITE_DBCONFIG_DQS_DDL },
{ "LEGACY_FILE_FORMAT", SQLITE_DBCONFIG_LEGACY_FILE_FORMAT },
{ "STMT_SCANSTATUS", SQLITE_DBCONFIG_STMT_SCANSTATUS },
{ "CONTINUE_TRANSACTION",SQLITE_DBCONFIG_CONTINUE_TRANSACTION },
};
int i;
int v = 0;
+3 -1
View File
@@ -728,7 +728,9 @@ int sqlite3RunParser(Parse *pParse, const char *zSql){
if( pParse->zErrMsg==0 ){
pParse->zErrMsg = sqlite3MPrintf(db, "%s", sqlite3ErrStr(pParse->rc));
}
sqlite3_log(pParse->rc, "%s in \"%s\"", pParse->zErrMsg, pParse->zTail);
if( (pParse->prepFlags & SQLITE_PREPARE_DONT_LOG)==0 ){
sqlite3_log(pParse->rc, "%s in \"%s\"", pParse->zErrMsg, pParse->zTail);
}
nErr++;
}
pParse->zTail = zSql;
+1 -1
View File
@@ -218,7 +218,7 @@ void sqlite3TreeViewSrcList(TreeView *pView, const SrcList *pSrc){
sqlite3_str_appendf(&x, " CteUse=0x%p", pItem->u2.pCteUse);
}
if( pItem->fg.isOn || (pItem->fg.isUsing==0 && pItem->u3.pOn!=0) ){
sqlite3_str_appendf(&x, " ON");
sqlite3_str_appendf(&x, " isOn");
}
if( pItem->fg.isTabFunc ) sqlite3_str_appendf(&x, " isTabFunc");
if( pItem->fg.isCorrelated ) sqlite3_str_appendf(&x, " isCorrelated");
+17 -6
View File
@@ -539,8 +539,8 @@ int sqlite3AtoF(const char *z, double *pResult, int length, u8 enc){
int eValid = 1; /* True exponent is either not used or is well-formed */
int nDigit = 0; /* Number of digits processed */
int eType = 1; /* 1: pure integer, 2+: fractional -1 or less: bad UTF16 */
u64 s2; /* round-tripped significand */
double rr[2];
u64 s2;
assert( enc==SQLITE_UTF8 || enc==SQLITE_UTF16LE || enc==SQLITE_UTF16BE );
*pResult = 0.0; /* Default return value, in case of an error */
@@ -643,7 +643,7 @@ do_atof_calc:
e = (e*esign) + d;
/* Try to adjust the exponent to make it smaller */
while( e>0 && s<(LARGEST_UINT64/10) ){
while( e>0 && s<((LARGEST_UINT64-0x7ff)/10) ){
s *= 10;
e--;
}
@@ -653,11 +653,22 @@ do_atof_calc:
}
rr[0] = (double)s;
s2 = (u64)rr[0];
#if defined(_MSC_VER) && _MSC_VER<1700
if( s2==0x8000000000000000LL ){ s2 = 2*(u64)(0.5*rr[0]); }
assert( sizeof(s2)==sizeof(rr[0]) );
#ifdef SQLITE_DEBUG
rr[1] = 18446744073709549568.0;
memcpy(&s2, &rr[1], sizeof(s2));
assert( s2==0x43efffffffffffffLL );
#endif
rr[1] = s>=s2 ? (double)(s - s2) : -(double)(s2 - s);
/* Largest double that can be safely converted to u64
** vvvvvvvvvvvvvvvvvvvvvv */
if( rr[0]<=18446744073709549568.0 ){
s2 = (u64)rr[0];
rr[1] = s>=s2 ? (double)(s - s2) : -(double)(s2 - s);
}else{
rr[1] = 0.0;
}
assert( rr[1]<=1.0e-10*rr[0] ); /* Equal only when rr[0]==0.0 */
if( e>0 ){
while( e>=100 ){
e -= 100;
+25 -7
View File
@@ -3934,14 +3934,22 @@ case OP_Savepoint: {
break;
}
/* Opcode: AutoCommit P1 P2 * * *
/* Opcode: AutoCommit P1 P2 * * P5
**
** Set the database auto-commit flag to P1 (1 or 0). If P2 is true, roll
** back any currently active btree transactions. If there are any active
** VMs (apart from this one), then a ROLLBACK fails. A COMMIT fails if
** there are active writing VMs or active VMs that use shared cache.
** Set the database auto-commit flag to P1 (1 or 0). The current trasaction
** will commit when the VDBE halts if the auto-commit flag is 1. The
** current transaction will stay in effect if the auto-commit flag is 0.
** Thus, this opcode implements COMMIT when P1 is 0 and it implements
** BEGIN when P1 is 1.
**
** This instruction causes the VM to halt.
** If P2 is true, rollback any currently active btree transactions. If there
** are any active VMs (apart from this one), then a ROLLBACK fails. A
** COMMIT fails if there are active writing VMs or active VMs that use
** shared cache.
**
** If P5 and P1 are both is 1, then COMMIT but also hold on to the write lock
** for the transaction. The P3 flag is used to help implement
** COMMIT AND CONTINUE TRANSACTION.
*/
case OP_AutoCommit: {
int desiredAutoCommit;
@@ -3959,7 +3967,7 @@ case OP_AutoCommit: {
assert( desiredAutoCommit==1 );
sqlite3RollbackAll(db, SQLITE_ABORT_ROLLBACK);
db->autoCommit = 1;
}else if( desiredAutoCommit && db->nVdbeWrite>0 ){
}else if( desiredAutoCommit && db->nVdbeWrite>pOp->p5 ){
/* If this instruction implements a COMMIT and other VMs are writing
** return an error indicating that the other VMs must complete first.
*/
@@ -3972,6 +3980,8 @@ case OP_AutoCommit: {
}else{
db->autoCommit = (u8)desiredAutoCommit;
}
assert( pOp->p5==0 || pOp->p5==1 );
sqlite3PagerHoldWrLock(db, pOp->p5);
if( sqlite3VdbeHalt(p)==SQLITE_BUSY ){
p->pc = (int)(pOp - aOp);
db->autoCommit = (u8)(1-desiredAutoCommit);
@@ -3980,6 +3990,13 @@ case OP_AutoCommit: {
}
sqlite3CloseSavepoints(db);
if( p->rc==SQLITE_OK ){
if( pOp->p5 ){
db->nVdbeActive++;
db->nVdbeRead++;
db->nVdbeWrite++;
p->eVdbeState = VDBE_RUN_STATE;
break;
}
rc = SQLITE_DONE;
}else{
rc = SQLITE_ERROR;
@@ -9128,6 +9145,7 @@ abort_due_to_error:
rc = SQLITE_CORRUPT_BKPT;
}
assert( rc );
sqlite3PagerHoldWrLock(db, 0);
#ifdef SQLITE_DEBUG
if( db->flags & SQLITE_VdbeTrace ){
const char *zTrace = p->zSql;
+1 -1
View File
@@ -185,7 +185,7 @@ typedef struct VdbeOpList VdbeOpList;
** Additional non-public SQLITE_PREPARE_* flags
*/
#define SQLITE_PREPARE_SAVESQL 0x80 /* Preserve SQL text */
#define SQLITE_PREPARE_MASK 0x0f /* Mask of public flags */
#define SQLITE_PREPARE_MASK 0x1f /* Mask of public flags */
/*
** Prototypes for the VDBE interface. See comments on the implementation
+20 -10
View File
@@ -516,6 +516,7 @@ struct Wal {
i16 readLock; /* Which read lock is being held. -1 for none */
u8 syncFlags; /* Flags to use to sync header writes */
u8 exclusiveMode; /* Non-zero if connection is in exclusive mode */
u8 bHoldWrLock; /* Do not release WAL_WRITE locks if true */
u8 writeLock; /* True if in a write transaction */
u8 ckptLock; /* True if holding a checkpoint lock */
u8 readOnly; /* WAL_RDWR, WAL_RDONLY, or WAL_SHM_RDONLY */
@@ -2064,7 +2065,7 @@ int sqlite3WalWriteLock(Wal *pWal, int bLock){
}
walDisableBlocking(pWal);
}
}else if( pWal->writeLock ){
}else if( pWal->writeLock && !pWal->bHoldWrLock ){
walUnlockExclusive(pWal, WAL_WRITE_LOCK, 1);
pWal->writeLock = 0;
}
@@ -2698,7 +2699,7 @@ static int walIndexReadHdr(Wal *pWal, int *pChanged){
*pChanged = 1;
}
}
if( bWriteLock==0 ){
if( bWriteLock==0 && !pWal->bHoldWrLock ){
pWal->writeLock = 0;
walUnlockExclusive(pWal, WAL_WRITE_LOCK, 1);
}
@@ -3655,7 +3656,7 @@ Pgno sqlite3WalDbsize(Wal *pWal){
** There can only be a single writer active at a time.
*/
int sqlite3WalBeginWriteTransaction(Wal *pWal){
int rc;
int rc = SQLITE_OK;
#ifdef SQLITE_ENABLE_SETLK_TIMEOUT
/* If the write-lock is already held, then it was obtained before the
@@ -3670,7 +3671,7 @@ int sqlite3WalBeginWriteTransaction(Wal *pWal){
/* Cannot start a write transaction without first holding a read
** transaction. */
assert( pWal->readLock>=0 );
assert( pWal->writeLock==0 && pWal->iReCksum==0 );
testcase( pWal->writeLock );
if( pWal->readOnly ){
return SQLITE_READONLY;
@@ -3679,11 +3680,13 @@ int sqlite3WalBeginWriteTransaction(Wal *pWal){
/* Only one writer allowed at a time. Get the write lock. Return
** SQLITE_BUSY if unable.
*/
rc = walLockExclusive(pWal, WAL_WRITE_LOCK, 1);
if( rc ){
return rc;
if( pWal->writeLock==0 ){
rc = walLockExclusive(pWal, WAL_WRITE_LOCK, 1);
if( rc ){
return rc;
}
pWal->writeLock = 1;
}
pWal->writeLock = 1;
/* If another connection has written to the database file since the
** time the read transaction on this connection was started, then
@@ -3708,7 +3711,7 @@ int sqlite3WalBeginWriteTransaction(Wal *pWal){
** routine merely releases the lock.
*/
int sqlite3WalEndWriteTransaction(Wal *pWal){
if( pWal->writeLock ){
if( pWal->writeLock && !pWal->bHoldWrLock ){
walUnlockExclusive(pWal, WAL_WRITE_LOCK, 1);
pWal->writeLock = 0;
pWal->iReCksum = 0;
@@ -4419,7 +4422,7 @@ int sqlite3WalCallback(Wal *pWal){
*/
int sqlite3WalExclusiveMode(Wal *pWal, int op){
int rc;
assert( pWal->writeLock==0 );
testcase( pWal->writeLock!=0 );
assert( pWal->exclusiveMode!=WAL_HEAPMEMORY_MODE || op==-1 );
/* pWal->readLock is usually set, but might be -1 if there was a
@@ -4456,6 +4459,13 @@ int sqlite3WalExclusiveMode(Wal *pWal, int op){
return rc;
}
/* Set or clear the transient Wal.bHoldWrFlag boolean that prevents
** the WAL_WRITE lock from being released.
*/
void sqlite3WalHoldWrLock(Wal *pWal, int bOnOff){
pWal->bHoldWrLock = bOnOff;
}
/*
** Return true if the argument is non-NULL and the WAL module is using
** heap-memory for the wal-index. Otherwise, if the argument is NULL or the
+5
View File
@@ -129,6 +129,11 @@ int sqlite3WalExclusiveMode(Wal *pWal, int op);
*/
int sqlite3WalHeapMemory(Wal *pWal);
/* Set or clear the transient flag that prevents the WAL_WRITE lock
** from being released.
*/
void sqlite3WalHoldWrLock(Wal *pWal, int bOnOff);
#ifdef SQLITE_ENABLE_SNAPSHOT
int sqlite3WalSnapshotGet(Wal *pWal, sqlite3_snapshot **ppSnapshot);
void sqlite3WalSnapshotOpen(Wal *pWal, sqlite3_snapshot *pSnapshot);
+2 -2
View File
@@ -839,7 +839,7 @@ static int constraintCompatibleWithOuterJoin(
return 0;
}
if( (pSrc->fg.jointype & (JT_LEFT|JT_RIGHT))!=0
&& ExprHasProperty(pTerm->pExpr, EP_InnerON)
&& NEVER(ExprHasProperty(pTerm->pExpr, EP_InnerON))
){
return 0;
}
@@ -6224,7 +6224,7 @@ static SQLITE_NOINLINE Bitmask whereOmitNoopJoin(
}
if( hasRightJoin
&& ExprHasProperty(pTerm->pExpr, EP_InnerON)
&& pTerm->pExpr->w.iJoin==pItem->iCursor
&& NEVER(pTerm->pExpr->w.iJoin==pItem->iCursor)
){
break; /* restriction (5) */
}
+38
View File
@@ -82,5 +82,43 @@ do_execsql_test atof1-2.40 {
SELECT randomblob(0) - 1;
} {-1}
# 2024-12-07 https://sqlite.org/forum/forumpost/569a7209179a7f5e
# Incorrect conversion of floating point or integer literals that
# have significant digits that begin with 1844674407370955 followed
# by more digits in the range 0592 throgh 1609.
#
do_execsql_test atof-3.1 {
WITH RECURSIVE bigval(i,vtxt) AS (
SELECT 0, '18446744073709550000'
UNION ALL
SELECT i+1, format('1844674407370955%04d',i+1) FROM bigval
WHERE i+1<=9999
)
SELECT vtxt, CAST(vtxt AS REAL) FROM bigval
WHERE CAST(vtxt AS REAL) NOT GLOB '1.8446744073709[56]*';
} {}
do_execsql_test atof-3.2 {
WITH RECURSIVE bigval(i,vtxt) AS (
SELECT 0, '18.446744073709550000'
UNION ALL
SELECT i+1, format('18.44674407370955%04d',i+1) FROM bigval
WHERE i+1<=9999
)
SELECT vtxt, CAST(vtxt AS REAL) FROM bigval
WHERE CAST(vtxt AS REAL) NOT GLOB '18.446744073709*';
} {}
do_execsql_test atof-3.3 {
WITH RECURSIVE exp(n,v1,v2) AS (
SELECT -200, '1.8446744073709550592e-200', '1.8446744073709551609e-200'
UNION ALL
SELECT n+1, ('1.8446744073709550592e'||n),('1.8446744073709551609e'||n)
FROM exp WHERE n<200
)
SELECT n, v1, v2
FROM exp
WHERE format('%.10e',CAST(v1 AS REAL)) NOT GLOB '1.8446*'
OR format('%.10e',CAST(v2 AS REAL)) NOT GLOB '1.8446*';
} {}
finish_test
+21
View File
@@ -281,6 +281,27 @@ ifcapable vtab {
JOIN pragma_table_info(f."table", t.schema) AS i
WHERE i.pk;
} {t2 t1 d a 1}
# With a corrupt VIEW in the schema, the PRAGMA table_list command
# will generate internal errors. Confirm that these internal errors
# do not appears on the log. https://sqlite.org/src/forumpost/00ee467e
test_sqlite3_log [list lappend ::log]
set ::log {}
do_execsql_test 6.1 {
CREATE VIEW v1 AS SELECT abs(a) FROM t1;
PRAGMA writable_schema=ON;
UPDATE sqlite_schema
SET sql=replace(sql,'abs(a)','nosuchfunc(a)')
WHERE name='v1';
PRAGMA writable_schema=RESET;
} {}
do_execsql_test 6.2 {
PRAGMA table_list;
} {main v1 view 0 0 0 main t2 table 2 0 0 main t1 table 2 0 0 main sqlite_schema table 5 0 0 temp sqlite_temp_schema table 5 0 0}
do_test 6.3 {
set ::log
} {}
test_sqlite3_log {}
}
# 2024-05-08 https://sqlite.org/forum/forumpost/cf29a33e94
+31
View File
@@ -325,4 +325,35 @@ do_eqp_test 6.3 {
`--REUSE LIST SUBQUERY xxxxxx
}
#-------------------------------------------------------------------------
reset_db
do_execsql_test 7.0 {
CREATE TABLE t0_1(a INT , b INT, c INT);
CREATE TABLE t0_2(a INT , b INT, c INT);
INSERT INTO t0_1 (a, b, c) VALUES (1, 0, 1);
INSERT INTO t0_2 (a, b, c) VALUES (1, 0, 1);
CREATE TABLE empty1(x);
CREATE TABLE empty2(y);
}
do_execsql_test 7.1 {
SELECT t0_2.c
FROM (SELECT '0000' AS c0 FROM empty2 RIGHT JOIN t0_1 ON 1) AS v0
LEFT JOIN empty1 ON v0.c0, t0_2
RIGHT JOIN (
SELECT 5678 AS col0 FROM (SELECT 0)
) AS sub1 ON 1;
} {1}
do_execsql_test 7.2 {
SELECT t0_2.c
FROM (SELECT '0000' AS c0 FROM empty2 RIGHT JOIN t0_1 ON 1) AS v0
LEFT JOIN empty1 ON v0.c0, t0_2
RIGHT JOIN (
SELECT 5678 AS col0 FROM (SELECT 0)
) AS sub1 ON 1 WHERE +t0_2.c;
} {1}
finish_test
+39
View File
@@ -628,4 +628,43 @@ do_execsql_test 12.100 {
SELECT * from t2);
} {1 3}
#-------------------------------------------------------------------------
reset_db
do_execsql_test 13.100 {
CREATE TABLE t1(y INT);
INSERT INTO t1 (y) VALUES (1);
CREATE TABLE t2(x INTEGER);
INSERT INTO t2 VALUES(0);
CREATE TABLE empty1(z);
}
do_execsql_test 13.110 {
SELECT t1.y
FROM ( SELECT 'AAA' )
INNER JOIN (
SELECT 1 AS abc FROM (
SELECT 1 FROM t2 LEFT JOIN empty1
)
) AS sub0 ON sub0.abc
, t1
RIGHT JOIN (SELECT 'BBB' FROM ( SELECT 'CCC' ))
} {1}
do_execsql_test 13.120 {
SELECT t1.y
FROM ( SELECT 'AAA' )
INNER JOIN (
SELECT 1 AS abc FROM (
SELECT 1 FROM t2 LEFT JOIN empty1
)
) AS sub0 ON sub0.abc
, t1
RIGHT JOIN (SELECT 'BBB' FROM ( SELECT 'CCC' ))
WHERE t1.y
} {1}
finish_test
+109
View File
@@ -0,0 +1,109 @@
# 2024-11-16
#
# 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.
#
#***********************************************************************
#
# Test cases for COMMIT AND CONTINUE TRANSACTION.
#
set testdir [file dirname $argv0]
source $testdir/tester.tcl
unset -nocomplain ecode
if {[permutation]=="inmemory_journal" || [permutation]=="journaltest"} {
finish_test
return
}
db close
sqlite3 db test.db
sqlite3 db2 test.db
sqlite3_db_config db CONTINUE_TRANSACTION 1
sqlite3_db_config db2 CONTINUE_TRANSACTION 1
do_execsql_test -db db2 trans4-1.1 {
CREATE TABLE t1(x);
BEGIN;
INSERT INTO t1 VALUES(1),(2),(3);
SELECT * FROM t1;
} {1 2 3}
do_catchsql_test trans4-1.2 {
SELECT * FROM t1;
} {0 {}}
do_execsql_test -db db2 trans4-1.3 {
COMMIT AND CONTINUE TRANSACTION;
}
do_catchsql_test trans4-1.4 {
SELECT * FROM t1;
} {1 {database is locked}}
do_execsql_test -db db2 trans4-1.5 {
INSERT INTO t1 VALUES(4);
INSERT INTO t1 VALUES(5);
COMMIT;
}
do_catchsql_test trans4-1.6 {
SELECT * FROM t1;
} {0 {1 2 3 4 5}}
db2 close
db eval {PRAGMA journal_mode=WAL; VACUUM;}
sqlite3 db2 test.db
sqlite3_db_config db2 CONTINUE_TRANSACTION 1
do_execsql_test -db db2 trans4-2.1 {
DELETE FROM t1;
BEGIN;
INSERT INTO t1 VALUES(1),(2),(3);
SELECT * FROM t1;
} {1 2 3}
do_catchsql_test trans4-2.2 {
SELECT * FROM t1;
} {0 {}}
do_execsql_test -db db2 trans4-2.3 {
COMMIT AND CONTINUE TRANSACTION;
INSERT INTO t1 VALUES(4);
}
do_catchsql_test trans4-2.4 {
SELECT * FROM t1;
} {0 {1 2 3}}
do_execsql_test -db db2 trans4-2.5 {
INSERT INTO t1 VALUES(5);
COMMIT;
}
do_catchsql_test trans4-2.6 {
SELECT * FROM t1;
} {0 {1 2 3 4 5}}
do_catchsql_test trans4-3.1 {
BEGIN;
COMMIT AND continuex TRANSACTION;
} {1 {near "continuex": syntax error}}
do_catchsql_test trans4-3.2 {
COMMIT AND continue;
} {1 {near ";": syntax error}}
do_catchsql_test trans4-3.3 {
COMMIT AND continue Transaction;
} {0 {}}
sqlite3_db_config db CONTINUE_TRANSACTION 0
do_catchsql_test trans4-3.4 {
COMMIT AND CONTINUE TRANSACTION;
} {1 {near "AND": syntax error}}
db2 close
finish_test