1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-07-29 08:01:23 +03:00
Commit Graph

17168 Commits

Author SHA1 Message Date
drh
698a01ca2f Faster version of patternCompare() that uses new return values rather than
an extra parameter to communicate wildcard information back up to parent
searches.

FossilOrigin-Name: a1e2b6ce3af690ae91bda3d056357205c4018da7
2016-12-01 18:49:40 +00:00
dan
1a4a73764c Modify the patternCompare() function (used for GLOB, LIKE) to better handle
patterns containing multiple wildcard characters ("*", "%").

FossilOrigin-Name: c5e5614d98a752738c081fecdd1e349a1a92b0e5
2016-12-01 17:34:59 +00:00
drh
c9c81dc6d7 Add the remember(V,PTR) extension function which copies an SQL value into
an application variable.

FossilOrigin-Name: d2d30914d81022d7d4e1670caf9326524520deaf
2016-11-30 16:54:52 +00:00
drh
77320ea48d Fix then handling of the (oversized) integer literal -0x8000000000000000.
FossilOrigin-Name: 3816bb415ecfd4f36430d0fcbc878e382975de60
2016-11-30 14:47:37 +00:00
drh
ab5be2e651 Change the OP_DecrJumpZero opcode back to its old behavior of always
decrementing, except top the decrementing when it reaches the largest negative
number.

FossilOrigin-Name: 9d0d8c2e7c529562889de02346733dcb532e9388
2016-11-30 05:08:59 +00:00
drh
b5489b88b0 More improvements to boundary cases in the date/time functions, flowing out
of branch coverage testing.

FossilOrigin-Name: 1218005ab7b52ef45db1354d17fdd8a1a1af9854
2016-11-30 04:07:57 +00:00
drh
64777ba834 Prevent a warning about integer overflow when using a very large negative
LIMIT.

FossilOrigin-Name: 96106d5620eae51474234f4eec1d2c5bd570d486
2016-11-30 01:05:41 +00:00
drh
d76a902c87 Further changes to the date/time functions to suppress harmless signed
integer overflow warnings that could have occurred when doing out-of-range
date calculations which, according to the docs, give undefined results.

FossilOrigin-Name: dc453b3403450b1d8cc53daf0721fed025b9053c
2016-11-30 00:48:28 +00:00
drh
3edb157e23 The documentation says that the built-in date-time functions give undefined
results for dates before 0000-01-01 and after 9999-12-31.  Change the
actually implementation so that the answer given is really NULL.  This also
avoids unnecessary hand-wringing over an signed integer overflow that might
otherwise occur when processing out-of-bound dates.

FossilOrigin-Name: d410a839752153c6d8be08f758abfbc16475745a
2016-11-29 20:39:48 +00:00
drh
bc60368d6f Fix broken hyperlinks to the sqlite3_snapshot objection definition
in the documentation.  No changes to code.

FossilOrigin-Name: 9021f6875f897d8b609ebcc04162dc6e0b529a4a
2016-11-28 21:22:26 +00:00
dan
158e4e56d7 Simplify some code in fts5_expr.c. Add some extra test cases for the same.
FossilOrigin-Name: 7cc2d60dce90b8d4dca35708e33002ae6387806e
2016-11-28 14:52:23 +00:00
drh
dd5fa17d3c Add the sqlite3_snapshot_recover() interface and related functionality.
FossilOrigin-Name: b70c85ce6d07b08e13f4ea99edb8f4855a6d7580
2016-11-26 19:44:40 +00:00
drh
6412a4c8a5 Clarification of the behavior of sqlite3_stmt_readonly() on BEGIN IMMEDIATE
statements.  The is comment changes only - no changes to code.

FossilOrigin-Name: a4205a83e4ed977a89ecae665604993711f7dd3f
2016-11-25 20:20:40 +00:00
drh
9057fc7c7f Remove the OP_RowKey opcode. Use OP_RowData in its place.
FossilOrigin-Name: 6ac7b07a4aff2e1a9031289e3dafdb9ac0071c24
2016-11-25 19:32:32 +00:00
drh
cb3cabd01b Refactor the sqlite3BtreeKey() and sqlite3BtreeData() internal interfaces
into sqlite3BtreePayload() and sqlite3BtreePayloadChecked(), respectively.
This is a continuation of the optimization started by check-in
[2d831074cf].  The result is a slightly smaller and faster binary.

FossilOrigin-Name: 49ebc219faea30eaa61def4a3fba2817b9c58a86
2016-11-25 19:18:28 +00:00
drh
06a09a828a Small performance increase and size reduction in the OP_Column opcode.
FossilOrigin-Name: a9498407e646305e7b60115d63e85c642bbd1c3f
2016-11-25 17:03:03 +00:00
drh
e9bb566096 Performance enhancement to sqlite3_snprintf().
FossilOrigin-Name: c53dca7fadd81ea340fef776373cbb122c9ccd46
2016-11-25 15:47:53 +00:00
drh
043e586e29 Performance improvement in sqlite3StrAccumFinish() for the common case where
no memory allocation is required.

FossilOrigin-Name: b6acf5d4ef016326a079463e70e71c2fc95a352d
2016-11-25 15:11:26 +00:00
drh
36fd41e52b Add a comment to help clarify the EP_FromJoin hack in exprCodeBetween().
FossilOrigin-Name: 6df7c5747e0247b14bf015ef4320ddcf6fccf694
2016-11-25 14:30:42 +00:00
drh
36f49d0565 Fix the error message for invalid ".mode" arguments in the command-line shell,
so that it mentions the new "quote" mode.

FossilOrigin-Name: 9a603a18ef626b7d7a24b82eb961d6d8b4926195
2016-11-23 23:18:45 +00:00
dan
4b72524072 Code constant vector components outside of any loops in CASE and BETWEEN
expressions. Fix for [1a684656].

FossilOrigin-Name: c08aff13ead3e6a8b92c0f031b08f7e556922e70
2016-11-23 19:31:18 +00:00
drh
30642cf4d2 Correctly display the names of SQL functions in the VDBE_PROFILE output.
FossilOrigin-Name: 161192f17273f32f1b3b82d41135aaca047e9a83
2016-11-23 14:19:11 +00:00
drh
4b4ffadb43 Merge bug fixes and enhancements from trunk.
FossilOrigin-Name: e2c4bdf54fc1b9605226c7d6c79ef4f8302d6213
2016-11-22 22:23:56 +00:00
drh
bc88711d08 Enclose the sqlite3WalSnapshotRecover() routine within
FossilOrigin-Name: e7be3183eb25e0f9f04b9e251ff37fa5e50cc1a7
2016-11-22 21:11:59 +00:00
drh
e74cc5c9bc Add a new requirement mark for CAST expressions.
FossilOrigin-Name: bee2859b953c935c413de2917588159d03c672d9
2016-11-22 20:29:05 +00:00
drh
50da663516 Update requirement marks to reflect changes in wording in the documentation.
No changes to code.

FossilOrigin-Name: f5ac98efb5d5f7751c5c560bed9c7885e60ac4bc
2016-11-22 19:15:05 +00:00
drh
65f38d960d Remove unnecessary OP_Close opcodes for a size reduction and performance
increase.

FossilOrigin-Name: 32be7aae92ee48bf2cd260ea41e79c2bc62738f9
2016-11-22 01:26:42 +00:00
drh
60ffc80756 Remove unnecessary OP_Close opcodes at the end of INSERT operations, resulting
in smaller and faster code.

FossilOrigin-Name: abeddb6d5a4040e1d0a87a4f32ad79794ba0842b
2016-11-21 21:33:46 +00:00
drh
89500dcd0b Enhance speedtest1.c so that is works on older versions of SQLite, before
the introduction of the group_concat() aggregate function.

FossilOrigin-Name: 9979ba80a649ee61d9d174dc9d9fcab7e9fc1332
2016-11-21 18:15:35 +00:00
drh
c10b9dac84 Fix harmless compiler warnings.
FossilOrigin-Name: b3b7b42d9a4a0e7e2be8b2933328a7bec2f49a81
2016-11-20 17:59:59 +00:00
drh
0f85b2ff09 Prevent a possible use-after-free bug in the query optimizer.
FossilOrigin-Name: 0a98c8d76ac86412d5eb68de994658c250989349
2016-11-20 12:00:27 +00:00
dan
93f5113290 Remove the requirement to open the wal file before sqlite3_snapshot_recover()
is called. Also add some comments to new functions.

FossilOrigin-Name: 28393c413cc4505b94411730e728583c5d4baaae
2016-11-19 18:31:37 +00:00
dan
4d4757fcc8 Test some extra error conditions in sqlite3_recover_snapshot().
FossilOrigin-Name: db314213c08f27dd0ff5ede3c6a8eda36560809a
2016-11-19 17:30:57 +00:00
dan
20ba3d7fcb Add another fault-injection test for sqlite3_snapshot_recover().
FossilOrigin-Name: 7e040406138669bd67dd6ecae016b3e50dbfaaf8
2016-11-19 17:20:28 +00:00
dan
6a9e7f16eb Fix a problem causing sqlite3_snapshot_recover() to return
SQLITE_IOERR_SHORT_READ.

FossilOrigin-Name: 525f75fa9fd4a95acc3fb3b0a01dabe2be39b383
2016-11-19 16:35:53 +00:00
dan
5b4009f637 Fix a bug in sqlite3_snapshot_recover() that could cause subsequent read
transactions to use out-of-data cache entries.

FossilOrigin-Name: 9abeb7980a34cec11a3420e14ad98a4ec0d9c599
2016-11-19 14:53:22 +00:00
dan
1158498dce Add experimental sqlite3_snapshot_recover() API.
FossilOrigin-Name: 174a6076a8d7bebe5efebf55f3fdc5d87c589cc7
2016-11-18 20:49:43 +00:00
dan
edace5d4f1 Require that the database handle be in autocommit mode for
sqlite3_snapshot_get() to succeed. This is because it may open a read
transaction on the database file.

FossilOrigin-Name: 83b658dad091211ade3594d1e8d00ce525882506
2016-11-18 18:43:39 +00:00
dan
93006cdd85 Add tests for snapshot interfaces.
FossilOrigin-Name: 1f7ee7af7b620262ae663d65889b6a87415d4a34
2016-11-18 18:22:05 +00:00
dan
25accbca72 Enhance existing snapshot tests to serialize/deserialize snapshots. No new
tests.

FossilOrigin-Name: 16b9bf92741e4c62874cffd7c6a61763c5054c7a
2016-11-18 14:38:41 +00:00
drh
65e1ba3fe7 Experimental changes for faster in-memory DB operation for large databases.
FossilOrigin-Name: 4fe94b0f1841180dfd8cac33838e335dc6a428bf
2016-11-17 21:52:08 +00:00
dan
9c8753c0a8 Fix a problem in rtreeD.test causing it to fail in OMIT_BUILTIN_TEST builds.
FossilOrigin-Name: d6b3779e6dad038d8bc35139cf314bf1e6e91977
2016-11-17 20:05:00 +00:00
drh
223b4bb3f7 Change the --enable-debug option on configure so that it enables the
".selecttrace" and ".wheretrace" commands in the command-line shell.

FossilOrigin-Name: 2331192b4ca6a169b6ac0daafb21ceb7c390de65
2016-11-17 13:54:21 +00:00
drh
54cda4edbe Disable the query flattener optimization for SELECT statements that are on
the RHS of vector IN operators.  This is a hack that fixes the bug
described in ticket [da7841375186386c]. A better solution that does not
disable the query flattener is needed, but this will server for the time
being.

FossilOrigin-Name: 005d5b870625d175fdf3c0e87d974006c569d9e1
2016-11-17 13:13:25 +00:00
drh
d2d69cc1fa Add a needed #include to speedtest1.c.
FossilOrigin-Name: 77aeb705c37b1bf61a05b5e4a09f5b5cd67d07bc
2016-11-15 21:17:13 +00:00
drh
ba6eb8769f Experimental changes toward making snapshots serializable.
FossilOrigin-Name: b6a81fa1fc1fb78a65894129851a4ec3986640de
2016-11-15 17:37:56 +00:00
drh
d6ef5afe3f Change the OP_Last opcode so that it is a no-op if the cursor is already
pointing at the end of the b-tree.

FossilOrigin-Name: 663473850c4274270445b3771911fa773a8c405f
2016-11-15 04:00:24 +00:00
drh
c9b9deaee2 Make the VACUUM command about 9% faster by avoiding unnecessary calls
to sqlite3BtreeMovetoUnpacked() while copying rowid tables.

FossilOrigin-Name: 5ed0bd387699a0f3b477d4f3cfcb460a6a44cb84
2016-11-15 02:46:39 +00:00
drh
5413ba4b17 Add 8794 new test cases received from the OSS-FUZZ project.
FossilOrigin-Name: 03f75a67c320f21192d721a8c34d49dea48ffdbb
2016-11-14 20:47:18 +00:00
drh
588429a87d Fix a potential use-after-free error during parsing of malformed
CREATE TABLE statement.

FossilOrigin-Name: c5dbc599b910c02a961675b12b273b8df6d29450
2016-11-14 20:08:00 +00:00