]> git.ipfire.org Git - thirdparty/sqlite.git/log
thirdparty/sqlite.git
7 years agoOn Windows, avoid casting a value larger than 2^31 to a (SIZE_T) on systems where... mmap-size-limit
mistachkin [Mon, 7 Aug 2017 19:06:54 +0000 (19:06 +0000)] 
On Windows, avoid casting a value larger than 2^31 to a (SIZE_T) on systems where it is a 32-bit type.

FossilOrigin-Name: f08d63b413601b22726e8b96ff8eb779857321b9df30db0333f71e50ffb5077d

7 years agoFix a problem with handling SQLITE_FCNTL_MMAP_SIZE requests with a negative
dan [Mon, 7 Aug 2017 18:54:10 +0000 (18:54 +0000)] 
Fix a problem with handling SQLITE_FCNTL_MMAP_SIZE requests with a negative
parameter in os_unix.c.

FossilOrigin-Name: 4249fcf7b0c0233f9b3ba5139702738d5221c5309240e6e91dc139eff59471fe

7 years agoUpdate bigmmap.test to account for builds that use
dan [Mon, 7 Aug 2017 18:27:19 +0000 (18:27 +0000)] 
Update bigmmap.test to account for builds that use
"-DSQLITE_MAX_MMAP_SIZE=<integer-constant>LL".

FossilOrigin-Name: 7c8b6f1cace42ee1182c252c8e66e5679f523f4248c27d38c075ae21e7c25374

7 years agoAvoid casting a value larger than 2^31 to a (size_t) on systems where it
dan [Mon, 7 Aug 2017 18:13:28 +0000 (18:13 +0000)] 
Avoid casting a value larger than 2^31 to a (size_t) on systems where it
 is a 32-bit type.

FossilOrigin-Name: 46c3085dcad6372ac20eff499e17fe11680fdf4adb9186bf8b12221a5047e485

7 years agoFix an out-of-order test number.
mistachkin [Mon, 7 Aug 2017 17:28:18 +0000 (17:28 +0000)] 
Fix an out-of-order test number.

FossilOrigin-Name: 38f30091f9b1e2c393396da7257f3487fa374e1ee6d610577291909768ff9626

7 years agoAdd new test file "bigmmap.test". For testing builds with
dan [Mon, 7 Aug 2017 17:14:30 +0000 (17:14 +0000)] 
Add new test file "bigmmap.test". For testing builds with
-DSQLITE_MAX_MMAP_SIZE > 2GB.

FossilOrigin-Name: 17447062799239ee978bedbf7fcc67f4c7d2cad2e82dcf9349a966fc8f67d390

7 years agoFix a segfault in swarmvtab that could occur if there was an error in the SQL
dan [Sat, 5 Aug 2017 16:15:33 +0000 (16:15 +0000)] 
Fix a segfault in swarmvtab that could occur if there was an error in the SQL
statement passed to the constructor. Add other test cases.

FossilOrigin-Name: 6ce8b7ca62fcf97875395fc1a989179309e0abb48d4465658ef0d871434ea057

7 years agoMicrooptimization in pcache1.c makes the code slightly smaller and faster.
drh [Sat, 5 Aug 2017 15:49:03 +0000 (15:49 +0000)] 
Microoptimization in pcache1.c makes the code slightly smaller and faster.

FossilOrigin-Name: 422cd9f39403feeacd70133c7a147e23572c75d617ac564344f016ae6611162c

7 years agoFix memory leak in swarmvtab.
dan [Sat, 5 Aug 2017 15:30:46 +0000 (15:30 +0000)] 
Fix memory leak in swarmvtab.

FossilOrigin-Name: 002a9c7baccf3417c56ec7d16755ea32fdd70a654ffc75f2fc4624fd2b688aed

7 years agoAdd the swarm virtual table to the existing union virtual table module.
drh [Fri, 4 Aug 2017 20:27:13 +0000 (20:27 +0000)] 
Add the swarm virtual table to the existing union virtual table module.

FossilOrigin-Name: 0f6f6f03deaba2f4bdd168980647136e8ddff4907863b62b3056b8e4665599df

7 years agoAdd the optional non-found-callback to the swarm-vtab. union-vtab
drh [Fri, 4 Aug 2017 20:15:08 +0000 (20:15 +0000)] 
Add the optional non-found-callback to the swarm-vtab.

FossilOrigin-Name: a94e2f600bc766fb459418e674b842628ba21e27cf9942c00cd533507d7b35fe

7 years agoAdd further test cases for swarmvtab. And minor code changes.
dan [Fri, 4 Aug 2017 17:39:13 +0000 (17:39 +0000)] 
Add further test cases for swarmvtab. And minor code changes.

FossilOrigin-Name: 0f82d3b9dd5bd2e34a984c78e4a4a87921cf3e15b01b611133378c0ea9901010

7 years agoAdd test cases and associated fixes for swarmvtab.
dan [Fri, 4 Aug 2017 16:16:32 +0000 (16:16 +0000)] 
Add test cases and associated fixes for swarmvtab.

FossilOrigin-Name: 7ae20eac83fc053dc1bbc42501dd41f77445a6b9a33cfa42b899fc7a18c637ab

7 years agoAdd SQLITE_API qualifiers to public API functions in header file sqlite3rbu.h.
dan [Fri, 4 Aug 2017 08:24:52 +0000 (08:24 +0000)] 
Add SQLITE_API qualifiers to public API functions in header file sqlite3rbu.h.

FossilOrigin-Name: e11e6eb1d98518ba3f0361efa1c274084c5d6325b52e8470b6873e14e00c4eff

7 years agoUpdate script tool/mksqlite3c.tcl to avoid duplicating the SQLITE_API sqlite3rbu.h-fix
dan [Fri, 4 Aug 2017 08:23:33 +0000 (08:23 +0000)] 
Update script tool/mksqlite3c.tcl to avoid duplicating the SQLITE_API
qualifier when copying sqlite3rbu.h into the amalgamation.

FossilOrigin-Name: 61ab112f326a51d2d524a6371d8c93851ca2c6917414a802ac72d7cf5a2413fb

7 years agoModify swarmvtab to use a separate database connection for each database file.
dan [Thu, 3 Aug 2017 20:13:00 +0000 (20:13 +0000)] 
Modify swarmvtab to use a separate database connection for each database file.

FossilOrigin-Name: 1f05ad29c3a540408470da7f8111f1319f961539c1a96b1a81abf1423af90f15

7 years agoAdd SQLITE_API qualifiers to public API functions in header file sqlite3rbu.h.
dan [Thu, 3 Aug 2017 15:50:10 +0000 (15:50 +0000)] 
Add SQLITE_API qualifiers to public API functions in header file sqlite3rbu.h.

FossilOrigin-Name: d8637badf63b90b650e9d6dc970c7e1ce46669ce8272f46f01fac9bd97c1b0fc

7 years agoFix some problems in RBU test cases. Also update RBU source code to better
dan [Thu, 3 Aug 2017 15:43:55 +0000 (15:43 +0000)] 
Fix some problems in RBU test cases. Also update RBU source code to better
handle the trivial case where an RBU update is applied to a database zero
pages in size.

FossilOrigin-Name: 7676b39bc120ae23da0c6a14452eb99a58901ee45c3d43b8beae426f9e4dc0c3

7 years agoOptimization to the comparison opcodes in the byte-code engine.
drh [Thu, 3 Aug 2017 00:29:23 +0000 (00:29 +0000)] 
Optimization to the comparison opcodes in the byte-code engine.

FossilOrigin-Name: 654935c7737f1a9e08fde9b220c543e86ff6e05910e2f08973a2f93ab2b3e028

7 years agoIn the KeyInfo object, refactor the nField and nXField elements into
drh [Wed, 2 Aug 2017 22:43:14 +0000 (22:43 +0000)] 
In the KeyInfo object, refactor the nField and nXField elements into
nKeyField and nAllField, which are more useful and run a little faster.

FossilOrigin-Name: aea5990eab5e85f92df966aa641db2271c81052010ad2d80982475c4275a1284

7 years agoEnhance the code in unionvtab.c to also provide the "swarmvtab" virtual table
dan [Wed, 2 Aug 2017 19:59:56 +0000 (19:59 +0000)] 
Enhance the code in unionvtab.c to also provide the "swarmvtab" virtual table
module. There are still several problems on this branch.

FossilOrigin-Name: 03d94388d62fd0f1fae377d273bbd5561208adc34bd97f7ce27783b30a369fd7

7 years agoAvoid redundant calls to sqlite3ApiExit() in sqlite3_step().
drh [Wed, 2 Aug 2017 19:04:37 +0000 (19:04 +0000)] 
Avoid redundant calls to sqlite3ApiExit() in sqlite3_step().

FossilOrigin-Name: 527974d4caba8bce7c89a28ea04a573b14c558657c14d9ad3c64bf1e0884caf8

7 years agoOnly attempt to invoke WAL callbacks when a transaction has committed.
drh [Wed, 2 Aug 2017 18:28:26 +0000 (18:28 +0000)] 
Only attempt to invoke WAL callbacks when a transaction has committed.

FossilOrigin-Name: bcc6dacb9114df709ef1bde24264c2193d9e39fc7fab024d5ebfc6056033274c

7 years agoMinor optimization on clearCell()
drh [Wed, 2 Aug 2017 18:27:50 +0000 (18:27 +0000)] 
Minor optimization on clearCell()

FossilOrigin-Name: f3c39c2986be08683c2af4df610bc12e3c6bc6bec265c94ce01b94a950723524

7 years agoOptimizations associated with error handling in btree cursors.
drh [Wed, 2 Aug 2017 15:50:09 +0000 (15:50 +0000)] 
Optimizations associated with error handling in btree cursors.

FossilOrigin-Name: 49ba54e26731ed371745d4bdd9dd1dfeb73357b6d206c85a4252ec866be971d0

7 years agoRemove unused token codes.
drh [Wed, 2 Aug 2017 12:38:10 +0000 (12:38 +0000)] 
Remove unused token codes.

FossilOrigin-Name: c45078c062f41f43c71965b2e5a97932ff79123eeb017ba853314987bebc2bca

7 years agoRearrange some of the added token codes for a very slight size decrease and
drh [Wed, 2 Aug 2017 11:36:16 +0000 (11:36 +0000)] 
Rearrange some of the added token codes for a very slight size decrease and
performance increase.

FossilOrigin-Name: cb3742f51f4b3aa0fd8dc373af771e93ddb4100787115705955f2008aef92745

7 years agoRearrange integer token values in the parser and logic in the
drh [Wed, 2 Aug 2017 11:04:00 +0000 (11:04 +0000)] 
Rearrange integer token values in the parser and logic in the
resolveP2Values() routine for a small size reduction and performance increase.

FossilOrigin-Name: 1cad2926ad88b83becab1326bd189d7bac8ba6d470b36ba5d29af5c9fb016014

7 years agoShow which opcodes are jumps in the comments when generating
drh [Wed, 2 Aug 2017 03:21:52 +0000 (03:21 +0000)] 
Show which opcodes are jumps in the comments when generating
the opcodes.h header file.

FossilOrigin-Name: eef643a369250f1acac4c01a9b3d29068a510e5bf7fa843d565df5e2523e4dd9

7 years agoAdd the "%token" control to the lemon parser. Not currently used by SQLite.
drh [Wed, 2 Aug 2017 03:21:11 +0000 (03:21 +0000)] 
Add the "%token" control to the lemon parser.  Not currently used by SQLite.

FossilOrigin-Name: a6e4c5ae8f29bc2e7f2088426341254e9281d19db9dc9a14abc376d56dad4c4b

7 years agoFaster implementation of resolveP2Values().
drh [Wed, 2 Aug 2017 02:46:43 +0000 (02:46 +0000)] 
Faster implementation of resolveP2Values().

FossilOrigin-Name: 82e46fe0d497f871e652a579f25e77de7ef05d56484418961a1296f65f19415e

7 years agoSlightly smaller and faster by allocating Parser objects on the stack.
drh [Tue, 1 Aug 2017 20:59:41 +0000 (20:59 +0000)] 
Slightly smaller and faster by allocating Parser objects on the stack.

FossilOrigin-Name: 436a89b91901851ce21bf0cb997291b48888c52788b904822083d8dfac32b84b

7 years agoSplit the OP_Last opcode into OP_Last and OP_SeekEnd. Use OP_SeekEnd to
drh [Tue, 1 Aug 2017 19:53:43 +0000 (19:53 +0000)] 
Split the OP_Last opcode into OP_Last and OP_SeekEnd.  Use OP_SeekEnd to
position a cursor prior to appending.  Ticket [cb91bf4290c211d].

FossilOrigin-Name: 3e02474c7bbe16891a7cfc8771cf72f64cd2c0692779037982d7d307512a4f23

7 years agoTake advantage of atomic-write capabilities in the F2FS filesystem when the
drh [Tue, 1 Aug 2017 14:16:15 +0000 (14:16 +0000)] 
Take advantage of atomic-write capabilities in the F2FS filesystem when the
database is stored on such a filesystem.  This is a compile-time option
activated using SQLITE_ENABLE_BATCH_ATOMIC_WRITE.

FossilOrigin-Name: 24190b221f73472dafaead6de101b4debc2c91c1ca28d70b45a38df5bb61fb39

7 years agoAllow ATTACH and DETACH inside of a transaction.
drh [Tue, 1 Aug 2017 00:20:34 +0000 (00:20 +0000)] 
Allow ATTACH and DETACH inside of a transaction.

FossilOrigin-Name: 95e8f31658254dd2df3eeaae337aff0fe2125d170ae966c74f4fc70400e099b1

7 years agoRecognize 'AMD64' as 'x64' in the TclKit batch tool for MSVC.
mistachkin [Mon, 31 Jul 2017 19:39:34 +0000 (19:39 +0000)] 
Recognize 'AMD64' as 'x64' in the TclKit batch tool for MSVC.

FossilOrigin-Name: 0c77935cf9949099d834ec51384c1d4dcdaf7b4422c859c9fce6d3cb3bde2645

7 years agoSync up the MSVC autoconf makefile.
mistachkin [Mon, 31 Jul 2017 19:26:06 +0000 (19:26 +0000)] 
Sync up the MSVC autoconf makefile.

FossilOrigin-Name: b3b89f4ff92ee4b76f467d4e70fb42267470aef77af645f1ce71f9b1a675aabb

7 years agoFix a windows-compatibility issue in the recently added schema6.test script.
drh [Mon, 31 Jul 2017 17:51:49 +0000 (17:51 +0000)] 
Fix a windows-compatibility issue in the recently added schema6.test script.

FossilOrigin-Name: 14e6c302ec3bc0e012b3c01aabee2d32e81389e1a4d834d1c57dd60bfbc97f29

7 years agoPrevent OSSFuzz from using debugging pragmas that are disabled in default builds
drh [Mon, 31 Jul 2017 17:06:34 +0000 (17:06 +0000)] 
Prevent OSSFuzz from using debugging pragmas that are disabled in default builds
and which generate lots of excess output.

FossilOrigin-Name: cdc6494c050d821908087e6fd9b1e44ba92d81f363494a80b54647f19e5675f7

7 years agoMove the generation of output column names earlier, to right after
drh [Mon, 31 Jul 2017 16:42:46 +0000 (16:42 +0000)] 
Move the generation of output column names earlier, to right after
name resolution and before query transformations such as flattening.
This prevents the names from getting mangled by query transformations,
and obviates hacks in the query flattener that attempt to work around
the name mangling. The resulting code is smaller and faster and gives
more consistent output. Fix to ticket [de3403bf5ae5f72ed].

FossilOrigin-Name: ade7ddf1998190b2b630715774963150d86bed3211b7fd600cbf3068427e1531

7 years agoAdd the schema6.test module for demonstrating schemas that generate identical
drh [Sun, 30 Jul 2017 19:50:42 +0000 (19:50 +0000)] 
Add the schema6.test module for demonstrating schemas that generate identical
and different content.

FossilOrigin-Name: ac1da06a829051d393ccb8bb986e78f5bd35b060687688f6b3661913b13c9a5a

7 years agoCorrectly handle an "INTEGER PRIMARY KEY UNIQUE" column in a WITHOUT ROWID
drh [Sun, 30 Jul 2017 18:40:52 +0000 (18:40 +0000)] 
Correctly handle an "INTEGER PRIMARY KEY UNIQUE" column in a WITHOUT ROWID
table.  This is a fix for ticket [bc115541132dad136], a problem discovered
by OSSFuzz.

FossilOrigin-Name: 5216bfb73f1a49bdd879d470de139bf46a212474eaf6f38ad2390536d66a2afd

7 years agoNew test cases for column name generation interacting with the query flattener. early-column-names
drh [Sat, 29 Jul 2017 17:02:22 +0000 (17:02 +0000)] 
New test cases for column name generation interacting with the query flattener.

FossilOrigin-Name: 0c38dde4543d6183a6ab0b7b3b75819f56c47704756a2426d54d3f20468d78d8

7 years agoMove the generation of output column names earlier, to right after name
drh [Sat, 29 Jul 2017 16:01:55 +0000 (16:01 +0000)] 
Move the generation of output column names earlier, to right after name
resolution and before query transformations such as flattening.  This prevents
the names from getting mangled by query transformations, and obviates hacks
in the query flattener that attempt to work around the name mangling.
The resulting code is smaller and faster and gives more consistent output.
This is an alternative fix to ticket [de3403bf5ae5f72ed].

FossilOrigin-Name: 09834279aeca3bda63de684a369ed64f2cbf587b5f5df1454c0a3c009a1337ad

7 years agoUpdate Tcl version used by the TclKit batch tool for MSVC.
mistachkin [Fri, 28 Jul 2017 22:22:15 +0000 (22:22 +0000)] 
Update Tcl version used by the TclKit batch tool for MSVC.

FossilOrigin-Name: bcec155e0d6c6b17ae09d5a366c080723d01ff40dbc1a0ad0bb669a91db1b850

7 years agoFix harmless compiler warning.
mistachkin [Fri, 28 Jul 2017 22:13:26 +0000 (22:13 +0000)] 
Fix harmless compiler warning.

FossilOrigin-Name: 3286e1a07b0693049a07f0865bf93749c461ea8f6d1175ec2d1642886673d8ac

7 years agoDisable the writecrash.test module on Windows. batch-atomic-write
drh [Fri, 28 Jul 2017 20:49:02 +0000 (20:49 +0000)] 
Disable the writecrash.test module on Windows.

FossilOrigin-Name: 4c0520d4df7473eb4cc764774df7d99bb96cf067ac224755e09f0df47fb2a810

7 years agoMore precise determination of when an in-memory journal needs to be
drh [Fri, 28 Jul 2017 18:16:14 +0000 (18:16 +0000)] 
More precise determination of when an in-memory journal needs to be
spilled to disk.

FossilOrigin-Name: 6a505bdd9347783d3d8105cb8185aa787801bad0c855b623cfd780fb406f0e7b

7 years agoAdd new extended error codes for the atomic write file-controls.
drh [Fri, 28 Jul 2017 13:18:35 +0000 (13:18 +0000)] 
Add new extended error codes for the atomic write file-controls.

FossilOrigin-Name: 94a2004756ffe027b3495be91366750135c294a9c460edc9a1b4b9422dcc33bd

7 years agoAdd new test file test/atomic.test.
dan [Fri, 28 Jul 2017 11:05:33 +0000 (11:05 +0000)] 
Add new test file test/atomic.test.

FossilOrigin-Name: f9213e4864d0542be5489e03cf40c47d9127a86bbbbbabd963aa08525d5dc97b

7 years agoAdd the SQLITE_ENABLE_BATCH_ATOMIC_WRITE macro to ctime.c
drh [Fri, 28 Jul 2017 01:53:32 +0000 (01:53 +0000)] 
Add the SQLITE_ENABLE_BATCH_ATOMIC_WRITE macro to ctime.c

FossilOrigin-Name: 67bad7fb9b2fdb29b63308f22062444084dc28191a542e08076dc2e39caf6f62

7 years agoEnhance the like optimization so that it works with an ESCAPE clause.
drh [Thu, 27 Jul 2017 20:24:29 +0000 (20:24 +0000)] 
Enhance the like optimization so that it works with an ESCAPE clause.

FossilOrigin-Name: f5d330f495d07a704e115595bbdf5422ddb68fd8191114c5a12c9c873d983f7c

7 years agoIncrease the version number to 3.21.0 in anticipation for changes to go
drh [Thu, 27 Jul 2017 19:59:37 +0000 (19:59 +0000)] 
Increase the version number to 3.21.0 in anticipation for changes to go
into the next release.

FossilOrigin-Name: 0645f25c79c1b2af1fd3a02b44090329d456e373d91f6c284b8fbcb929e03a5d

7 years agoMerge the pointer-passing interface changes from the 3.20 branch.
drh [Thu, 27 Jul 2017 18:49:19 +0000 (18:49 +0000)] 
Merge the pointer-passing interface changes from the 3.20 branch.

FossilOrigin-Name: c63903a4c5d52a490e3f26707aa85fb54d4e2e8a3ce31ca26a9c615fe7a51e97

7 years agoSimplified documentation for the pointer passing interface.
drh [Thu, 27 Jul 2017 18:43:13 +0000 (18:43 +0000)] 
Simplified documentation for the pointer passing interface.

FossilOrigin-Name: 2dfcd9a8ecdf0ddd8e044d820639830c6171141c588cf0224255af85c64cf79c

7 years agoDo not set device-capabilities flags SEQUENTIAL or SAFE_APPEND for f2fs
dan [Thu, 27 Jul 2017 18:34:00 +0000 (18:34 +0000)] 
Do not set device-capabilities flags SEQUENTIAL or SAFE_APPEND for f2fs
file-systems.

FossilOrigin-Name: 4477e60cd801dab7a8aec12c5bc5e81e774bedbfed38abbc8eb8b37336141a44

7 years agoAdd destructor functions for the pointer argument (NB: not the type string)
drh [Thu, 27 Jul 2017 17:45:08 +0000 (17:45 +0000)] 
Add destructor functions for the pointer argument (NB: not the type string)
to the sqlite3_bind_pointer() and sqlite3_result_pointer() interfaces.  Use
this new capability to resolve a pointer leak in the custom geometry function
mechanism of the RTREE extension.

FossilOrigin-Name: 5a2340b81faf0a29deb5b7c9a2ba6a7697d646de6cc4e9b2e6e5e6463fa394bd

7 years agoIn sqlite3_bind_pointer(), invoke the destructor if the bind index is pointer-with-destructor
drh [Thu, 27 Jul 2017 16:42:36 +0000 (16:42 +0000)] 
In sqlite3_bind_pointer(), invoke the destructor if the bind index is
out of range, like sqlite3_bind_blob() does.

FossilOrigin-Name: d6684d2a744e6e04b8796c3b5ecb81c6577728b698c1ab5f4a828b2ac114b8a2

7 years agoImproved implementation of the destructor on pointer-passing interfaces.
drh [Thu, 27 Jul 2017 15:53:24 +0000 (15:53 +0000)] 
Improved implementation of the destructor on pointer-passing interfaces.

FossilOrigin-Name: 601ad6795927fff8c3cc1711a2fd90912499573e94aa5bc8f18cbd4b89778f58

7 years agoAdd a destructor argument to sqlite3_bind_pointer()
drh [Thu, 27 Jul 2017 03:48:02 +0000 (03:48 +0000)] 
Add a destructor argument to sqlite3_bind_pointer()
and sqlite3_result_pointer().

FossilOrigin-Name: 3d9e841f6011480ebb8a6d860da72af7fa545983e08835ddef2cac96e5f5cd4b

7 years agoAdd the new sqlite3.mDbFlags field. Factor out bits of sqlite3.flags that
drh [Wed, 26 Jul 2017 19:59:13 +0000 (19:59 +0000)] 
Add the new sqlite3.mDbFlags field.  Factor out bits of sqlite3.flags that
do not interact with PRAGMA statements into sqlite3.mDbFlags.

FossilOrigin-Name: 3808a00f06d372cc531da039d97bd974e4a6576a30cf63bf562f83f186b313b3

7 years agoAllow ATTACH and DETACH to occur inside of a transaction. attach-in-trans
drh [Wed, 26 Jul 2017 18:26:44 +0000 (18:26 +0000)] 
Allow ATTACH and DETACH to occur inside of a transaction.

FossilOrigin-Name: ac1fd6beb6c804af5faf1e06a51177a8316007ff9e718c398bd7a24d2ecc4ed3

7 years agoFix a comment on the UnpackedRecord.r1 and UnpackedRecord.r2 fields.
drh [Wed, 26 Jul 2017 10:04:51 +0000 (10:04 +0000)] 
Fix a comment on the UnpackedRecord.r1 and UnpackedRecord.r2 fields.
No changes to code.

FossilOrigin-Name: 622b108915c7982b29ca9920abde941fff55234b70af9ac4122e4827b35d985c

7 years agoRelease candidate 2 for 3.20.0.
drh [Tue, 25 Jul 2017 15:12:01 +0000 (15:12 +0000)] 
Release candidate 2 for 3.20.0.

FossilOrigin-Name: f39cb76b3347baba22f2c329e74036710b64620414433a952de8d44da79ba8d9

7 years agoFix a bug in the deterministic date/time function logic that can only appear
drh [Tue, 25 Jul 2017 01:34:05 +0000 (01:34 +0000)] 
Fix a bug in the deterministic date/time function logic that can only appear
with STAT3 or STAT4.

FossilOrigin-Name: 1ca707a4fb8db7aa85430413164265607ce727fc8a5afc3424b3abfb59921b39

7 years agoDo not attempt to run test file unionvtabfault.test with SQLITE_OMIT_VIRTUAL_TABLE...
dan [Mon, 24 Jul 2017 20:01:36 +0000 (20:01 +0000)] 
Do not attempt to run test file unionvtabfault.test with SQLITE_OMIT_VIRTUAL_TABLE builds.

FossilOrigin-Name: 1a632a9a6c85b78abe0351ef91c7478b26299c4c1c269d5796afb1e172084517

7 years agoDo not attempt to run test file unionvtab.test with SQLITE_OMIT_VIRTUAL_TABLE
dan [Mon, 24 Jul 2017 19:25:45 +0000 (19:25 +0000)] 
Do not attempt to run test file unionvtab.test with SQLITE_OMIT_VIRTUAL_TABLE
builds.

FossilOrigin-Name: 9a5a3d60a5c6ce23bbdab5832f706bee8acdc4b1767aeed82b1aceb294f050f7

7 years agoHandle a real OOM condition when incrblob2.test is run on a low-memory machine.
drh [Mon, 24 Jul 2017 17:37:35 +0000 (17:37 +0000)] 
Handle a real OOM condition when incrblob2.test is run on a low-memory machine.

FossilOrigin-Name: f483d06a9af8d6771090551d911831e1df13bb05a6b7780499594703c28ebbb2

7 years agoAdditional documentation on sqlite3_bind_pointer() and sqlite3_result_pointer().
drh [Mon, 24 Jul 2017 15:29:16 +0000 (15:29 +0000)] 
Additional documentation on sqlite3_bind_pointer() and sqlite3_result_pointer().
No changes to code.

FossilOrigin-Name: b1572d4e05934a0dc1b73092acba652fa50e97552eb6e9a1cedea7c71055804b

7 years agoCompiler warning fix associated with date/time functions.
drh [Mon, 24 Jul 2017 14:44:15 +0000 (14:44 +0000)] 
Compiler warning fix associated with date/time functions.

FossilOrigin-Name: a98f07d942f0b8cc15da57b84e6340efae72ff19516fa04624242240af43a697

7 years agoAdd a test for the outcome of a process crash within an xWrite VFS method
dan [Sat, 22 Jul 2017 20:12:31 +0000 (20:12 +0000)] 
Add a test for the outcome of a process crash within an xWrite VFS method
call.

FossilOrigin-Name: eb8718006cb23ba9304da5c30d19863d688495f0eaae3794c5ad870e481866f8

7 years agoAdd the "atomic-batch-write" permutation to permutations.test. This
dan [Sat, 22 Jul 2017 16:58:47 +0000 (16:58 +0000)] 
Add the "atomic-batch-write" permutation to permutations.test. This
permutation fails if not run on a file-system that supports
atomic-batch-writes.

FossilOrigin-Name: 9f1b83fae9c973eee80eefefe7bd3a1eb7bba8af4cd919d7a2ce911900dd9087

7 years agoKeep batch-atomic-writes turned on for journal_mode=MEMORY, but turn them
drh [Sat, 22 Jul 2017 16:32:33 +0000 (16:32 +0000)] 
Keep batch-atomic-writes turned on for journal_mode=MEMORY, but turn them
off for synchronous=OFF.  Refuse to compile with both SQLITE_MMAP_READWRITE
and SQLITE_ENABLE_BATCH_ATOMIC_WRITE.  Fix up some comments in the commit
logic.

FossilOrigin-Name: 2e80e19e4faac30947ed56aa3601c45c758cafb27f84780df255fdbcdc9a6999

7 years agoOmit unused batch-atomic-write code if SQLITE_ENABLE_BATCH_ATOMIC_WRITE is
drh [Sat, 22 Jul 2017 16:00:34 +0000 (16:00 +0000)] 
Omit unused batch-atomic-write code if SQLITE_ENABLE_BATCH_ATOMIC_WRITE is
not defined.

FossilOrigin-Name: a89b62c4966cd297326e8712da40e0962d2328d7ba1f201d5abcec911eeef347

7 years agoUse ioctl(F2FS_IOC_GET_FEATURES) to determine whether or not atomic batch
dan [Fri, 21 Jul 2017 21:06:24 +0000 (21:06 +0000)] 
Use ioctl(F2FS_IOC_GET_FEATURES) to determine whether or not atomic batch
writes are available.

FossilOrigin-Name: 532bbf1f2b1028db4e581c756533aa660e482d833caaed4eafb299ef9b584f3a

7 years agoRemove stray (and incomplete) comment from a test file. No changes to code.
mistachkin [Fri, 21 Jul 2017 20:31:31 +0000 (20:31 +0000)] 
Remove stray (and incomplete) comment from a test file.  No changes to code.

FossilOrigin-Name: 8de20fc72a9b55fabd2444b2d73c88c65658430d6d182da9f0e2f3432373ab51

7 years agoFix typo in comment. No changes to code.
mistachkin [Fri, 21 Jul 2017 20:29:06 +0000 (20:29 +0000)] 
Fix typo in comment.  No changes to code.

FossilOrigin-Name: 65ec077ba63ab84ab8da91033adcf4a57bb9269ebcdd10f9e6c97c265512a80c

7 years agoAdditional documentation on the new VFS interface. No changes to code.
drh [Fri, 21 Jul 2017 14:49:58 +0000 (14:49 +0000)] 
Additional documentation on the new VFS interface.  No changes to code.

FossilOrigin-Name: 83077ec8b5804e6c709fa4f0b50afec9eae6d5b603cc4c3e8a408ed6b2bfaf28

7 years agoAdd the documentation text for the new VFS interfaces used by batch-atomic
drh [Thu, 20 Jul 2017 21:18:49 +0000 (21:18 +0000)] 
Add the documentation text for the new VFS interfaces used by batch-atomic
writes.

FossilOrigin-Name: 5e944eea5a32cb4d27a2d5ae283b9ce6fe08c1bc584256e8e8c78583c415eb2a

7 years agoTransform two #ifdef statements into #if statements.
drh [Thu, 20 Jul 2017 21:01:53 +0000 (21:01 +0000)] 
Transform two #ifdef statements into #if statements.

FossilOrigin-Name: f2c6b5845028ef25dcd17e23e11b93c9f7296c26c7a21718fdae8f4b48c4e1da

7 years agoSplit SQLITE_ENABLE_ATOMIC_WRITE into two options - the original and
dan [Thu, 20 Jul 2017 21:00:03 +0000 (21:00 +0000)] 
Split SQLITE_ENABLE_ATOMIC_WRITE into two options - the original and
SQLITE_ENABLE_BATCH_ATOMIC_WRITE.

FossilOrigin-Name: 7eb9bf2c5b42c39901fd571553c1f70aa5a9dac71fdc8e318b3063b928ad58f7

7 years agoFix a harmless typo, but one that would show up in the documentation if not
drh [Thu, 20 Jul 2017 20:49:41 +0000 (20:49 +0000)] 
Fix a harmless typo, but one that would show up in the documentation if not
fixed.

FossilOrigin-Name: e4b1dd36838c4a35913b393b5aad948db9eccfb89b2cd456a0227470d7ac4a26

7 years agoAdd support for F2FS atomic writes. Untested at this point.
dan [Thu, 20 Jul 2017 19:49:14 +0000 (19:49 +0000)] 
Add support for F2FS atomic writes. Untested at this point.

FossilOrigin-Name: 416973ede3bde8567d1f2699728f72352979e054ef988d1c1e1cfe4290f6f8b8

7 years agoEnhance the built-in date/time functions so that they can be used in
drh [Thu, 20 Jul 2017 15:08:43 +0000 (15:08 +0000)] 
Enhance the built-in date/time functions so that they can be used in
CHECK constraints, in the WHERE clause or partial indexes, and index
expressions, provided that none of the non-deterministic keywords
("now", "localtime", "utc") are used as arguments.

FossilOrigin-Name: a90c062d46c63a1e6f83064b1c5afb26a16e93b6ee8620ca46d169fdb325c488

7 years agoNew test cases for date/time functions in indexes on expressions, in the index-on-date-func
drh [Thu, 20 Jul 2017 14:36:26 +0000 (14:36 +0000)] 
New test cases for date/time functions in indexes on expressions, in the
WHERE clause of partial indexes, and in CHECK constraints.

FossilOrigin-Name: b7f70c7fcabc10b8b3e62fe5ac68476cec23acaee037c7250ff70bca3f3ab541

7 years agoCombine the Parse.ckBase and Parse.iSelfTab fields into just Parse.iSelfTab.
drh [Thu, 20 Jul 2017 13:17:08 +0000 (13:17 +0000)] 
Combine the Parse.ckBase and Parse.iSelfTab fields into just Parse.iSelfTab.
This fixes a problem with date/time functions in check-constraints.  Add
some test cases for date/time functions in index expressions and check
constraints.

FossilOrigin-Name: 22eda0985ecd1f456c073e6ad735a8417f3ff1fb6aaad1640e1cec01e50c51d8

7 years agoAllow indexes to be created on date/time functions as long as the 'now'
drh [Wed, 19 Jul 2017 19:48:40 +0000 (19:48 +0000)] 
Allow indexes to be created on date/time functions as long as the 'now'
date and the 'localtime' and 'utc' modifiers are not used.

FossilOrigin-Name: 0a5e1c04d9d07bb7fd6546a9ddac1bf42b19ea19c2b79570aea6cd4226887a27

7 years agoRemove some 'breakpoint' commands in test files.
mistachkin [Wed, 19 Jul 2017 18:01:42 +0000 (18:01 +0000)] 
Remove some 'breakpoint' commands in test files.

FossilOrigin-Name: d14fc621e918915bbf8e04597eb238ea78dff3d9c5eb4402cb88692d00dbdfee

7 years agoAdd further tests to unionvtab.test.
dan [Wed, 19 Jul 2017 11:52:25 +0000 (11:52 +0000)] 
Add further tests to unionvtab.test.

FossilOrigin-Name: c93284cd65b6471bffc38696e14dc24a2170698faf566cf91b727ba272f88c25

7 years agoAdd VFS interfaces needed to make use of batch atomic write capabilities
drh [Wed, 19 Jul 2017 11:20:32 +0000 (11:20 +0000)] 
Add VFS interfaces needed to make use of batch atomic write capabilities
in the underlying filesystem.

FossilOrigin-Name: 929bc46b8be0111a7b6e3d6fe129f0cad869c6a551bd47569c122742597b9f1c

7 years agoFix a crash in unionvtab caused by a misconfiguration. Add other test cases
dan [Tue, 18 Jul 2017 21:19:17 +0000 (21:19 +0000)] 
Fix a crash in unionvtab caused by a misconfiguration. Add other test cases
for the same.

FossilOrigin-Name: 255d6b99de2bb210c09ebee9f9481ba3d1130fda47e6e01b4cc8411d00679d09

7 years agoFix shell.c.in so that it aligns with shell.c.
drh [Tue, 18 Jul 2017 20:59:40 +0000 (20:59 +0000)] 
Fix shell.c.in so that it aligns with shell.c.

FossilOrigin-Name: 505fdc8ff5150276d3c6ab6135a542b791e9e79e2f76323e592b73b3fdc9bc2a

7 years agoAdd test cases and fix minor error-handling issues in unionvtab.c.
dan [Tue, 18 Jul 2017 20:49:15 +0000 (20:49 +0000)] 
Add test cases and fix minor error-handling issues in unionvtab.c.

FossilOrigin-Name: deadaad2a0801b3c30d2a076d8eb006b62d8557cff820e0939741c078477c83f

7 years agoFix duplicate test name. No changes to code.
mistachkin [Tue, 18 Jul 2017 20:30:55 +0000 (20:30 +0000)] 
Fix duplicate test name.  No changes to code.

FossilOrigin-Name: 47b80ecc679e656ef865e73809d6a9aa485eceeacab86d10d405881c5d9872bd

7 years agoFix another harmless compiler warning. Get the MSVC makefile working with unionvtab.
drh [Tue, 18 Jul 2017 20:28:34 +0000 (20:28 +0000)] 
Fix another harmless compiler warning.  Get the MSVC makefile working with unionvtab.

FossilOrigin-Name: d49639c208ac366f6c675ac5671accc2a597558b62a51520194276c61f32d406

7 years agoSuppress harmless compiler warnings in union-vtab.
drh [Tue, 18 Jul 2017 20:22:12 +0000 (20:22 +0000)] 
Suppress harmless compiler warnings in union-vtab.

FossilOrigin-Name: 4d147a1e28b93e267889fcb01b538d6a2a58d6b1655512c883fa5b53ddcc60a4

7 years agoRemove an unused variable from unionvtab.c.
dan [Tue, 18 Jul 2017 20:17:52 +0000 (20:17 +0000)] 
Remove an unused variable from unionvtab.c.

FossilOrigin-Name: a447fdf182c9090ca5b6c9c13147ae4b78d22d67f416ee7a0436ca408284c8fe

7 years agoImprove the readability of the unionvtab code.
dan [Tue, 18 Jul 2017 20:03:49 +0000 (20:03 +0000)] 
Improve the readability of the unionvtab code.

FossilOrigin-Name: 5bcf0f86ea7fbbc31a13b2d5b1cf93a92e46fb65fe8e779b3d7e4a98d60d7061

7 years agoHave unionvtab support constraints on the column that corresponds to the
dan [Tue, 18 Jul 2017 19:51:11 +0000 (19:51 +0000)] 
Have unionvtab support constraints on the column that corresponds to the
INTEGER PRIMARY KEY field of the underlying source tables in the same way as
rowid.

FossilOrigin-Name: 4a6c416fa025a34116ea30923a673cbb108b251b2676734ec8f603600e38e50e

7 years agoAdd test cases to unionvtab.test.
dan [Tue, 18 Jul 2017 18:50:37 +0000 (18:50 +0000)] 
Add test cases to unionvtab.test.

FossilOrigin-Name: 6c9128e1a53f8cf26de9ef1bc07051f2c94287531edacfcfb69d3cd7590240b3