Commit Graph

18105 Commits

Author SHA1 Message Date
drh 6f7fbcf0bb Size optimization in the authorizer error message generation logic.
FossilOrigin-Name: 0367a4d58682a64d7ed4c5a4b4377899e22432851587c649d419efb6d7bac250
2017-08-17 18:54:27 +00:00
drh efaffb64fd In sqlite3ViewGetColumnNames(), return the number of errors, not an error code.
FossilOrigin-Name: f13682ea2350ba366026a4a58e59591af378c496b92da60803c4c642c3bfc8de
2017-08-17 18:23:46 +00:00
drh 6362bbe68d The RTREE extension should return SQLITE_CORRUPT_VTAB, not just SQLITE_CORRUPT
when it encounters incorrectly formatted shadow tables.

FossilOrigin-Name: 0712f057ef3dcd907984dda30f6d961a29b61c1d2b25627028c4e227ec85dbba
2017-08-17 18:17:24 +00:00
drh 967f8f9e07 Remove an unnecessary branch from the [be436a7f4587ce517ddc] fix.
FossilOrigin-Name: fb6ca99b88c67414eab425e2b4ddb6a5e2fd48a6b2cd96a34627c86a5b568c9b
2017-08-17 14:47:56 +00:00
dan 865c3c58ab Add test cases for ticket [be436a7f4587ce517] using virtual table modules fts5
and rtree.

FossilOrigin-Name: 2101b4208787d297788e05f2bd82d4a9aff26e2237a7016ac857a52fb5252ce0
2017-08-17 14:12:16 +00:00
drh dc6b41ed47 Defer schema resets when the query planner is running.
Proposed fix for ticket [be436a7f4587ce517].

FossilOrigin-Name: a7bc7752ba0266684f5317e424a4ee9add4af002272082183519e708ab9ffc79
2017-08-17 02:26:35 +00:00
drh fe0cf7a18c Avoid a test for CURTYPE_BTREE in sqlite3VdbeCursorMoveto() in order to reduce
the size and improve the performance of OP_Column.

FossilOrigin-Name: f078deb25149b7b1881b7f3374b343d0677e82336d8fdd7f1cdd06d926b5dd57
2017-08-16 19:20:20 +00:00
drh 1f613c4df3 Remove an unnecessary local variable from OP_Column, for a small size
reduction and performance increase.

FossilOrigin-Name: 39543903282409ad3f139f8a0bb376661e7595a33af4f647945b1513a028ccb4
2017-08-16 14:16:19 +00:00
drh 95b225a46d Performance improvement in the OP_Column opcode.
FossilOrigin-Name: dc98a92f32511ee322b0207bd286e967248a8e59b418f11168eb31e34b0fa0fa
2017-08-16 11:04:22 +00:00
drh 6cd8c8c57a Small size and performance in the OP_Column opcode.
FossilOrigin-Name: 2cf3f3de8a48465bd6b0af7763bfe905f3bb0151488f63c9ecc3147bcb345094
2017-08-15 14:14:36 +00:00
drh 352a35abf5 Btree optimization: New field BtCursor.pPage that points to the current page,
saving a single pointer dereference on each access.

FossilOrigin-Name: 373b71d19cad785922d5a80828f2fee0cbe7dff6594743e625bbdfa31b1ca131
2017-08-15 03:46:47 +00:00
drh f38dd3b68f Minor size and performance optimization to sqlite3BtreeCloseCursor().
FossilOrigin-Name: 16969338841734d00ab906a94b82480c7e1e426eb0ddf7b9e6aed722aee5d91f
2017-08-14 23:53:02 +00:00
drh 44548e7218 Change the internal btree routine moveToRoot() to return SQLITE_EMPTY if
the table is empty or if it has pgnoRoot==0.  This simplifies the callers,
making them smaller and faster.  The SQLITE_EMPTY result code is intercepted
and changed into SQLITE_OK before surfacing in an API.

FossilOrigin-Name: 240d57143d943eaddd5f7c2d473f47a1d29417e61d28142f70f3d960bb9b30df
2017-08-14 18:13:52 +00:00
drh f0357d8b2c Fix harmless indentation error.
FossilOrigin-Name: 25e92baaaeb9e8a2650b3083d3febf3661ecf1e05d9d24b26fe9f87a03bdd8fa
2017-08-14 17:03:58 +00:00
drh 4dd89d5a24 Sometimes a TK_COLUMN Expr node can have Expr.pTab==0 if it is a reference
to an expression column in an index on and expression.  Fix for ticket
[aa98619ad08ddcab].

FossilOrigin-Name: d0da791ba0edfb65186459345e43500d8364a086a5a1651d828fecc1a1dd1edb
2017-08-14 14:53:24 +00:00
drh 1112cc797b Properly dequote column names in tables constructed by an aggregate SELECT.
FossilOrigin-Name: 7e0d3e9cb071873564b7916c022aba5cd9f3b8ebab9dba787ecd7113c5b7816a
2017-08-14 01:33:07 +00:00
dan 3c77a1e9f1 Add new test file fts5vocab2.test.
FossilOrigin-Name: 02174842c353bfaa747019cb3dcdee5bca6551d0a06d83fc1ac6d4569e16bc34
2017-08-12 18:31:31 +00:00
drh dccf4f2b15 Update the speed-check.sh test script to append log output to the end of the
cout-NAME.txt file.

FossilOrigin-Name: 14d262d6aa4e281dfe0490988f0c1965c4babf98038a1a96b9bb5772a61521a3
2017-08-12 02:16:34 +00:00
drh 3f18e6d7a9 Remove the zBase field from the StrAccum object. Resulting code is slightly
smaller and faster.

FossilOrigin-Name: 6e52fa5fd79988a433bae0152ceae036edab4bb18d2b48ed04c1f53f141728b0
2017-08-12 02:01:55 +00:00
drh 8abc80b294 Size and performance micro-optimization on sqlite3SrcListIndexedBy().
FossilOrigin-Name: 28a5aec118f9d078c9e7225f85cd48a91920b13908c540771e309557c3f15f84
2017-08-12 01:09:06 +00:00
drh b7f4b6ccca Fix compiler warnings that arise if the PAGERTRACE macro is turned on.
This changes does not affect production builds.

FossilOrigin-Name: 831156a4bd7c4408085f7c5584cdeebd1953c539972f80c5ef29bc147008630e
2017-08-11 18:59:00 +00:00
drh 140efc90ea Improved comments in the header of the LSM1 vtab module. No code changes.
FossilOrigin-Name: aa49926dbffaae4f7c486be72ad814f381cca65c549f9d2605f47540a5f4be84
2017-08-11 18:55:04 +00:00
drh cb96d2a79c New test cases for LSM1.
FossilOrigin-Name: cb0c49cbd1eede157c5bd60d1e28e02c642aefe1ff82553eac1117a4c73dd9db
2017-08-11 13:51:41 +00:00
drh 037a2bacb0 Convert the LSM1 virtual table to be WITHOUT ROWID and get UPDATE and DELETE
operations working on it.

FossilOrigin-Name: 2164031b509dc6eae367ffb9d915f3e1d33d26210506b2de8b2bfca38c53465f
2017-08-11 12:49:59 +00:00
drh f41a8d3d9a Simplification to the like optimization logic. Remove unnecessary branches.
FossilOrigin-Name: 9466d952e169a6a60f6e575e679a61f05887b51c693505764edaf10f62cd829f
2017-08-11 03:47:21 +00:00
drh 21f6b626f5 Allow WITHOUT ROWID virtual tables to be writable as long as they have
exactly one column as their PRIMARY KEY.

FossilOrigin-Name: c601d128ff1f1dd6d221ee9f55595a95b58ba07d043e1d530743ea913731560e
2017-08-10 20:43:07 +00:00
dan 7c3ca3611c Add the "instance" type to the fts5vocab virtual table module. For direct
access to the contents of the fts5 term index.

FossilOrigin-Name: 34a7bd7121a478e14982d59be95ad891fab8050ad5e006638f826c57c392b93e
2017-08-10 20:36:56 +00:00
dan 5b156b2bb4 Fix a typo in csv01.test introduced by the previous commit.
FossilOrigin-Name: f38ff718278c8ff477d1c6379ced32167063de15f0666c8eac2e4dd30cbd975c
2017-08-10 19:12:04 +00:00
dan 09fc79bd6f Add extra tests to this branch.
FossilOrigin-Name: b0e3b88a792623f7761586d8bfac058ddf939f49944ff0c4376627ff920895db
2017-08-10 19:10:23 +00:00
drh 4dd176eaab Test case for writing to a WITHOUT ROWID virtual table. The TCLVAR virtual
table is modified to add a "fullname" column which is the primary key, and
to accept update operations against the primary key.

FossilOrigin-Name: 6997e00c3221f266f4d9187501d8a9e5bafb85551e88a744cdc8ffe3b75ec2a4
2017-08-10 17:53:11 +00:00
drh e3740f272b Experimental changes that allow a WITHOUT ROWID virtual table to be writable
as long as it has only a single-column PRIMARY KEY.

FossilOrigin-Name: ab9ee4c1e64c09c7130e385a23d043d78bad95dff5509c7adc9b992350a4a537
2017-08-10 15:19:39 +00:00
drh 6fa9375c01 Add a first draft of the "vtablog" extensions that implements a generic
virtual table useful for experimentation using the command-line shell.

FossilOrigin-Name: e49279e65169a939b6058a0960dc1fe09ce4ee2d78992a1969773cbc7ce1043b
2017-08-10 03:27:27 +00:00
drh 7524b613c5 Preserve the error code from xConnect or xCreate methods in virtual table
implementations when they are encountered during parsing.

FossilOrigin-Name: dcdf091388251292ff9939bdff920708320bc64dacfe0fa1878c5ffd11b679c9
2017-08-09 22:55:09 +00:00
drh 73e00cf056 Various bug fixes for the new LSM1 virtual table design.
FossilOrigin-Name: 94434a252f0f2b57f325fd8fb82534f20cc1340ff13076cd88deeb47740ef6a2
2017-08-09 19:27:24 +00:00
drh 2e27d28fec Work toward redesigning the interface to the LSM1 virtual table.
FossilOrigin-Name: 313df946668b943b0a9a9a91fd7bafa7212d05765c7714fa6c0de46aa9062a74
2017-08-09 18:40:35 +00:00
drh ca03bdaf6e The identifier "vsnprintf" appears to be a reserved word in recent versions
of XCode, so avoid using it as a structure field.

FossilOrigin-Name: 795eede331b832a53e886318466dedc12504f7181c1d7295af7935864a04b72c
2017-08-08 21:40:23 +00:00
drh b8313cc998 Fix a faulty signed/unsigned character comparison in the LIKE optimization
logic.

FossilOrigin-Name: f4a4b1497355c1b27d3d0770550fffcc3b2d2d51ab284101f19e8fc4264ee675
2017-08-08 21:30:43 +00:00
drh 4f57352937 Enhance the CSV virtual table extension so that it accepts the last row of
the CSV file even if the last row omits the closing \n, as long as the last
row has a full set of columns.

FossilOrigin-Name: 537e3be2e9503183799afffcd91defc751fea2c779e9b77b77f9485f7de5d170
2017-08-08 20:03:10 +00:00
dan b46dfdb81c Avoid casting a value larger than 2^31 to a (size_t) or (SIZE_T) on systems
where it is a 32-bit type.

FossilOrigin-Name: b26d7a1c7b5d59a2ceabc3716ccea32e26de729eb164a9c0e47f2d8f6ad3df37
2017-08-07 19:12:49 +00:00
mistachkin e35395a45a 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
2017-08-07 19:06:54 +00:00
dan 089df50687 Fix a problem with handling SQLITE_FCNTL_MMAP_SIZE requests with a negative
parameter in os_unix.c.

FossilOrigin-Name: 4249fcf7b0c0233f9b3ba5139702738d5221c5309240e6e91dc139eff59471fe
2017-08-07 18:54:10 +00:00
dan 010a016ac9 Update bigmmap.test to account for builds that use
"-DSQLITE_MAX_MMAP_SIZE=<integer-constant>LL".

FossilOrigin-Name: 7c8b6f1cace42ee1182c252c8e66e5679f523f4248c27d38c075ae21e7c25374
2017-08-07 18:27:19 +00:00
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