Commit Graph

17963 Commits

Author SHA1 Message Date
dan
43c1e622cd Avoid casting a value larger than 2^31 to a (size_t) on systems where it
is a 32-bit type.

FossilOrigin-Name: 46c3085dcad6372ac20eff499e17fe11680fdf4adb9186bf8b12221a5047e485
2017-08-07 18:13:28 +00:00
mistachkin
54640de156 Fix an out-of-order test number.
FossilOrigin-Name: 38f30091f9b1e2c393396da7257f3487fa374e1ee6d610577291909768ff9626
2017-08-07 17:28:18 +00:00
dan
969012e534 Add new test file "bigmmap.test". For testing builds with
-DSQLITE_MAX_MMAP_SIZE > 2GB.

FossilOrigin-Name: 17447062799239ee978bedbf7fcc67f4c7d2cad2e82dcf9349a966fc8f67d390
2017-08-07 17:14:30 +00:00
dan
226744d11b 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
2017-08-05 16:15:33 +00:00
drh
eabb67fb61 Microoptimization in pcache1.c makes the code slightly smaller and faster.
FossilOrigin-Name: 422cd9f39403feeacd70133c7a147e23572c75d617ac564344f016ae6611162c
2017-08-05 15:49:03 +00:00
dan
7d90417733 Fix memory leak in swarmvtab.
FossilOrigin-Name: 002a9c7baccf3417c56ec7d16755ea32fdd70a654ffc75f2fc4624fd2b688aed
2017-08-05 15:30:46 +00:00
drh
1451778a88 Add the swarm virtual table to the existing union virtual table module.
FossilOrigin-Name: 0f6f6f03deaba2f4bdd168980647136e8ddff4907863b62b3056b8e4665599df
2017-08-04 20:27:13 +00:00
drh
a5aed4b10b Add the optional non-found-callback to the swarm-vtab.
FossilOrigin-Name: a94e2f600bc766fb459418e674b842628ba21e27cf9942c00cd533507d7b35fe
2017-08-04 20:15:08 +00:00
dan
d83e082524 Add further test cases for swarmvtab. And minor code changes.
FossilOrigin-Name: 0f82d3b9dd5bd2e34a984c78e4a4a87921cf3e15b01b611133378c0ea9901010
2017-08-04 17:39:13 +00:00
dan
0ff2217035 Add test cases and associated fixes for swarmvtab.
FossilOrigin-Name: 7ae20eac83fc053dc1bbc42501dd41f77445a6b9a33cfa42b899fc7a18c637ab
2017-08-04 16:16:32 +00:00
dan
f12228fa23 Add SQLITE_API qualifiers to public API functions in header file sqlite3rbu.h.
FossilOrigin-Name: e11e6eb1d98518ba3f0361efa1c274084c5d6325b52e8470b6873e14e00c4eff
2017-08-04 08:24:52 +00:00
dan
f5f0e43a6d Update script tool/mksqlite3c.tcl to avoid duplicating the SQLITE_API
qualifier when copying sqlite3rbu.h into the amalgamation.

FossilOrigin-Name: 61ab112f326a51d2d524a6371d8c93851ca2c6917414a802ac72d7cf5a2413fb
2017-08-04 08:23:33 +00:00
dan
a64d1fbc23 Modify swarmvtab to use a separate database connection for each database file.
FossilOrigin-Name: 1f05ad29c3a540408470da7f8111f1319f961539c1a96b1a81abf1423af90f15
2017-08-03 20:13:00 +00:00
dan
f48d4ef8bc Add SQLITE_API qualifiers to public API functions in header file sqlite3rbu.h.
FossilOrigin-Name: d8637badf63b90b650e9d6dc970c7e1ce46669ce8272f46f01fac9bd97c1b0fc
2017-08-03 15:50:10 +00:00
dan
0c2e5cfda5 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
2017-08-03 15:43:55 +00:00
drh
5859636fb1 Optimization to the comparison opcodes in the byte-code engine.
FossilOrigin-Name: 654935c7737f1a9e08fde9b220c543e86ff6e05910e2f08973a2f93ab2b3e028
2017-08-03 00:29:23 +00:00
drh
a485ad191f 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
2017-08-02 22:43:14 +00:00
dan
63331b1af3 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
2017-08-02 19:59:56 +00:00
drh
754ee285fa Avoid redundant calls to sqlite3ApiExit() in sqlite3_step().
FossilOrigin-Name: 527974d4caba8bce7c89a28ea04a573b14c558657c14d9ad3c64bf1e0884caf8
2017-08-02 19:04:37 +00:00
drh
59533aa5e0 Only attempt to invoke WAL callbacks when a transaction has committed.
FossilOrigin-Name: bcc6dacb9114df709ef1bde24264c2193d9e39fc7fab024d5ebfc6056033274c
2017-08-02 18:28:26 +00:00
drh
60172a5a93 Minor optimization on clearCell()
FossilOrigin-Name: f3c39c2986be08683c2af4df610bc12e3c6bc6bec265c94ce01b94a950723524
2017-08-02 18:27:50 +00:00
drh
85ef630fde Optimizations associated with error handling in btree cursors.
FossilOrigin-Name: 49ba54e26731ed371745d4bdd9dd1dfeb73357b6d206c85a4252ec866be971d0
2017-08-02 15:50:09 +00:00
drh
57498ae9cf Remove unused token codes.
FossilOrigin-Name: c45078c062f41f43c71965b2e5a97932ff79123eeb017ba853314987bebc2bca
2017-08-02 12:38:10 +00:00
drh
13aa88d956 Rearrange some of the added token codes for a very slight size decrease and
performance increase.

FossilOrigin-Name: cb3742f51f4b3aa0fd8dc373af771e93ddb4100787115705955f2008aef92745
2017-08-02 11:36:16 +00:00
drh
6a8700b97b Rearrange integer token values in the parser and logic in the
resolveP2Values() routine for a small size reduction and performance increase.

FossilOrigin-Name: 1cad2926ad88b83becab1326bd189d7bac8ba6d470b36ba5d29af5c9fb016014
2017-08-02 11:04:00 +00:00
drh
a02860511d Show which opcodes are jumps in the comments when generating
the opcodes.h header file.

FossilOrigin-Name: eef643a369250f1acac4c01a9b3d29068a510e5bf7fa843d565df5e2523e4dd9
2017-08-02 03:21:52 +00:00
drh
59c435a015 Add the "%token" control to the lemon parser. Not currently used by SQLite.
FossilOrigin-Name: a6e4c5ae8f29bc2e7f2088426341254e9281d19db9dc9a14abc376d56dad4c4b
2017-08-02 03:21:11 +00:00
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