]>
git.ipfire.org Git - thirdparty/sqlite.git/log
larrybr [Mon, 14 Feb 2022 01:12:46 +0000 (01:12 +0000)]
CLI's .import column rename made more minimal, and reports renames.
FossilOrigin-Name:
c626cff7f99ec502ebd46f9cdafc3d088697544ef5d6559b6b3ae85679b4f9fa
larrybr [Sun, 13 Feb 2022 22:18:22 +0000 (22:18 +0000)]
Sync w/trunk, fix zAutoColumns placement blunder, all to pass all TCL tests
FossilOrigin-Name:
67dc59f46d742ad69742fb34540a3074af163a3f1a0f9093f83db2276bf944ca
dan [Sat, 12 Feb 2022 18:56:24 +0000 (18:56 +0000)]
Do not run merge1.test with SQLITE_OMIT_VIRTUALTABLE builds.
FossilOrigin-Name:
bf8dbfd499e732f14c7a8efee527e8ce155937dbb2a3e85213f8aa64ac497189
dan [Sat, 12 Feb 2022 16:02:37 +0000 (16:02 +0000)]
Fix a possible user-after-free in ALTER TABLE found by asan.
FossilOrigin-Name:
9252619d410293ddefd108f5cf81b6fb4932bd3f2ceaaa92abb7542e34f66111
dan [Sat, 12 Feb 2022 13:45:02 +0000 (13:45 +0000)]
Update fuzz.test to account for a change in error message made in the core.
FossilOrigin-Name:
c57601b51f9b59e9d8f0eb06580fa14f49525e56bd0190c02865e478bd1f48e7
dan [Sat, 12 Feb 2022 13:37:27 +0000 (13:37 +0000)]
Avoid dropping SQLITE_TOOBIG errors in the quote() function.
FossilOrigin-Name:
115c3051a1ff7567e84f14fc4c49efe61bc2850248533449b0195c305ab6516e
larrybr [Sat, 12 Feb 2022 13:12:03 +0000 (13:12 +0000)]
For .import auto-column, aid build-time override of rename decoration.
FossilOrigin-Name:
433e5ead2b711d1e3b0b62cf8cb5a8a65e2474c68ef2173317ed4323fc8bdc58
larrybr [Sat, 12 Feb 2022 10:48:42 +0000 (10:48 +0000)]
Fix auto-column bug noted by post https://sqlite.org/forum/forumpost/
d102c15d63
FossilOrigin-Name:
689137e1b5bc78b0f16e5db86d16415b9fa77d22ded59e93d75e7033b465e673
larrybr [Sat, 12 Feb 2022 02:15:37 +0000 (02:15 +0000)]
Sync w/trunk, allow build-time override of auto-column decorating character
FossilOrigin-Name:
caaef4c592c980889efb349fa73b61303ec493172d90cd67d54ffde0855e4138
drh [Fri, 11 Feb 2022 21:20:46 +0000 (21:20 +0000)]
Fix a test in without_rowid1.test so that it is disabled without
ALTER TABLE support, as it uses ALTER TABLE.
FossilOrigin-Name:
ca22a64e6f05a6688974f4cff1a0ff2c873aad1947f3cf6ffaeee8bb074b2627
dan [Fri, 11 Feb 2022 19:41:03 +0000 (19:41 +0000)]
Update some OOM tests of the ALTER TABLE command to account for an error message which may be returned if opening the temp db fails.
FossilOrigin-Name:
3409fd4150df059d7308f79fa3672a330af9cefe2ad9120c3da5ef1413921e96
drh [Fri, 11 Feb 2022 17:47:58 +0000 (17:47 +0000)]
Load recent dbsqlfuzz finds into test/fuzzdata8.db.
FossilOrigin-Name:
b275ad250d8aa286829647967ab7e75fcd2b5674caab1a34eab59d8486a34cd5
drh [Fri, 11 Feb 2022 17:47:25 +0000 (17:47 +0000)]
Reference the wayback machine for the dead hyperlink to the MS support
page in the comments about why the extra typedef for va_arg(). No code
changes.
FossilOrigin-Name:
ab1a9b5b78de7c00b38357b1df08e82ce5608a14f8c675ac20c5f2dad5212f50
drh [Fri, 11 Feb 2022 17:33:02 +0000 (17:33 +0000)]
Fix an assert() in the pager by adding "|| CORRUPT_DB", in as much as the
assert() is not necessarily true if the database size in the header is
wrong. dbsqlfuzz
f2f996065b90988aa9b0ae425b66dbb296546a08 .
FossilOrigin-Name:
a51402e8c29fad2b24e32de55b10691fb0ebd6c2cebac941e43e54be211d5d39
dan [Fri, 11 Feb 2022 16:10:18 +0000 (16:10 +0000)]
Fix a problem in [
c006515ae6faff65 ] causing an assert() to fail with some build configurations.
FossilOrigin-Name:
d7ff262d6d1fd8b855bcb8f6f54ab1833663a4d8187701ddf045f6b5a62a5d1d
drh [Fri, 11 Feb 2022 14:08:05 +0000 (14:08 +0000)]
Use the enhanced SQLITE_TESTCTRL_LOCALTIME_FAULT (2) capability to do better
testing of the 'localtime' and 'utc' modifiers to date/time functions.
FossilOrigin-Name:
f38071946ac2e5bb61e6c0620507e4c94464999ac700d86c1a704b94eb1c009a
larrybr [Fri, 11 Feb 2022 13:40:25 +0000 (13:40 +0000)]
Upon .import column renaming, issue message saying so. Test this.
FossilOrigin-Name:
8b6ca9304bff9a5b2897a6517ce77e4cd32f337b6c849b73ead5f757228d8ac8
drh [Fri, 11 Feb 2022 12:06:37 +0000 (12:06 +0000)]
Fix the bind2.test test script so that it works even if
SQLITE_ENABLE_PREUPDATE_HOOK is not defined.
Fix for test-case breakage from check-in [
c006515ae6faff65 ].
FossilOrigin-Name:
937d3a45b3fef354dbdea2085fbb7d9c752a96e8ebb62f61931deb5a64132946
drh [Fri, 11 Feb 2022 11:37:12 +0000 (11:37 +0000)]
Work around the MSVC bug that prevents the use of function pointer types in
the second argument of va_arg() by adding a typedef.
FossilOrigin-Name:
eae3ab0a050079d050f339b2510eebd55afe4464e9b410ddacb7523f89981144
larrybr [Fri, 11 Feb 2022 01:21:09 +0000 (01:21 +0000)]
CLI auto-column rename revamped after forum discussion.
FossilOrigin-Name:
2da1f8e45eb0cb1ead6049df6a31a903bfad5a7abd27e92cd3dac25fe355aec3
drh [Thu, 10 Feb 2022 23:12:58 +0000 (23:12 +0000)]
Fix SQLITE_TESTCTRL_LOCALTIME_FAULT so that it works even if mutexes are
enabled.
FossilOrigin-Name:
64537a0669553e8a6b610b9e9703ec084472516c86cfc22a7a6c73b6c66131ee
drh [Thu, 10 Feb 2022 21:26:53 +0000 (21:26 +0000)]
Enhance SQLITE_TESTCTRL_LOCALTIME_FAULT so that is able to install an
alternative localtime() interface so that the localtime logic an be better
tested.
FossilOrigin-Name:
6e25cb0890e8cdc63c9a21e841844d066267fc32ad143527843f7c8d05612b53
drh [Thu, 10 Feb 2022 15:40:40 +0000 (15:40 +0000)]
Performance improve to the 'localtime' and 'utc' modifiers for date/time
functions.
FossilOrigin-Name:
85cb6014751a0572d28ebd839331d5d7a78de45c9e522adcd834a8a85746f32e
drh [Thu, 10 Feb 2022 12:57:53 +0000 (12:57 +0000)]
Faster implementation of the date(), time(), and datetime() functions.
FossilOrigin-Name:
fa1b393bdb66b985f6552190a8242ed878f91d653a03352f65aa8d750de3cec4
drh [Thu, 10 Feb 2022 12:31:37 +0000 (12:31 +0000)]
Fix the test harness so that it builds without SQLITE_ENABLE_PREUPDATE_HOOK.
Has been broken since [
c006515ae6faff65 ].
FossilOrigin-Name:
4565f711291bae5daaff6dd2b7b2991b17e139a576b1b73bb1f81f08a4c1a13f
larrybr [Thu, 10 Feb 2022 03:21:48 +0000 (03:21 +0000)]
A CLI feature. auto .import (new table) columns. WIP
FossilOrigin-Name:
7e3be36dfcb65c87a87344cf91c0c8f8d1aff0f2e4bcc23444a8f6b8ddcdae69
larrybr [Thu, 10 Feb 2022 02:09:43 +0000 (02:09 +0000)]
drh [Thu, 10 Feb 2022 01:01:31 +0000 (01:01 +0000)]
Fix a typo in documentation. No code changes.
FossilOrigin-Name:
e97c6ad4c915c82c2f0b347a0cdc8f80942c345194675a88174047ce0d0a43ad
drh [Wed, 9 Feb 2022 18:47:09 +0000 (18:47 +0000)]
When process first moves a database into WAL mode and then tries to run
sqlite3_wal_checkpoint() without first performing a transaction, first
try to run a synthesized transaction to get the Pager caught up before
attemptingn the checkpoint.
[forum:/forumpost/
fd0f19d229156939 |forum post
fd0f19d229156939 ].
FossilOrigin-Name:
eee6de1967609f0b590ee4dbec088c3e7b03b08753267ed2909c5b03d60a0e18
dan [Wed, 9 Feb 2022 18:42:15 +0000 (18:42 +0000)]
Fix a problem with using sqlite3_bind_value() with sqlite3_value objects obtained from sqlite3_preupdate_new() when an integer value is written to a column with real affinity.
FossilOrigin-Name:
c006515ae6faff6525d589827d99092b06004472e32b7f586845c00c4732d695
drh [Tue, 8 Feb 2022 15:14:18 +0000 (15:14 +0000)]
drh [Tue, 8 Feb 2022 13:41:23 +0000 (13:41 +0000)]
Provide sqlite3_error_offset() data for some new errors.
FossilOrigin-Name:
1269206db810460e55a52e178ba3332add42a11f66c5f292f8f0d29ccd61a4b8
larrybr [Tue, 8 Feb 2022 12:24:43 +0000 (12:24 +0000)]
drh [Tue, 8 Feb 2022 12:13:16 +0000 (12:13 +0000)]
Do not show the error code number of CLI error messages unless the error
is something other than 1 (SQLITE_ERROR).
FossilOrigin-Name:
b471601892df98c5103bb55132bbdecf3e4dfc428aaecc47bfec1e1d51e583c7
drh [Tue, 8 Feb 2022 11:52:45 +0000 (11:52 +0000)]
Improved error message formatting in the shell. Distinguish between
"Parse errors" and "Runtime errors".
FossilOrigin-Name:
ae3e322a029952f575e49c73fb50b46bbea55be6792cc225cb94f5e0cbd046d9
drh [Mon, 7 Feb 2022 18:52:56 +0000 (18:52 +0000)]
Disable the sqlite3_error_offset() when the error occurs in a trigger or
view or some other bit of text that is not part of the original statement.
FossilOrigin-Name:
0e909e34fa74e7b9b7954e4ed4c39dd293c1d413b58fda03607faab74aa382ad
larrybr [Mon, 7 Feb 2022 01:09:49 +0000 (01:09 +0000)]
When create table/view fails due to name taken, say which took it.
FossilOrigin-Name:
9a206e37fb49a203a7b5fdc93c41acc39e9ceb37144c78432a235e2f0d54a210
drh [Sun, 6 Feb 2022 23:54:41 +0000 (23:54 +0000)]
Fix unreachable branches in the sqlite3_error_offset() logic.
FossilOrigin-Name:
031381aea371892a35737e550121846af41241711a36c1a2086af3b0c11bf7b6
drh [Sun, 6 Feb 2022 22:13:35 +0000 (22:13 +0000)]
The sqlite3_vtab_in() interface should return false for a vector IN constraint.
FossilOrigin-Name:
245d0241c78870c6a41af3e02b82b13151472e2102fbd62989672f8122feca73
drh [Sun, 6 Feb 2022 21:13:59 +0000 (21:13 +0000)]
With the new ALTER TABLE under PRAGMA writable_schema=ON processing, do not
ignore non-parser errors such as OOMs.
FossilOrigin-Name:
36653ccef68cf61b6001000a713b06e951cb6fddced6b6a906c3b17d70a8af87
drh [Sun, 6 Feb 2022 11:51:23 +0000 (11:51 +0000)]
drh [Sun, 6 Feb 2022 11:26:51 +0000 (11:26 +0000)]
drh [Sun, 6 Feb 2022 00:30:04 +0000 (00:30 +0000)]
Further improvements to localization of errors in input SQL.
FossilOrigin-Name:
fa34676042720161ca03f3926814152eb1d144ec12fd2b44e5429408ea4ad5b0
drh [Sat, 5 Feb 2022 23:11:19 +0000 (23:11 +0000)]
Enhance sqlite3_error_offset() to report the position of unresolved
identifiers.
FossilOrigin-Name:
5b8d2577907abda10de29884716bacc10bff0df1451228a0ac40342dbea6d589
drh [Sat, 5 Feb 2022 21:49:47 +0000 (21:49 +0000)]
Record the position of many identifiers in the parse using the new
Expr.w.iOfst field. This is done with the idea of providing offset
results for sqlite3_error_offset() for a more kinds of errors, though that
part is not yet implemented.
FossilOrigin-Name:
32a3a53b62ab09ac2212905e7f42fe6f1b09d891e015203e5caf4cb16262f18e
drh [Sat, 5 Feb 2022 13:27:52 +0000 (13:27 +0000)]
Update stale evidence marks on sqlite3_vtab_rhs_value() test cases.
FossilOrigin-Name:
46744b83d5e1335bcbc59f9625e8ade3f360469d17f34e8d996f077ba9afa89e
drh [Sat, 5 Feb 2022 12:39:17 +0000 (12:39 +0000)]
When PRAGMA writable_schema=ON, allow ALTER TABLE to proceed even if there
are entries in the sqlite_schema table that do not parse.
FossilOrigin-Name:
fc4c82e5694cbdae13f2cb90e5368ba9f6b826a220a81de32ead2ffe1bc5f31f
drh [Sat, 5 Feb 2022 12:05:43 +0000 (12:05 +0000)]
Fix a NULL pointer dereference that can occur after OOM. Problem
introduced by check-in [
197cbabf1767d060 ].
FossilOrigin-Name:
d4e6b9f0f7567b76760a667a701bca4d6158ade39f9a69d205b583c5a1c0c7f4
drh [Sat, 5 Feb 2022 11:13:26 +0000 (11:13 +0000)]
drh [Sat, 5 Feb 2022 01:01:07 +0000 (01:01 +0000)]
drh [Fri, 4 Feb 2022 20:16:00 +0000 (20:16 +0000)]
Test case for permissive ALTER TABLE RENAME when writable_schema=ON.
FossilOrigin-Name:
7ee44f66c896cdc7b6980811e8e4537dbd63b23060ead0104f25132d955890af
drh [Fri, 4 Feb 2022 20:07:24 +0000 (20:07 +0000)]
One more case of disabling errors for ALTER TABLE RENAME when
writable_schema=ON.
FossilOrigin-Name:
c52d0dd8f4f8fab4c3f33cbd26b4012569e76562282e85654018c836dca7b564
drh [Fri, 4 Feb 2022 19:13:18 +0000 (19:13 +0000)]
Add a compile-time option to include vt02.c in fuzzcheck.
FossilOrigin-Name:
c404c8c72600c11b181519d269bf949aff304eaafb90a50d1415c6fe84d2b092
drh [Fri, 4 Feb 2022 16:43:30 +0000 (16:43 +0000)]
Allow ALTER TABLE RENAME COLUMN to proceed even if there are errors in
the schema, as long as PRAGMA writable_schema=ON is active.
FossilOrigin-Name:
197cbabf1767d0603928462fb75cf8100f6999f725e0db60d096c7ca20e3da28
drh [Fri, 4 Feb 2022 13:15:01 +0000 (13:15 +0000)]
drh [Fri, 4 Feb 2022 13:05:29 +0000 (13:05 +0000)]
For the MULTI-INDEX-OR optimization, when pushing down WHERE clause terms from
the main query into the various OR-term subqueries, do not push down slices
of a vector comparison, since the right-hand operand of the comparison might
have only been initialized in a different OR branch that was not taken.
dbsqlfuzz
80a9fade844b4fb43564efc972bcb2c68270f5d1 .
FossilOrigin-Name:
9f67ad00cd38b7c5ec6d14b379e1a611777bbdf6901d843a80712ba7d94d6d33
drh [Thu, 3 Feb 2022 18:14:22 +0000 (18:14 +0000)]
drh [Thu, 3 Feb 2022 14:37:06 +0000 (14:37 +0000)]
Do not allow the vdbe-compress.tcl script to generate structures named
"do" or "if".
FossilOrigin-Name:
e35ab16dd0fd40b07a71d26e1cdb19ef664a2a628a4abcb2e130f5e555de8ca9
drh [Thu, 3 Feb 2022 14:19:26 +0000 (14:19 +0000)]
Prohibit schema changes within xBestIndex callbacks.
FossilOrigin-Name:
bb0f056b3f2ecc3893e5e48e99c060788550ea6a8ed02b715953af051bafbad0
drh [Wed, 2 Feb 2022 21:06:40 +0000 (21:06 +0000)]
Improvement to the sqlite3_vtab_in_first() documentation.
FossilOrigin-Name:
403e7ac900e53407282393747b784dc0cd4303958394534e3936fce138bc1bc5
drh [Wed, 2 Feb 2022 19:51:44 +0000 (19:51 +0000)]
Add the sqlite3_vtab_in() interface that allows virtual tables to process
IN constraints all at once, rather than one value at a time.
FossilOrigin-Name:
52559af093809b572082b5ebaacf97b727ee1860ae118530761b62e937545163
drh [Wed, 2 Feb 2022 19:30:24 +0000 (19:30 +0000)]
drh [Wed, 2 Feb 2022 19:15:53 +0000 (19:15 +0000)]
Test cases for sqlite3_vtab_in() and sqlite3_vtab_distinct().
FossilOrigin-Name:
21afb81d0a73af39aacd9329b1441faa2b535a52a52036daec89fd303a8b344f
drh [Wed, 2 Feb 2022 18:47:56 +0000 (18:47 +0000)]
Improved documentation for sqlite3_vtab_in(). No code changes.
FossilOrigin-Name:
c99df4ab5db2c32b044366c5b0ac70fd8887d1456d53323e75fede23cc61c236
drh [Wed, 2 Feb 2022 16:24:01 +0000 (16:24 +0000)]
Relax the restriction that the RHS of the IN operator must be a list in order
for sqlite3_vtab_in() to work. Change an unreachable branch into an assert().
FossilOrigin-Name:
3bf2153440dce0e8c0572c4fd39e6b9f34ead75ccab2cea80a646d4ff9d19146
drh [Wed, 2 Feb 2022 15:10:45 +0000 (15:10 +0000)]
Be sure that sqlite3_vtab_in_first() and _next() set the correct encoding.
FossilOrigin-Name:
04edf36ee8e043c83235a5169a7ced23f211edd2f7ef3290d96413d5fd229ad7
drh [Wed, 2 Feb 2022 14:36:58 +0000 (14:36 +0000)]
Refactor sqlite3_vtab_in() to make use of the existing
sqlite3_value_pointer() mechanism for passing the list of IN operator
RHS values into xFilter, for improved memory safety.
FossilOrigin-Name:
8965929be236fe1a6994f31b94c1b7590c7c1e809470c542a76f3e0e275d032f
drh [Wed, 2 Feb 2022 11:37:49 +0000 (11:37 +0000)]
drh [Tue, 1 Feb 2022 21:59:43 +0000 (21:59 +0000)]
drh [Tue, 1 Feb 2022 16:30:57 +0000 (16:30 +0000)]
Index in 2nd argument to sqlite3_vtab_in() should be on the aConstraint[]
array, not the internal array of all constraints.
FossilOrigin-Name:
5acf90a931b27b7d627c0a8fee68170430e09b028d6643b959b0ec14fd59f7ac
drh [Tue, 1 Feb 2022 14:58:29 +0000 (14:58 +0000)]
Add new interfaces to enable virtual table to process IN operator constraints
all at once, rather than one element at a time.
FossilOrigin-Name:
eb84b80e1f6d8c32bf0c9e1731f0233de0160a13f714f766779ae01fdf504e7b
drh [Tue, 1 Feb 2022 13:17:11 +0000 (13:17 +0000)]
CLI: Take extra care to not split a multi-byte unicode character when doing
wordwrap.
FossilOrigin-Name:
00b1b7020a564976da3237532434e47ccf17eb5d620e6ac45f3e70b5d5739200
drh [Tue, 1 Feb 2022 12:28:17 +0000 (12:28 +0000)]
CLI: Add the --ww option as an alias for --wordwrap. Improve the wordwrap
algorithm so that it breaks at punctuation if it cannot find space. Always
wordwrap with --ww even if there is a .width setting for the column.
FossilOrigin-Name:
1b528e31f8c62797e0814568b520c0680ff23a2ee877ca6aa70a167d40ebdf80
larrybr [Tue, 1 Feb 2022 02:50:45 +0000 (02:50 +0000)]
Add "--wordwrap on/off" option for CLI columnar modes, qwbox shortcut
FossilOrigin-Name:
10dbc278708cd2cce7fef90738082dbe31750d93e44b5fa5413a9a32dae7703a
drh [Tue, 1 Feb 2022 00:00:08 +0000 (00:00 +0000)]
CLI: In ".mode column" output, if any row contains a newline or wraps, then
put a single blank line in between each pair of rows to provide additional
visual separately.
FossilOrigin-Name:
fd42f4c304079356358e606dd96d4b84cf211c4334c586118b99fe9ad20e20ea
drh [Mon, 31 Jan 2022 22:14:53 +0000 (22:14 +0000)]
CLI: for columnar output modes, make sure the header is not too big.
Also, improve the help text.
FossilOrigin-Name:
070fae3a09cea675e722340870cb2bee9e1ac96954d3baacfdb7f5400ddb1b20
drh [Mon, 31 Jan 2022 20:39:27 +0000 (20:39 +0000)]
CLI: Fix a problem with tabs in the new qbox mode.
FossilOrigin-Name:
ca96ab3ef78479d95e831cacdb80f23c119cbaa77b3821eac7a3f110bfe20cc9
drh [Mon, 31 Jan 2022 16:29:06 +0000 (16:29 +0000)]
drh [Mon, 31 Jan 2022 15:59:43 +0000 (15:59 +0000)]
Do not attempt to limit the number of columns used in a table to a prefix
if the table will be used to construct an automatic index or bloom filter.
dbsqlfuzz
787d9bd73164c6f0c85469e2e48b2aff19af6938 .
FossilOrigin-Name:
f8766231d2a77bb8b95726b514736d4c2d20b056f7fe60bdbc98ebf5e5b15ae9
drh [Mon, 31 Jan 2022 14:14:29 +0000 (14:14 +0000)]
CLI: Enhancements to columnar output modes. (See
[forum/forumpost/
5b53cd851f66441f9 |forum post
5b53cd851 ] for discussion.)
New output mode "qbox". New output options "--quote" and "--wrap N".
FossilOrigin-Name:
539cef5214446a7181614793e9cf323e95ba00ba0f888585b14b598dd2ff0808
drh [Mon, 31 Jan 2022 12:29:14 +0000 (12:29 +0000)]
Fix an obscure problem in sqlite3_backup_init() caused by
[
6a45d8fe8bfbc11a |check-in
6a45d8fe8bfbc11a ]. See
[forum:/forumpost/
8b39fbf3e7b5c278 |forum post
8b39fbf3e7 ] for
the original bug report.
FossilOrigin-Name:
639fc7633bd740421d6b48617b9f68e6be525107e4049673fe720ea6158a393f
drh [Mon, 31 Jan 2022 10:55:50 +0000 (10:55 +0000)]
CLI: Fix the new ".mode box" output so that it works with unicode characters.
FossilOrigin-Name:
454af48724c78bf8e06379a426e01b1597f56fcc83211ee062ff0dbeb6a140b1
drh [Sun, 30 Jan 2022 21:09:03 +0000 (21:09 +0000)]
CLI: For columnar modes ("box", "column", "table", "markdown") the ".width"
is now both the minimum and maximum width of the column. Text that spans
multiple lines or that contains tabs is properly formatted. If any part of
the output contains multi-line text, then extra separators are provided between
each row.
FossilOrigin-Name:
c10ed4a7fe33fd9330967ab714b1f09ad57c972997160dfc71477e43b905f69c
drh [Sun, 30 Jan 2022 11:44:17 +0000 (11:44 +0000)]
Always enable all JSON tests, now that JSON is included by default.
FossilOrigin-Name:
8c9f350182140604a71e11d226acb3f80d1f2b4f75e5c3b55ec8f8a7c02941f3
drh [Sun, 30 Jan 2022 11:42:56 +0000 (11:42 +0000)]
drh [Sat, 29 Jan 2022 21:41:15 +0000 (21:41 +0000)]
Documentation enhancements. No code changes.
FossilOrigin-Name:
312642d982f7861fd4db416e5eb24d863535b3ade40539a32f2dfe3f6fc45d46
drh [Fri, 28 Jan 2022 23:44:27 +0000 (23:44 +0000)]
Add the SQLITE_INDEX_CONSTRAINT_LIMIT and SQLITE_INDEX_CONSTRAINT_OFFSET
constraints to the sqlite3_index_info for the xBestIndex method of virtual
tables.
FossilOrigin-Name:
1e227ad9f413227f767b45b91e5439b82c98a3368fb20643414dab5c0f4818c6
drh [Fri, 28 Jan 2022 23:19:01 +0000 (23:19 +0000)]
drh [Fri, 28 Jan 2022 21:39:29 +0000 (21:39 +0000)]
When nesting Parse objects, make sure the new one has nErr set if there
has been an OOM error.
FossilOrigin-Name:
ae088cbc968a565c3e0a8dd74ce150cac4a87978b593a3204f475fa196f1603c
drh [Fri, 28 Jan 2022 19:53:37 +0000 (19:53 +0000)]
Include hidden columns of table valued functions that are constrained
by the function arguments in the colUsed bitmask.
FossilOrigin-Name:
8f8cab0d0e219f0c4bc2b8061c0013d90a2a5e598dd6cf420d302dfd1b7cbe11
drh [Fri, 28 Jan 2022 18:43:33 +0000 (18:43 +0000)]
Remove a NEVER() that has become reachable now that we have the
sqlite3_vtab_rhs_value() interface.
FossilOrigin-Name:
c4c30df7cd858315359bd9bfa90a07152d87a2301eaec865c5bc1c65e272eec8
drh [Fri, 28 Jan 2022 13:18:40 +0000 (13:18 +0000)]
Enable SQLITE_INDEX_CONSTRAINT_LIMIT/OFFSET even if there are vector
comparison operators in the WHERE clause. Also: Do not enable
sqlite3_vtab_rhs_value() for LIMIT/OFFSET if the value is negative, as this
violates an invariant on Expr.u.iValue.
FossilOrigin-Name:
140480b3ec5466513b165d4818f1180cff6e4a5edcd47efb54cbff74a7107507
drh [Thu, 27 Jan 2022 21:18:14 +0000 (21:18 +0000)]
Query planner always honors the aConstraintUsage[].omit flag for the
SQLITE_INDEX_CONSTRAINT_OFFSET constraint.
FossilOrigin-Name:
38c5151eb8cc789ad082a1b40d16b2ddb55454219bd685b6e420995af6a15f55
drh [Thu, 27 Jan 2022 18:45:26 +0000 (18:45 +0000)]
Make LIMIT and OFFSET values available to sqlite3_vtab_rhs_value().
FossilOrigin-Name:
b2d37c086c87fe4aee013bba4eab26f642207cd2a797fe4888a6ef868884c191
drh [Thu, 27 Jan 2022 16:14:50 +0000 (16:14 +0000)]
Give the virtual table xBestIndex method access to (some) OFFSET and LIMIT
clauses.
FossilOrigin-Name:
74fa5757ee0a8499bcd6546dac1a3ecc6048ba9cff9e3e574e28e6e82e894a3d
drh [Thu, 27 Jan 2022 13:52:01 +0000 (13:52 +0000)]
Enforce the restriction that 'unixepoch' only works as the first modifier
after the time-value. This has been documented since 2004, but has never
actually been enforced before. Also add new test cases for date/time
functions with evidence marks.
FossilOrigin-Name:
64fa9e8c87179211cec248e6dfd7578502e6e969a19e91a4f0e21ed9b972a6bc
drh [Tue, 25 Jan 2022 00:03:25 +0000 (00:03 +0000)]
Minor adjustment to error handling in sqlite3FinishCoding().
FossilOrigin-Name:
a8db69411b0d1275909adeb21027784ada17af24efe3a59ae0ae2a897659ff17
drh [Mon, 24 Jan 2022 21:47:00 +0000 (21:47 +0000)]
Remove an unnecessary assert() that is sometimes not true following an OOM.
FossilOrigin-Name:
e9361d72f362b390a31f667363b01cf9d4b78aa19ed5c97f21afe9da764b89c0
drh [Mon, 24 Jan 2022 20:20:35 +0000 (20:20 +0000)]
New dbsqlfuzz cases added to test/fuzzdata8.db.
FossilOrigin-Name:
d1fbf63330830c4b9549d0e67f6cdc19fe7a9dc3fcf509795fd1175499fddc82
drh [Mon, 24 Jan 2022 20:16:37 +0000 (20:16 +0000)]
One of the ALWAYS() macros in the previous check-in could sometimes be
false, following an OOM. Remove it. Problem found by dbsqlfuzz.
FossilOrigin-Name:
11df9187dad0eb33b0f6288b76d74f9700420ec855e8106b0bc71df48c485ad1