Commit Graph

18849 Commits

Author SHA1 Message Date
mistachkin
ac8ba26ecb Fix utility compilation issues with MSVC.
FossilOrigin-Name: 5bd5a79898790bef150b2bc7f275333444b1a723385e595931377ff4d32190bf
2018-03-07 14:42:17 +00:00
drh
b0f0dc3073 Add the sqlite3_serialize() and sqlite3_deserialize() interfaces, enabled
when the -DSQLITE_ENABLE_DESERIALIZE compile-time option is used.

FossilOrigin-Name: fc42d31d6fca21abc5377a463ed800e3066b2f3fbd2d85cb486f402d2ae7cb15
2018-03-07 13:01:54 +00:00
drh
4811a710af Mark an unreachable branch using NEVER().
FossilOrigin-Name: fadbc5e23f93bedd705bdc83cd3781b3821a231034bae5b942c94da77227721c
2018-03-07 01:37:05 +00:00
drh
9c6396ecc7 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
2018-03-06 21:43:19 +00:00
drh
8784efaea9 Handle some boundary cases in memdb associated with OOM faults.
FossilOrigin-Name: b58ca4cb0c921e81efad527c80b220be120263cfdb04528ae26ecf8b8f66f44a
2018-03-06 20:54:27 +00:00
drh
14714167f7 Simplifications to the memdb VFS.
FossilOrigin-Name: 6c3f723a6856fa38ea3f11a36b56f46c5c1fcf17f4daf712e5e0b42562d5f4c6
2018-03-06 19:14:32 +00:00
dan
a48b020ddd Avoid running a couple of tests in crash8.test that depend on the presence of
the journal file if running on an F2FS file-system that does not require a
journal file.

FossilOrigin-Name: 797e02e0ee703ab0fd53e26ba5c96ac7429b8022522bec201423718d508acf24
2018-03-06 11:46:34 +00:00
drh
5f9d192de9 Improvements to the memdb VFS.
FossilOrigin-Name: a14fed69d0d4932fc6c71cf8acc5199cca4efbd10bca563a8e86038d6afd5c64
2018-03-06 04:01:08 +00:00
drh
bcdb28dff3 Merge the walIteratorInit() fix from trunk.
FossilOrigin-Name: 6399e101d5f6b8582640e0d90783e56042eaa1600db3bd02f8df5e7b01ac1cab
2018-03-06 02:00:20 +00:00
drh
49cc2f3b9c 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
2018-03-05 23:23:28 +00:00
drh
8d43d8443d Merge the session fix from trunk.
FossilOrigin-Name: 6274cf1f397d36be9e9b65b1935a776c834e4512e0e89f82c132efd4d1e8ef82
2018-03-05 21:19:57 +00:00
dan
6344edda80 Fix another crash in the sessions module triggered by malformed input.
FossilOrigin-Name: 7e70c9b86af557e86152748ddf1da467e62817b35df1da0d7d3b67941b198897
2018-03-05 21:17:20 +00:00
drh
ad7fd5d096 Improved command-line help for the -A option on the CLI.
FossilOrigin-Name: d937ac181c5c78b9e5068db4ff1dab6becdba8c22cd27a3cfa0d4c12da1ec7ad
2018-03-05 20:21:50 +00:00
drh
93b7731485 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
2018-03-05 20:20:22 +00:00
drh
da57d9676a In the CLI, add a new command-line option "--archive" (also "--ar") that
passes all subsequent arguments to the ".archive" command.

FossilOrigin-Name: a5c4d30af1271dea2d322b0679fe963bbd0d5db6bba8904caf5e30e510d01832
2018-03-05 19:34:05 +00:00
drh
f111203287 Merge session fixes from trunk.
FossilOrigin-Name: 99c02aeecf47bfa5be5ce38a7ec20818ea0f9fb960b136184e1cb6f8fb8b70e5
2018-03-05 18:20:35 +00:00
dan
9c42626e43 In sqlite3_checker, wrap the call to "SELECT checkfreelist()" in a
transaction.

FossilOrigin-Name: 02906e55d73ea3521ad1e6807cffed5c759147f7b2d89efc4add984e53e3ad49
2018-03-02 20:00:42 +00:00
dan
f0cb61d6c2 In a checkpoint, figure out if it is possible to checkpoint any frames at all
before creating the wal-iterator.

FossilOrigin-Name: 044b0b65e716bffeddedbd1b0360c4c332f6d2359167c1d327a5ff96539474cb
2018-03-02 16:52:47 +00:00
dan
302ce47519 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
2018-03-02 15:42:20 +00:00
drh
b2194cea4e Allow the zSchema argument to sqlite3_serialize() to be NULL to mean the
main database.

FossilOrigin-Name: 5b01b9914fb612ceece34f40d45c7eb97c3504fc5a0a5ff0e67120bdee67f6ee
2018-03-01 22:18:26 +00:00
mistachkin
5e9825ecc4 Typo fixes in comments. No changes to code.
FossilOrigin-Name: 1293d4f64f322ee57510bdff497c54e0be2c9205217e1fd96887bba1f36bec40
2018-03-01 18:09:02 +00:00
dan
e341ec699f Fix further crashes in sqlite3changeset_apply() caused by corrupt changeset
blobs.

FossilOrigin-Name: 2c01c72e357296d761493aac47329f15d87afcada2b39606fc018af0e0011bb5
2018-03-01 15:20:33 +00:00
drh
2825e4ebb1 Merge the latest enhancements from trunk.
FossilOrigin-Name: c8083de14b54fba1071385f8530d03d5684efd4963fde0f83ddc53ae3118a75b
2018-03-01 13:44:40 +00:00
dan
dd8a4af8e7 Fix some crashes in the sqlite3changeset_apply() function that could be caused
by corrupt changeset blobs.

FossilOrigin-Name: 745a9a7fef0f28a57ea3f44899058993f6ecdedda52c81a09a4a9ce09c9004d6
2018-03-01 12:05:51 +00:00
drh
bda30ce4d8 Enhance the sessions documentation to show the methods of the various objects.
FossilOrigin-Name: e01177754ad6d9e2d38adddddd2e2e212094dac1154bda5fcee61ca8b678ae0f
2018-02-28 22:21:29 +00:00
drh
6a8a629e6b 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
2018-02-28 21:50:00 +00:00
drh
d7fd899eeb Fix a potential NULL pointer deref following OOM in the new IS TRUE
logic.

FossilOrigin-Name: 48775ec693c21927ff26448acc614dd67d56240fa263499da2a9fe405c546c32
2018-02-28 04:30:55 +00:00
drh
5597cd42b8 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
2018-02-27 15:40:59 +00:00
drh
96acafbea7 Clean up comments and variable names prior to merge.
FossilOrigin-Name: 6445519e91c4f98b4a9a45d5091d733c31497ebf0eb23a76edce3091f626035d
2018-02-27 14:49:25 +00:00
drh
e39ef31cd6 Remove an unnecessary decision.
FossilOrigin-Name: adcb4665490404e8da2de128dd5df9aeed8e08893649dedb6788ebb5d957b400
2018-02-27 00:58:13 +00:00
drh
43c4ac8bfe Code simplifications. New test cases.
FossilOrigin-Name: 57508518ef9d003d259ba98dcc32e5104aca26731a7161808741fe10bc0830d0
2018-02-26 21:26:27 +00:00
drh
171d16bb21 Get the "DEFAULT true" and "DEFAULT false" phrases working correctly in
CREATE TABLE.

FossilOrigin-Name: 8002f87d96b3f885cd208e7d204907a33ba60c4057ce2338b71e2de41215b0e5
2018-02-26 20:15:54 +00:00
drh
3432821192 Enhance TreeView so that it can display the new IS TRUE expression trees.
FossilOrigin-Name: 7e38305e6f71c3353df3d11d099e255eefbacceafd7ed2ccaba257fe2e7b8c38
2018-02-26 19:03:25 +00:00
drh
8abed7b907 Refactor for correct NULL handling in the IS TRUE, IS FALSE, IS NOT TRUE,
and IS NOT FALSE operators.

FossilOrigin-Name: cf2abd59be9971a55bd3d6c5df374c6aaa23bf81819482b42f01ee2484dcd739
2018-02-26 18:49:05 +00:00
mistachkin
6bd4140d33 More tests pursuant to ticket [36fae083b450e3af857a459e20].
FossilOrigin-Name: c26f236da61aef7c7a8fe38f1c7f33eea894c8fae38de6a085d4cce933a70502
2018-02-26 17:03:03 +00:00
mistachkin
f7e867c347 Fix heap issue in the shell on Win32 caused by allocator mismatch.
FossilOrigin-Name: 7b3a75519aa72a6b49a125ee84946ba2c0722dd6644ee0c80ba567eb85daf5c9
2018-02-26 16:49:20 +00:00
drh
bc8f68a3a0 Merge the fix for determining truth of floating point values from trunk.
FossilOrigin-Name: 003dc140536d0dd4384252ae1b82827b5d8b2b399520f99549b9266a482009fb
2018-02-26 15:31:39 +00:00
drh
1fcfa7240f Always interpret non-zero floating-point values as true even if their
integer part is zero.  Fix for ticket [36fae083b450e3af857a459e20].

FossilOrigin-Name: a983fa857048c748112c2f805f13aadeae43b43b3d27fa55433a3699b51c9a0e
2018-02-26 15:27:31 +00:00
drh
007c843b0f 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
2018-02-26 03:20:18 +00:00
mistachkin
5facffbc70 Fix harmless compiler warnings in the zipfile extension seen with MSVC.
FossilOrigin-Name: 15c587cf6ffc920dc37f67cacb4f0db6a603fb998a22a639f755387910516414
2018-02-23 13:38:54 +00:00
mistachkin
fda0867873 Enable the JSON1 extension when compiling the test fixture with MSVC.
FossilOrigin-Name: e9e9f27b3d496531905ad7459cf60366ad3798f507266134dd6388cdec50fdc4
2018-02-23 13:38:20 +00:00
drh
4f46b58a2d 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
2018-02-22 18:30:53 +00:00
drh
d6ec7a6ab3 Updates to the README.md file. Mention the ability to use SQLite-archives for
download.

FossilOrigin-Name: ab9a7ae4eec0aaa5e0b472998f6de7212055d93c163f0b66da60b956bcc45add
2018-02-22 18:28:19 +00:00
drh
c0ec2f7762 Remove an unreachable branch in the walIndexPage() logic.
FossilOrigin-Name: 4e61a9731f5949dcf05c541106b56be16add04a7730613481fc8519d3e4f493b
2018-02-21 01:48:22 +00:00
drh
8d3e15eec4 Small performance improvement in sqltie3WalFindFrame().
FossilOrigin-Name: 52013cad0e6ce2d694f25e2984a76d438cef724f0e07c8bb9d3dce8a3caf4350
2018-02-21 01:05:37 +00:00
drh
4f4e49a98b Remove an unnecessary memset().
FossilOrigin-Name: e7b7f5884a78630c6ba6a217c36247397e62f1928d4b480df929efcfc4a01893
2018-02-21 00:48:02 +00:00
drh
2e178d7321 Make the walIndexPage() routine about 3x faster by factoring out the seldom
used reallocation logic into a separate subroutine.

FossilOrigin-Name: e2b107141cd97bd4ab240748a9ce43fc2ec950ea74610697a4a7a3d7a6441e6b
2018-02-20 22:20:57 +00:00
drh
7436f1e491 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
2018-02-20 17:02:31 +00:00
drh
3993678d3d Remove a superfluous "#if 1". No logic changes.
FossilOrigin-Name: caaffd32001ff44c31f2d6dbe921f9d294f869c2c4a81e943fdf3f43f8d9313c
2018-02-20 16:39:11 +00:00
drh
cc398969e0 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
2018-02-20 15:23:37 +00:00