Commit Graph

17936 Commits

Author SHA1 Message Date
drh 0019881e08 Faster implementation of resolveP2Values().
FossilOrigin-Name: 82e46fe0d497f871e652a579f25e77de7ef05d56484418961a1296f65f19415e
2017-08-02 02:46:43 +00:00
drh 6903bf6d49 Slightly smaller and faster by allocating Parser objects on the stack.
FossilOrigin-Name: 436a89b91901851ce21bf0cb997291b48888c52788b904822083d8dfac32b84b
2017-08-01 20:59:41 +00:00
drh 86b40dfd33 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
2017-08-01 19:53:43 +00:00
drh b7673ede37 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
2017-08-01 14:16:15 +00:00
drh e9e1074d27 Allow ATTACH and DETACH inside of a transaction.
FossilOrigin-Name: 95e8f31658254dd2df3eeaae337aff0fe2125d170ae966c74f4fc70400e099b1
2017-08-01 00:20:34 +00:00
mistachkin 334d163e41 Recognize 'AMD64' as 'x64' in the TclKit batch tool for MSVC.
FossilOrigin-Name: 0c77935cf9949099d834ec51384c1d4dcdaf7b4422c859c9fce6d3cb3bde2645
2017-07-31 19:39:34 +00:00
mistachkin 5b54259873 Sync up the MSVC autoconf makefile.
FossilOrigin-Name: b3b89f4ff92ee4b76f467d4e70fb42267470aef77af645f1ce71f9b1a675aabb
2017-07-31 19:26:06 +00:00
drh ab2eca0965 Fix a windows-compatibility issue in the recently added schema6.test script.
FossilOrigin-Name: 14e6c302ec3bc0e012b3c01aabee2d32e81389e1a4d834d1c57dd60bfbc97f29
2017-07-31 17:51:49 +00:00
drh 93bbfbe539 Prevent OSSFuzz from using debugging pragmas that are disabled in default builds
and which generate lots of excess output.

FossilOrigin-Name: cdc6494c050d821908087e6fd9b1e44ba92d81f363494a80b54647f19e5675f7
2017-07-31 17:06:34 +00:00
drh c644980c4d 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
2017-07-31 16:42:46 +00:00
drh ea2844f153 Add the schema6.test module for demonstrating schemas that generate identical
and different content.

FossilOrigin-Name: ac1da06a829051d393ccb8bb986e78f5bd35b060687688f6b3661913b13c9a5a
2017-07-30 19:50:42 +00:00
drh df94966c8b 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
2017-07-30 18:40:52 +00:00
drh ce00d05a7b New test cases for column name generation interacting with the query flattener.
FossilOrigin-Name: 0c38dde4543d6183a6ab0b7b3b75819f56c47704756a2426d54d3f20468d78d8
2017-07-29 17:02:22 +00:00
drh f35f2f92ed 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
2017-07-29 16:01:55 +00:00
mistachkin 7751deb3e2 Update Tcl version used by the TclKit batch tool for MSVC.
FossilOrigin-Name: bcec155e0d6c6b17ae09d5a366c080723d01ff40dbc1a0ad0bb669a91db1b850
2017-07-28 22:22:15 +00:00
mistachkin f6285fab68 Fix harmless compiler warning.
FossilOrigin-Name: 3286e1a07b0693049a07f0865bf93749c461ea8f6d1175ec2d1642886673d8ac
2017-07-28 22:13:26 +00:00
drh 2fc2f92ed6 Disable the writecrash.test module on Windows.
FossilOrigin-Name: 4c0520d4df7473eb4cc764774df7d99bb96cf067ac224755e09f0df47fb2a810
2017-07-28 20:49:02 +00:00
drh 9e61104c68 More precise determination of when an in-memory journal needs to be
spilled to disk.

FossilOrigin-Name: 6a505bdd9347783d3d8105cb8185aa787801bad0c855b623cfd780fb406f0e7b
2017-07-28 18:16:14 +00:00
drh 344f763f72 Add new extended error codes for the atomic write file-controls.
FossilOrigin-Name: 94a2004756ffe027b3495be91366750135c294a9c460edc9a1b4b9422dcc33bd
2017-07-28 13:18:35 +00:00
dan 2912da0283 Add new test file test/atomic.test.
FossilOrigin-Name: f9213e4864d0542be5489e03cf40c47d9127a86bbbbbabd963aa08525d5dc97b
2017-07-28 11:05:33 +00:00
drh a66632d83a Add the SQLITE_ENABLE_BATCH_ATOMIC_WRITE macro to ctime.c
FossilOrigin-Name: 67bad7fb9b2fdb29b63308f22062444084dc28191a542e08076dc2e39caf6f62
2017-07-28 01:53:32 +00:00
drh 1d42ea71c2 Enhance the like optimization so that it works with an ESCAPE clause.
FossilOrigin-Name: f5d330f495d07a704e115595bbdf5422ddb68fd8191114c5a12c9c873d983f7c
2017-07-27 20:24:29 +00:00
drh 01d837df9c Increase the version number to 3.21.0 in anticipation for changes to go
into the next release.

FossilOrigin-Name: 0645f25c79c1b2af1fd3a02b44090329d456e373d91f6c284b8fbcb929e03a5d
2017-07-27 19:59:37 +00:00
drh 2036833a66 Merge the pointer-passing interface changes from the 3.20 branch.
FossilOrigin-Name: c63903a4c5d52a490e3f26707aa85fb54d4e2e8a3ce31ca26a9c615fe7a51e97
2017-07-27 18:49:19 +00:00
drh 761decbb50 Simplified documentation for the pointer passing interface.
FossilOrigin-Name: 2dfcd9a8ecdf0ddd8e044d820639830c6171141c588cf0224255af85c64cf79c
2017-07-27 18:43:13 +00:00
dan 77b4f528fa Do not set device-capabilities flags SEQUENTIAL or SAFE_APPEND for f2fs
file-systems.

FossilOrigin-Name: 4477e60cd801dab7a8aec12c5bc5e81e774bedbfed38abbc8eb8b37336141a44
2017-07-27 18:34:00 +00:00
drh 05cccc2848 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
2017-07-27 17:45:08 +00:00
drh 34fcf36d62 In sqlite3_bind_pointer(), invoke the destructor if the bind index is
out of range, like sqlite3_bind_blob() does.

FossilOrigin-Name: d6684d2a744e6e04b8796c3b5ecb81c6577728b698c1ab5f4a828b2ac114b8a2
2017-07-27 16:42:36 +00:00
drh a0024e6c99 Improved implementation of the destructor on pointer-passing interfaces.
FossilOrigin-Name: 601ad6795927fff8c3cc1711a2fd90912499573e94aa5bc8f18cbd4b89778f58
2017-07-27 15:53:24 +00:00
drh 22930062d5 Add a destructor argument to sqlite3_bind_pointer()
and sqlite3_result_pointer().

FossilOrigin-Name: 3d9e841f6011480ebb8a6d860da72af7fa545983e08835ddef2cac96e5f5cd4b
2017-07-27 03:48:02 +00:00
drh 8257aa8dbe 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
2017-07-26 19:59:13 +00:00
drh cf201488a5 Allow ATTACH and DETACH to occur inside of a transaction.
FossilOrigin-Name: ac1fd6beb6c804af5faf1e06a51177a8316007ff9e718c398bd7a24d2ecc4ed3
2017-07-26 18:26:44 +00:00
drh 61ffb2cda6 Fix a comment on the UnpackedRecord.r1 and UnpackedRecord.r2 fields.
No changes to code.

FossilOrigin-Name: 622b108915c7982b29ca9920abde941fff55234b70af9ac4122e4827b35d985c
2017-07-26 10:04:51 +00:00
drh 1fc376bfd1 Release candidate 2 for 3.20.0.
FossilOrigin-Name: f39cb76b3347baba22f2c329e74036710b64620414433a952de8d44da79ba8d9
2017-07-25 15:12:01 +00:00
drh e8cf1ab9aa Fix a bug in the deterministic date/time function logic that can only appear
with STAT3 or STAT4.

FossilOrigin-Name: 1ca707a4fb8db7aa85430413164265607ce727fc8a5afc3424b3abfb59921b39
2017-07-25 01:34:05 +00:00
dan b67abfc463 Do not attempt to run test file unionvtabfault.test with SQLITE_OMIT_VIRTUAL_TABLE builds.
FossilOrigin-Name: 1a632a9a6c85b78abe0351ef91c7478b26299c4c1c269d5796afb1e172084517
2017-07-24 20:01:36 +00:00
dan fb920e7eb0 Do not attempt to run test file unionvtab.test with SQLITE_OMIT_VIRTUAL_TABLE
builds.

FossilOrigin-Name: 9a5a3d60a5c6ce23bbdab5832f706bee8acdc4b1767aeed82b1aceb294f050f7
2017-07-24 19:25:45 +00:00
drh e8e0eda95d Handle a real OOM condition when incrblob2.test is run on a low-memory machine.
FossilOrigin-Name: f483d06a9af8d6771090551d911831e1df13bb05a6b7780499594703c28ebbb2
2017-07-24 17:37:35 +00:00
drh 1d8536bc0f Additional documentation on sqlite3_bind_pointer() and sqlite3_result_pointer().
No changes to code.

FossilOrigin-Name: b1572d4e05934a0dc1b73092acba652fa50e97552eb6e9a1cedea7c71055804b
2017-07-24 15:29:16 +00:00
drh caf8cc1b4b Compiler warning fix associated with date/time functions.
FossilOrigin-Name: a98f07d942f0b8cc15da57b84e6340efae72ff19516fa04624242240af43a697
2017-07-24 14:44:15 +00:00
dan 33447e7793 Add a test for the outcome of a process crash within an xWrite VFS method
call.

FossilOrigin-Name: eb8718006cb23ba9304da5c30d19863d688495f0eaae3794c5ad870e481866f8
2017-07-22 20:12:31 +00:00
dan 4da30f8888 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
2017-07-22 16:58:47 +00:00
drh 2df9478f5f 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
2017-07-22 16:32:33 +00:00
drh d76dba7eb5 Omit unused batch-atomic-write code if SQLITE_ENABLE_BATCH_ATOMIC_WRITE is
not defined.

FossilOrigin-Name: a89b62c4966cd297326e8712da40e0962d2328d7ba1f201d5abcec911eeef347
2017-07-22 16:00:34 +00:00
dan 9d70954094 Use ioctl(F2FS_IOC_GET_FEATURES) to determine whether or not atomic batch
writes are available.

FossilOrigin-Name: 532bbf1f2b1028db4e581c756533aa660e482d833caaed4eafb299ef9b584f3a
2017-07-21 21:06:24 +00:00
mistachkin 07c3a1a358 Remove stray (and incomplete) comment from a test file. No changes to code.
FossilOrigin-Name: 8de20fc72a9b55fabd2444b2d73c88c65658430d6d182da9f0e2f3432373ab51
2017-07-21 20:31:31 +00:00
mistachkin 172861be76 Fix typo in comment. No changes to code.
FossilOrigin-Name: 65ec077ba63ab84ab8da91033adcf4a57bb9269ebcdd10f9e6c97c265512a80c
2017-07-21 20:29:06 +00:00
drh d080e3d7ac Additional documentation on the new VFS interface. No changes to code.
FossilOrigin-Name: 83077ec8b5804e6c709fa4f0b50afec9eae6d5b603cc4c3e8a408ed6b2bfaf28
2017-07-21 14:49:58 +00:00
drh 35270d2604 Add the documentation text for the new VFS interfaces used by batch-atomic
writes.

FossilOrigin-Name: 5e944eea5a32cb4d27a2d5ae283b9ce6fe08c1bc584256e8e8c78583c415eb2a
2017-07-20 21:18:49 +00:00
drh 94e32acb56 Transform two #ifdef statements into #if statements.
FossilOrigin-Name: f2c6b5845028ef25dcd17e23e11b93c9f7296c26c7a21718fdae8f4b48c4e1da
2017-07-20 21:01:53 +00:00