]>
git.ipfire.org Git - thirdparty/sqlite.git/log
drh [Wed, 7 Mar 2018 01:37:05 +0000 (01:37 +0000)]
drh [Tue, 6 Mar 2018 21:43:19 +0000 (21:43 +0000)]
Improved documentation for sqlite3_serialize() and sqlite3_deserialize().
Change the name of the compile-time option to enable these interfaces
from SQLITE_ENABLE_MEMDB to SQLITE_ENABLE_DESERIALIZE.
FossilOrigin-Name:
f07e97aed435b02e1473053c0257ec5c89bf0b3e46076b7a9382de432bbc2497
drh [Tue, 6 Mar 2018 20:54:27 +0000 (20:54 +0000)]
Handle some boundary cases in memdb associated with OOM faults.
FossilOrigin-Name:
b58ca4cb0c921e81efad527c80b220be120263cfdb04528ae26ecf8b8f66f44a
drh [Tue, 6 Mar 2018 19:14:32 +0000 (19:14 +0000)]
drh [Tue, 6 Mar 2018 04:01:08 +0000 (04:01 +0000)]
drh [Tue, 6 Mar 2018 02:00:20 +0000 (02:00 +0000)]
drh [Mon, 5 Mar 2018 23:23:28 +0000 (23:23 +0000)]
Fix walIteratorInit() so that it always leaves the iterator as a NULL pointer
if an OOM occurs. This fixes an assertion fault introduced by
check-in [
044b0b65e716bff ].
FossilOrigin-Name:
e5ce256aa1f7a8ae995b79c9da895827bee5d8d0724fc15413ff203dc9e2602d
drh [Mon, 5 Mar 2018 21:19:57 +0000 (21:19 +0000)]
dan [Mon, 5 Mar 2018 21:17:20 +0000 (21:17 +0000)]
Fix another crash in the sessions module triggered by malformed input.
FossilOrigin-Name:
7e70c9b86af557e86152748ddf1da467e62817b35df1da0d7d3b67941b198897
drh [Mon, 5 Mar 2018 20:21:50 +0000 (20:21 +0000)]
Improved command-line help for the -A option on the CLI.
FossilOrigin-Name:
d937ac181c5c78b9e5068db4ff1dab6becdba8c22cd27a3cfa0d4c12da1ec7ad
drh [Mon, 5 Mar 2018 20:20:22 +0000 (20:20 +0000)]
A new way of doing archive commands on the command-line for the CLI. The -A
option means that everything that follows is a ".archive" command, including
any suffix on the -A option.
FossilOrigin-Name:
9d8081fabc491ba75d26ea81b3548bd10aeeb3334b0ad1462d7ab656c8d7c35e
drh [Mon, 5 Mar 2018 19:34:05 +0000 (19:34 +0000)]
In the CLI, add a new command-line option "--archive" (also "--ar") that
passes all subsequent arguments to the ".archive" command.
FossilOrigin-Name:
a5c4d30af1271dea2d322b0679fe963bbd0d5db6bba8904caf5e30e510d01832
drh [Mon, 5 Mar 2018 18:20:35 +0000 (18:20 +0000)]
dan [Fri, 2 Mar 2018 20:00:42 +0000 (20:00 +0000)]
In sqlite3_checker, wrap the call to "SELECT checkfreelist()" in a
transaction.
FossilOrigin-Name:
02906e55d73ea3521ad1e6807cffed5c759147f7b2d89efc4add984e53e3ad49
dan [Fri, 2 Mar 2018 16:52:47 +0000 (16:52 +0000)]
In a checkpoint, figure out if it is possible to checkpoint any frames at all
before creating the wal-iterator.
FossilOrigin-Name:
044b0b65e716bffeddedbd1b0360c4c332f6d2359167c1d327a5ff96539474cb
dan [Fri, 2 Mar 2018 15:42:20 +0000 (15:42 +0000)]
Optimize the obscure case of running a checkpoint against a very large wal
file for which a large percentage of the frames have already been checkpointed.
FossilOrigin-Name:
0f5057dffa9be1bccab04894709d25bf1f066c4b1aef50d67ee635d46d300a4d
drh [Thu, 1 Mar 2018 22:18:26 +0000 (22:18 +0000)]
Allow the zSchema argument to sqlite3_serialize() to be NULL to mean the
main database.
FossilOrigin-Name:
5b01b9914fb612ceece34f40d45c7eb97c3504fc5a0a5ff0e67120bdee67f6ee
mistachkin [Thu, 1 Mar 2018 18:09:02 +0000 (18:09 +0000)]
dan [Thu, 1 Mar 2018 15:20:33 +0000 (15:20 +0000)]
Fix further crashes in sqlite3changeset_apply() caused by corrupt changeset
blobs.
FossilOrigin-Name:
2c01c72e357296d761493aac47329f15d87afcada2b39606fc018af0e0011bb5
drh [Thu, 1 Mar 2018 13:44:40 +0000 (13:44 +0000)]
dan [Thu, 1 Mar 2018 12:05:51 +0000 (12:05 +0000)]
Fix some crashes in the sqlite3changeset_apply() function that could be caused
by corrupt changeset blobs.
FossilOrigin-Name:
745a9a7fef0f28a57ea3f44899058993f6ecdedda52c81a09a4a9ce09c9004d6
drh [Wed, 28 Feb 2018 22:21:29 +0000 (22:21 +0000)]
Enhance the sessions documentation to show the methods of the various objects.
FossilOrigin-Name:
e01177754ad6d9e2d38adddddd2e2e212094dac1154bda5fcee61ca8b678ae0f
drh [Wed, 28 Feb 2018 21:50:00 +0000 (21:50 +0000)]
Use <pre> around code snippets in the documentation for sessions
interfaces. This is a documentation change only with no changes to code.
FossilOrigin-Name:
c949b915e893e917315ce21092d4c4bbd3e1b88d5326928f71dcc2f18f300702
drh [Wed, 28 Feb 2018 04:30:55 +0000 (04:30 +0000)]
Fix a potential NULL pointer deref following OOM in the new IS TRUE
logic.
FossilOrigin-Name:
48775ec693c21927ff26448acc614dd67d56240fa263499da2a9fe405c546c32
drh [Tue, 27 Feb 2018 15:40:59 +0000 (15:40 +0000)]
Add support for TRUE and FALSE keywords and for operators IS TRUE, IS FALSE,
IS NOT TRUE, and IS NOT FALSE. If there is are columns named TRUE or FALSE,
then the keywords resolve to the column names, for compatibility. The
behavior of the "DEFAULT true" phrase is changed to mean what it says,
rather than being an alias for "DEFAULT 'true'".
FossilOrigin-Name:
9a7f02c50e6c8a3dc3addf4e51b7e04bd31670d6ce58d26d55273c43b5ecc8b0
drh [Tue, 27 Feb 2018 14:49:25 +0000 (14:49 +0000)]
Clean up comments and variable names prior to merge.
FossilOrigin-Name:
6445519e91c4f98b4a9a45d5091d733c31497ebf0eb23a76edce3091f626035d
drh [Tue, 27 Feb 2018 00:58:13 +0000 (00:58 +0000)]
drh [Mon, 26 Feb 2018 21:26:27 +0000 (21:26 +0000)]
drh [Mon, 26 Feb 2018 20:15:54 +0000 (20:15 +0000)]
Get the "DEFAULT true" and "DEFAULT false" phrases working correctly in
CREATE TABLE.
FossilOrigin-Name:
8002f87d96b3f885cd208e7d204907a33ba60c4057ce2338b71e2de41215b0e5
drh [Mon, 26 Feb 2018 19:03:25 +0000 (19:03 +0000)]
Enhance TreeView so that it can display the new IS TRUE expression trees.
FossilOrigin-Name:
7e38305e6f71c3353df3d11d099e255eefbacceafd7ed2ccaba257fe2e7b8c38
drh [Mon, 26 Feb 2018 18:49:05 +0000 (18:49 +0000)]
Refactor for correct NULL handling in the IS TRUE, IS FALSE, IS NOT TRUE,
and IS NOT FALSE operators.
FossilOrigin-Name:
cf2abd59be9971a55bd3d6c5df374c6aaa23bf81819482b42f01ee2484dcd739
mistachkin [Mon, 26 Feb 2018 17:03:03 +0000 (17:03 +0000)]
mistachkin [Mon, 26 Feb 2018 16:49:20 +0000 (16:49 +0000)]
Fix heap issue in the shell on Win32 caused by allocator mismatch.
FossilOrigin-Name:
7b3a75519aa72a6b49a125ee84946ba2c0722dd6644ee0c80ba567eb85daf5c9
drh [Mon, 26 Feb 2018 15:31:39 +0000 (15:31 +0000)]
Merge the fix for determining truth of floating point values from trunk.
FossilOrigin-Name:
003dc140536d0dd4384252ae1b82827b5d8b2b399520f99549b9266a482009fb
drh [Mon, 26 Feb 2018 15:27:31 +0000 (15:27 +0000)]
Always interpret non-zero floating-point values as true even if their
integer part is zero. Fix for ticket [
36fae083b450e3af857a459e20 ].
FossilOrigin-Name:
a983fa857048c748112c2f805f13aadeae43b43b3d27fa55433a3699b51c9a0e
drh [Mon, 26 Feb 2018 03:20:18 +0000 (03:20 +0000)]
Experimental implementation of IS TRUE and IS FALSE operators. All TRUE and
FALSE to act like constants if the names do not resolve to a column name.
FossilOrigin-Name:
40314bc999af08ab10e654241208842b4bb95b19858d11249444372250ea4160
mistachkin [Fri, 23 Feb 2018 13:38:54 +0000 (13:38 +0000)]
Fix harmless compiler warnings in the zipfile extension seen with MSVC.
FossilOrigin-Name:
15c587cf6ffc920dc37f67cacb4f0db6a603fb998a22a639f755387910516414
mistachkin [Fri, 23 Feb 2018 13:38:20 +0000 (13:38 +0000)]
Enable the JSON1 extension when compiling the test fixture with MSVC.
FossilOrigin-Name:
e9e9f27b3d496531905ad7459cf60366ad3798f507266134dd6388cdec50fdc4
drh [Thu, 22 Feb 2018 18:30:53 +0000 (18:30 +0000)]
For the "SQLite archive" link in the README.md file, point to the
CLI .archive command documentation, not the original "sqlar" website.
FossilOrigin-Name:
4290faf5f7223ebe35b8ed5c4f0ba2444c1764501cabc09a79000f9c1d0890c7
drh [Thu, 22 Feb 2018 18:28:19 +0000 (18:28 +0000)]
Updates to the README.md file. Mention the ability to use SQLite-archives for
download.
FossilOrigin-Name:
ab9a7ae4eec0aaa5e0b472998f6de7212055d93c163f0b66da60b956bcc45add
drh [Wed, 21 Feb 2018 01:48:22 +0000 (01:48 +0000)]
Remove an unreachable branch in the walIndexPage() logic.
FossilOrigin-Name:
4e61a9731f5949dcf05c541106b56be16add04a7730613481fc8519d3e4f493b
drh [Wed, 21 Feb 2018 01:05:37 +0000 (01:05 +0000)]
Small performance improvement in sqltie3WalFindFrame().
FossilOrigin-Name:
52013cad0e6ce2d694f25e2984a76d438cef724f0e07c8bb9d3dce8a3caf4350
drh [Wed, 21 Feb 2018 00:48:02 +0000 (00:48 +0000)]
drh [Tue, 20 Feb 2018 22:20:57 +0000 (22:20 +0000)]
Make the walIndexPage() routine about 3x faster by factoring out the seldom
used reallocation logic into a separate subroutine.
FossilOrigin-Name:
e2b107141cd97bd4ab240748a9ce43fc2ec950ea74610697a4a7a3d7a6441e6b
drh [Tue, 20 Feb 2018 17:02:31 +0000 (17:02 +0000)]
In the speed-check.sh script, make WAL mode the default. Add the --legacy
option to do DELETE mode. Continue to use DELETE mode for long-term performance
graphs since WAL mode was not always available, but use WAL mode for
day-to-day performance measurements.
FossilOrigin-Name:
cd81613850c0458b4b5b2460b9b38ce7ff6e557f7add9615058bb96f5a344ccd
drh [Tue, 20 Feb 2018 16:39:11 +0000 (16:39 +0000)]
Remove a superfluous "#if 1". No logic changes.
FossilOrigin-Name:
caaffd32001ff44c31f2d6dbe921f9d294f869c2c4a81e943fdf3f43f8d9313c
drh [Tue, 20 Feb 2018 15:23:37 +0000 (15:23 +0000)]
Optimize calls to sqlite3_mprintf("%z...") so that they attempt to append
text onto the end of the existing memory allocation rather than reallocating
and copying.
FossilOrigin-Name:
4bc8a48e644562f6e6192f4c6fc4a70f6bb59f8126ed6c6dc876bedf65d74cda
drh [Tue, 20 Feb 2018 13:46:20 +0000 (13:46 +0000)]
Remove a lot of the text describing extended format options from the
documentation on sqlite3_mprintf() and friends, since that information is
now covered by the separate printf.html document. Provide links to that
other document. No changes to code.
FossilOrigin-Name:
99eec556f065ad19548e48d1f4ae0a3767b4e82e1c83fa2365062e3c5e0071fb
drh [Mon, 19 Feb 2018 22:46:19 +0000 (22:46 +0000)]
Enhance the string formatter (used by printf()) so that the width and
precision of string substitution operators refer to characters instead of
bytes when the alternate-form-2 flag ("!") is used. Also fix the %c
substition to always work within unicode, regardless of the
alternate-form-2 flag.
FossilOrigin-Name:
c883c4d33f4cd722982aca17eeb355d19eeed793991d923b5494d173b1d0c73a
drh [Mon, 19 Feb 2018 21:58:16 +0000 (21:58 +0000)]
Printing a value of 0 using %c terminates the string.
FossilOrigin-Name:
255612f0a131f2f522cbca3cc5a1edcf7e38938abca25ba421e7e38a422db9c9
drh [Mon, 19 Feb 2018 20:41:01 +0000 (20:41 +0000)]
More test cases for unicode handling in printf.
FossilOrigin-Name:
ac188211119bfd77f43e4aba8acab733a56aac90b4c8a11f7ef8e6388582438f
drh [Mon, 19 Feb 2018 20:23:20 +0000 (20:23 +0000)]
Test cases and a bug fix on the new unicode handling in %c.
FossilOrigin-Name:
e41d64e95b9b6fec5dc329553822925e7d648a41912b420cfa1ba198736e6bab
drh [Mon, 19 Feb 2018 18:56:52 +0000 (18:56 +0000)]
Fix the %c substitution in printf() so that it works with unicode characters.
FossilOrigin-Name:
c35be1d9e9132fbadc74d207c1088e5a710a151c0835c38a63bf3c8e6fd711a0
drh [Mon, 19 Feb 2018 18:03:10 +0000 (18:03 +0000)]
Make the alternate-form-2 flag ("!") change the meaning of width and precision
from bytes to characters for the %q, %Q, and %w extensions of printf().
FossilOrigin-Name:
391540acbea34eb88c75b1152b458d8936b3fdfff47633b9ec897775b015ba4c
drh [Mon, 19 Feb 2018 17:03:23 +0000 (17:03 +0000)]
In the printf() library, measure width and precision in characters rather
than bytes if the "!" (alternate-form-2) flag is present on a %s or %z
substitution.
FossilOrigin-Name:
ca31c6630422fca70e626dd38aae96296bd8535d491ca52391624a5e7e663636
drh [Mon, 19 Feb 2018 16:34:31 +0000 (16:34 +0000)]
Only try to use the geteuid() interface on unix if HAVE_FCHOWN is defined.
This fixes the build for vxWorks, we are told.
FossilOrigin-Name:
38f654dc117bb11d61407327884b5c913cfaf920547bebc4ce5a4cf983e5c20e
drh [Mon, 19 Feb 2018 13:53:56 +0000 (13:53 +0000)]
Fix an assert so that it compares two CellInfo objects field by field
instead of using memcmp(). Memcmp() does not work on x86
because of uninitialized padding bytes.
FossilOrigin-Name:
88258770adead70fa101c74e266a37bb9aaffac0ba738a4b345617feb8c46477
drh [Sun, 18 Feb 2018 17:50:03 +0000 (17:50 +0000)]
Fix a memory leak in the processing of nested row values. This problem has
existed every since row values support was added (version 3.15.0, 2016-10-14)
but was only just now detected by OSSFuzz.
FossilOrigin-Name:
2df6bbf1b8ca881c8a465d6624de66fde4c5975ccae6b2f2dda392b137f577de
mistachkin [Sun, 18 Feb 2018 00:54:06 +0000 (00:54 +0000)]
Port mutex enhancments from check-in [
f53b8a573b ] to the Win32 implementation.
FossilOrigin-Name:
74bb7225d132c80fd5758bb8c120448e3b3e951d0ca2fa0c57cac0a9c6c27045
dan [Sat, 17 Feb 2018 07:38:50 +0000 (07:38 +0000)]
Fix a data race causing a tsan complaint with SQLITE_ENABLE_API_ARMOR builds
on unix. The race condition is not dangerous in practice, it just upsets tsan.
FossilOrigin-Name:
f53b8a573bfbb48780243d56ca8372165adb1b979731c43d46cd1f8eb7e593f3
drh [Thu, 15 Feb 2018 21:00:37 +0000 (21:00 +0000)]
Do not allow parameters or schema references inside of WITH clause of
triggers and views. This fixes a bug discovered by OSSFuzz and present
since common-table-expressions were first added in 2014-02-03.
FossilOrigin-Name:
b918d4b4e546d3903ff20efc3c8ca26dd9761cc8ed9ef7d2799b66ff9ae1ae51
drh [Thu, 15 Feb 2018 03:56:33 +0000 (03:56 +0000)]
Improve performance of editdist3() by keeping the costs in sorted order.
Also add a new regression test to editdist3().
FossilOrigin-Name:
dc734c5b61464dfd6bfa7963f2ecce32e405a0c2ba1ef6f453ec9389da080256
drh [Thu, 15 Feb 2018 03:05:56 +0000 (03:05 +0000)]
Reduce the number of calls to strncmp() required to run editDist3Core().
FossilOrigin-Name:
afd6fbc01052ccfc9bd29fb8f934b291b8f56af44fcae870da7e1355fe95c29a
drh [Thu, 15 Feb 2018 01:03:37 +0000 (01:03 +0000)]
Fix the --heap, --pagecache, --lookaside and other options to the command-line
shell that invoke sqlite3_config() so that they work again.
FossilOrigin-Name:
00707f2f2f746a6421f3e2de995e68cc8adba7225a04db6b28db52944e7e988e
drh [Wed, 14 Feb 2018 23:27:43 +0000 (23:27 +0000)]
Add the --readonly option to the ".open" command in the CLI.
FossilOrigin-Name:
06870bb15656b50b0e14d4364bb21afac76500e313ecf67aaef3688d603fd076
drh [Wed, 14 Feb 2018 20:58:36 +0000 (20:58 +0000)]
Performance optimizations to the editdist3() function in the spellfix
extension.
FossilOrigin-Name:
70d304dcbac4c3fd5e3b96108bffea2ce6c0db19c847397d5c5e268bb90a981d
drh [Wed, 14 Feb 2018 20:25:33 +0000 (20:25 +0000)]
Disable assert() in the spellfix extension if not compiled with SQLITE_DEBUG.
FossilOrigin-Name:
3c53ee0fdea4cbf2590e2b289b021b0ef8b7ead2945db1bdfc767432d9447acb
drh [Wed, 14 Feb 2018 15:30:48 +0000 (15:30 +0000)]
New test cases for the editdist3() function in the spellfix extension.
FossilOrigin-Name:
2d3f1f22d53034576a0ec8d9c360fb19efbb05b2e95ad1b09d120fb1b7da33fd
drh [Wed, 14 Feb 2018 14:13:09 +0000 (14:13 +0000)]
Try to optimize spellfix1 by storing a NULL in the k1 column of %_vocab
if it would otherwise have the same value as the word column.
FossilOrigin-Name:
b76ec7cb5841f9ad02b342271e91c5f5a598006f69df7953a6213c706e01f7a2
drh [Tue, 13 Feb 2018 19:13:05 +0000 (19:13 +0000)]
drh [Tue, 13 Feb 2018 18:48:08 +0000 (18:48 +0000)]
Fix an incorrect table lookup used to find the appropriate search operator
for a WHERE clause on a row-value inequality. The incorrect table lookup
was causing an incorrect answer for the less-than operator.
Fix for ticket [
f484b65f3d6230593c34f11 ]
FossilOrigin-Name:
f3112e67cdb27c1aec8d2cee3cb91ade061d093e13505894698e26336898b336
drh [Tue, 13 Feb 2018 16:30:19 +0000 (16:30 +0000)]
dan [Tue, 13 Feb 2018 16:21:32 +0000 (16:21 +0000)]
Ensure that multiple updates of the same FTS4 row (i.e. the row with the same
rowid) within a single transaction are written to separate segments. Fix for
[
d6ec09ec ].
FossilOrigin-Name:
d2a81a3752a8298ee65fddcf32dee2147ba6467f770315a41966b3533977aa64
drh [Mon, 12 Feb 2018 20:50:28 +0000 (20:50 +0000)]
Updates to the speed-check.sh script for improvements to the --vdbeprofile
option.
FossilOrigin-Name:
f89c8f8ecd67f72ee730a2a334dff69b406a3dd00f50abbb54c4dc86cfab1bd1
drh [Mon, 12 Feb 2018 20:27:34 +0000 (20:27 +0000)]
When compiling with VDBE_PROFILE, add the sqlite3NProfileCnt global variable
which can be used to measure per-opcode values other than elapse time, if
non-zero.
FossilOrigin-Name:
d44d5936428859b6d3e089d9835acb8ca1f3c0a85b59eeaa619170623e7dcc30
dan [Mon, 12 Feb 2018 15:27:32 +0000 (15:27 +0000)]
Update test file func6.test so that it works with SQLITE_ENABLE_NULL_TRIM
builds.
FossilOrigin-Name:
e128d72f1a565551d3b6fdb3807fcb1c2a2bf355f0c09d04562b62f49d01fdbc
drh [Mon, 12 Feb 2018 13:30:34 +0000 (13:30 +0000)]
Fix a possible infinite loop in VACUUM that can come up when the schema
has been carefully corrupted. Problem discovered by OSSFuzz. Test cases
in TH3.
FossilOrigin-Name:
27754b74ddf6463c6f9c48ea0df3637945b5ea086b92a41ddeb55b9aaefea4c2
drh [Sat, 10 Feb 2018 02:31:30 +0000 (02:31 +0000)]
Fix misplaced testcase() macros from the previous check-in.
FossilOrigin-Name:
3aed949a18a251c5795f21f0385c205a127502b7e9cf06bc7f4c763951cd7984
drh [Fri, 9 Feb 2018 23:25:14 +0000 (23:25 +0000)]
Improve the performance of the built-in REPLACE() function in cases where
it does many substitutions that make the string larger. OSSFuzz is reporting
intermittant timeouts when running a test where it does a REPLACE() on a
930KB random blob. Perhaps this enhancement will fix that.
FossilOrigin-Name:
fab2c2b07b5d3cd851db3e6f5c8a44155e32b0df22905ea33412b153b825a928
drh [Fri, 9 Feb 2018 20:49:15 +0000 (20:49 +0000)]
Add the zorder.c extension implementing zorder() and unzorder() SQL functions.
FossilOrigin-Name:
a57a77dc0cc9fbaa9d5b134422f7a8cc8d4c2851ed3c2bdd449800c6a5d2aae0
dan [Fri, 9 Feb 2018 15:42:40 +0000 (15:42 +0000)]
Make the tests in func6.test more robust against implementation changes.
FossilOrigin-Name:
b685d3231097fb90e7d61d9ac01cc560e8bf2671d49390ae7af5bfdbd6d04f11
drh [Fri, 9 Feb 2018 15:04:51 +0000 (15:04 +0000)]
mistachkin [Thu, 8 Feb 2018 01:00:11 +0000 (01:00 +0000)]
Enhance sqlite3ErrStr() to include several more error codes.
FossilOrigin-Name:
ad5d3bdc739a0997786f94fb5789b726b9f53ff883226093924338fe5000922b
mistachkin [Wed, 7 Feb 2018 18:45:00 +0000 (18:45 +0000)]
Fix typo in comment. Skip tests added by check-in [
4761db83b6 ] when running on Windows.
FossilOrigin-Name:
468a389cdc8b6f92c77b11f682e210ad8cce7e3dbc0df308a898f4115e85fce2
dan [Wed, 7 Feb 2018 18:02:50 +0000 (18:02 +0000)]
In extensions rtree, fts3 and fts5, ensure that when dynamic buffers are bound
to persistent SQL statements using SQLITE_STATIC, the binding is replaced with
an SQL NULL before the buffer is freed. Otherwise, a user may obtain a pointer
to the persistent statement using sqlite3_next_stmt() and attempt to access
the freed buffer using sqlite3_expanded_sql() or similar.
FossilOrigin-Name:
2a5f813bc61f9e780f2ccbda425611f65ad523b6d486a1e5e2b9d5e9f1d260a2
dan [Wed, 7 Feb 2018 16:14:41 +0000 (16:14 +0000)]
When the final connection disconnects from a wal mode database, check that the
database file has not been moved or unlinked before deleting the wal and shm
files.
FossilOrigin-Name:
4761db83b6d3d57f281370899403c102e39ad0021d315dd6a6912d250436782a
mistachkin [Mon, 5 Feb 2018 21:02:47 +0000 (21:02 +0000)]
Adjust the previous check-in, which modified the Win32 VFS, so that it works with SQLITE_OMIT_WAL.
FossilOrigin-Name:
36c2e67e82626f8d0a187c6c286c133ed659889e3b577469261b9dcd3b3ab75b
mistachkin [Mon, 5 Feb 2018 20:42:50 +0000 (20:42 +0000)]
Allocation the mutex used by the Win32 VFS only once at initialization, instead of every time it is needed.
FossilOrigin-Name:
535ed0ac5e8728ec91fc0a4cb54b820923d161cfd4e0e6aed6df6cdae365bc7d
drh [Mon, 5 Feb 2018 16:39:12 +0000 (16:39 +0000)]
Allocation the mutex used by the unix VFS only once at initialization, instead
of every time it is needed.
FossilOrigin-Name:
5764dc160783f5c4017204b3e26a89d31240c868484ced8214c9ad872bd77bd4
dan [Mon, 5 Feb 2018 13:42:45 +0000 (13:42 +0000)]
dan [Mon, 5 Feb 2018 13:28:51 +0000 (13:28 +0000)]
Update test file walro2.test to account for systems with a page-size
(getpagesize()) larger than 32KB.
FossilOrigin-Name:
d9e59cfb8476e1ec1ca458b8382172526c0557ab785f41e31971d03045c9344c
drh [Sun, 4 Feb 2018 20:33:13 +0000 (20:33 +0000)]
In the CLI,
make sure sqlite3_initialize() is called correctly even for non-UTF8 hosts.
FossilOrigin-Name:
a3591fb54178b8f124207ff16e3ef9e58a62585feb3a56ced2b862222aea19d8
mistachkin [Sun, 4 Feb 2018 01:30:54 +0000 (01:30 +0000)]
Fix harmless compiler warning seen with MSVC.
FossilOrigin-Name:
63a914410b5750bd08836864ae456ff09549487c5ce49706fedffa3d4f973059
mistachkin [Sun, 4 Feb 2018 01:29:01 +0000 (01:29 +0000)]
Move variable declaration in zipfile extension to fix MSVC compiler error.
FossilOrigin-Name:
ac6a32482e675871c3ce5ecc727e50e4bba649e80e3c55bf99025fed5667da94
dan [Fri, 2 Feb 2018 16:28:19 +0000 (16:28 +0000)]
Remove the "include <io.h>" win32 dependency from the zipfile extension.
FossilOrigin-Name:
cb3feb3bc33718625159eddbf8ef608cd641af84e97d433d6b11ba6da94dad2e
dan [Fri, 2 Feb 2018 16:20:41 +0000 (16:20 +0000)]
Remove the time() dependency from the zipfile extension. Use SQLite VFS
methods instead.
FossilOrigin-Name:
0702fb5611c7cf0154c5490eeada66afc733731dff0fe030375bae6a72123a17
dan [Thu, 1 Feb 2018 20:42:23 +0000 (20:42 +0000)]
Add a few more zipfile tests. No changes to code.
FossilOrigin-Name:
3f621545879ea39502cfaf2b61883f92c077070274b4fdf45524ded81cac3e63
dan [Thu, 1 Feb 2018 19:41:23 +0000 (19:41 +0000)]
Fix a problem triggered when a zipfile virtual table is created and written to
within the same transaction. And add other zipfile test.
FossilOrigin-Name:
48f1c556994d7f8f359c649a1da81eec02306106b68946a9a20b276742c4610d
drh [Thu, 1 Feb 2018 15:57:00 +0000 (15:57 +0000)]
New assert() statements to help ensure that no other errors similar
to [
343634942dd54ab57b7 ] ever appear in the code.
FossilOrigin-Name:
5a70af1e9c567f12c997d25d0a305a8d42bf2cc92f2811e9d5fdde720665e213
dan [Thu, 1 Feb 2018 15:19:54 +0000 (15:19 +0000)]
Fix a memory leak that could follow an IO error in the zipfile extension. And
add other tests.
FossilOrigin-Name:
e6bb750697c3c7ceb5ce41d216e8ef6a1d556822a3b55e0a007b4a03e194a7d9