]>
git.ipfire.org Git - thirdparty/sqlite.git/log
drh [Thu, 5 Dec 2019 14:42:26 +0000 (14:42 +0000)]
Make sure the rowid of an RTREE virtual table has integer affinity.
Ticket [
9fe487ba3c064b4e ]
FossilOrigin-Name:
7ae8c0d52f6aa7f27537216f85456ef49dade040366cfb250c789206ecd4dc5a
dan [Thu, 5 Dec 2019 14:31:43 +0000 (14:31 +0000)]
Fix a problem in ALTER TABLE that could occur if an index, view or trigger in the schema features an expression of the form ((SELECT ...) IN ()) where the SELECT statement uses a CTE.
FossilOrigin-Name:
7e5ad8e0ab7ee91a5ccb19a9654d6a036233f74d2fdc45f7315feb3d9d035fd4
drh [Thu, 5 Dec 2019 13:34:13 +0000 (13:34 +0000)]
Be strict about type enforcement on rowid look-ups in the RTREE extension.
Ticket [
30e2c183b6b356e4 ]
FossilOrigin-Name:
d43e0efb9642037dd751cfed13438e71cfceb50e14a0ec603880c6c3be2e93b1
drh [Thu, 5 Dec 2019 00:44:47 +0000 (00:44 +0000)]
Enhance the RTREE extension so that it give correct query results even if
the query uses non-numeric constraints. Ticket [
a55ab6d97d01ecbc ]
FossilOrigin-Name:
f898d04cf272ef0130dcae146cb86d8630b10a6f19aecfc2fa70e97e082bd51c
drh [Wed, 4 Dec 2019 19:45:52 +0000 (19:45 +0000)]
drh [Wed, 4 Dec 2019 15:08:58 +0000 (15:08 +0000)]
Ensure that an ALWAYS() in the rename logic really is always true, even
for faulty inputs.
FossilOrigin-Name:
54410f0e7710542d5159d0449898598d2b7f7676bfd993644ca47da1bf1fcdac
dan [Wed, 4 Dec 2019 14:26:38 +0000 (14:26 +0000)]
Fix an assert() failure that could occur in ALTER TABLE code when the schema contains a view that uses a CTE.
FossilOrigin-Name:
75b04a4b0d2e65bfcd02cf4e0b6d8f1954957c590814a9b8f9a9ee2adc2ec022
dan [Wed, 4 Dec 2019 03:46:50 +0000 (03:46 +0000)]
Fix a buffer overread that could occur in fts3 with corrupt %_stat records.
FossilOrigin-Name:
e01fdbf9f700e1bd9dd5283c65547d10d26ce4f4506d3cfef9e1087aecdc2305
drh [Wed, 4 Dec 2019 03:31:29 +0000 (03:31 +0000)]
dan [Wed, 4 Dec 2019 01:42:07 +0000 (01:42 +0000)]
Fix a double-free that could occur when a component of a compound SELECT with an ORDER BY clause uses named window definitions.
FossilOrigin-Name:
92893b7980cbb0c6e26bc0b21390a717193205c9897fea5f26476462928897f9
dan [Tue, 3 Dec 2019 03:34:06 +0000 (03:34 +0000)]
Avoid a crash that could occur when a database containing a table with a temp trigger that has the same name as a temp table is detached.
FossilOrigin-Name:
c4cb9708d48ead10ee9543f86878be8382cd6e850950d5384c95254bac4a8d6e
drh [Tue, 3 Dec 2019 03:31:11 +0000 (03:31 +0000)]
Avoid a harmless zero offset of a null pointer in FTS3, so as to not provoke
unnecessary warnings from run-time checkers.
FossilOrigin-Name:
85d95abec4a596eb3ffd2ea19b4067dc1a6970264222ed5d69e75764ac21597c
drh [Tue, 3 Dec 2019 02:51:50 +0000 (02:51 +0000)]
Avoid computing a zero offset of a null pointer, which though this is
technically harmless, is upsetting to pedantic run-time checkers.
FossilOrigin-Name:
3ce804e99bbef83d49ec309157448a7c1422725606516cef904e6122aadd3922
drh [Sat, 30 Nov 2019 19:29:19 +0000 (19:29 +0000)]
Do not allow a term in the WHERE clause of the query to qualify a partial
index on the right table of a LEFT JOIN. Ticket [
7f39060a24b47353 ]
FossilOrigin-Name:
4066a34da7bcdcece6c438c27f3a11bc49b8c8373b7e1603f30f6225e2bc800a
drh [Fri, 29 Nov 2019 13:01:57 +0000 (13:01 +0000)]
Add comments in the parse.sql file to help demonstrate how rules are
encoded.
FossilOrigin-Name:
2c4f714892327a1a9a303267b1f9685e310cca5dcea9c61287d95e26291b0506
drh [Fri, 29 Nov 2019 12:51:00 +0000 (12:51 +0000)]
Fix the parse.sql output file so that it is readable into a database where
foreign keys are enforced.
FossilOrigin-Name:
3a82c554c3bde4640df6865686f8f70e2c1e07c581fed4772b6b0a8ec1b10bb6
drh [Wed, 27 Nov 2019 20:40:44 +0000 (20:40 +0000)]
More details on the comment justifying the aleged data race in the WAL-mode
checkpoint logic.
FossilOrigin-Name:
0fab65c79f675c825ed7e85c82b65ce6f990c9d0796ebb3886942d241df7b268
drh [Tue, 26 Nov 2019 14:24:12 +0000 (14:24 +0000)]
Fix various documentation typos suggested by Mark Benningfield.
No changes to code.
FossilOrigin-Name:
08f09dc4f986a27f4e4e69f8226dbfaf0cfe1269cefc2830bf0fbef7b9bbda48
drh [Tue, 26 Nov 2019 11:10:59 +0000 (11:10 +0000)]
Fix to check-in [
5d9a369301a65f32 ] so that it compiles without SQLITE_DEBUG.
FossilOrigin-Name:
fefe2d046725254367f9f82a8c8cb137e8b75dbbf4bc48debf0649479ff2f0c2
drh [Tue, 26 Nov 2019 02:22:39 +0000 (02:22 +0000)]
Add the new -S option to the lemon parser generator to cause it to output
SQL that describes the input grammar.
FossilOrigin-Name:
4dbd398d640852d4a696d68c72ee039968023d402a8053b5e6b4ef1d75e982a8
dan [Tue, 26 Nov 2019 02:03:16 +0000 (02:03 +0000)]
Fix an assert() in fts3 that could fail due to corrupt database records.
FossilOrigin-Name:
5d9a369301a65f320a0696fcf1f062ca5976ef34350590c07aecf5335c66d872
dan [Mon, 25 Nov 2019 04:15:33 +0000 (04:15 +0000)]
Modify journal3.test so that it can handle Tcl command "file attr <file> -perm" returning octal values in either "00755" or "0o755" format.
FossilOrigin-Name:
b0b655625cf491c832a259d29a67660b8d5943c201617900a83d0660b2673377
mistachkin [Mon, 25 Nov 2019 00:07:03 +0000 (00:07 +0000)]
Minor enhancements to the TclKit download tool.
FossilOrigin-Name:
75e31b1d56781fc4d28aea6c7f1393a18fd34870a5beb92df81c088d61351b4a
drh [Sat, 23 Nov 2019 16:34:40 +0000 (16:34 +0000)]
Abort the window function tree rewrite early following an OOM.
FossilOrigin-Name:
d66f95a51530259ab48f78c9f91acc38055caf338b6fee846b99a8c077466e95
dan [Sat, 23 Nov 2019 15:10:28 +0000 (15:10 +0000)]
Avoid evaluating PARTITION BY or ORDER BY expressions multiple times for window function queries that use multiple window functions with the same window-definition.
FossilOrigin-Name:
57070c68bbe15fc1d19a765182432e844c082909bdbc63b58fd86b96e2c521dd
drh [Sat, 23 Nov 2019 08:51:21 +0000 (08:51 +0000)]
Enhance the path arguments in JSON functions to access "#-N" array indexes.
FossilOrigin-Name:
ffeec62cb5223ae70bc1889df4c0b241f5d17b1a10156362ca59953028741480
dan [Sat, 23 Nov 2019 08:36:35 +0000 (08:36 +0000)]
Fix a memory leak in fts5 error handling code.
FossilOrigin-Name:
de6637e15d95b7aee2caea8b8d5b9865f276cbbf152ecf0401c4c7bfdf6dee6f
drh [Fri, 22 Nov 2019 17:37:56 +0000 (17:37 +0000)]
Extend the json-path mechanism with array indexes of the form "#" or "#-n" for
some positive number "n", to reference the end of an array.
FossilOrigin-Name:
35ed68a651f4cf8740597433b0f1c3b345841868022e0904e9f342840ba0e502
drh [Fri, 22 Nov 2019 11:49:39 +0000 (11:49 +0000)]
drh [Fri, 22 Nov 2019 11:47:04 +0000 (11:47 +0000)]
Fix an indentation error and improve the placement of an assert() based
on a tweet from Yuri Kotov.
FossilOrigin-Name:
e6314e386c6877c669bd32788d3886253b0a187bee2c3889f4eaba219f5e52c7
drh [Fri, 22 Nov 2019 11:38:40 +0000 (11:38 +0000)]
Add more test cases from Yongheng Chen and Rui Zhong.
FossilOrigin-Name:
f24e6ca4f23008212ec05cace9202dbeb37ee34530ead91fac2f5e3eac7f6347
dan [Fri, 22 Nov 2019 10:14:01 +0000 (10:14 +0000)]
Fix a crash that could occur if a sub-select that uses both DISTINCT and window functions also used an ORDER BY that is the same as its select list.
FossilOrigin-Name:
bcdd66c1691955c697f3d756c2b035acfe98f6aad72e90b0021bab6e9023b3ba
drh [Fri, 22 Nov 2019 00:42:01 +0000 (00:42 +0000)]
Revise the SQLITE_OPEN_NOFOLLOW so that it actually uses O_NOFOLLOW in the
open() system call. This backs out the SQLITE_ACCESS_SYMLINK value but adds
the new SQLITE_OK_SYMLINK return code from the xFullPathname method of
sqlite3_vfs when that routine resolves symbolic links. O_NOFOLLOW is always
included in open() system calls for journal files.
FossilOrigin-Name:
6a64fb6a2da6c98f1e87b55ad5689967e1db4eae2e08345471d95e28cd567e0f
drh [Thu, 21 Nov 2019 20:24:04 +0000 (20:24 +0000)]
Add all fuzz-test cases received from Yongheng Chen and Rui Zhong. Also
fix a minor problem in gencol1.test cases.
FossilOrigin-Name:
ac080432b480062507452d3cdbe6c0f759e6f95b65d9862e0462017405ab2b8e
drh [Thu, 21 Nov 2019 20:10:31 +0000 (20:10 +0000)]
Fix an out-of-bounds array reference in the generated column logic.
Problem discovered by valgrind.
FossilOrigin-Name:
a0ab42f779b9a96f4e43879210dfaba8fa593de77fc0ec0e2e6f116d9301ea59
drh [Thu, 21 Nov 2019 19:37:00 +0000 (19:37 +0000)]
Whenever a generated column is used, assume that all columns are used.
FossilOrigin-Name:
6601da58032d18ae00b466c0f2077fb2b1ecd84225b56e1787724bea478eedc9
drh [Thu, 21 Nov 2019 18:28:44 +0000 (18:28 +0000)]
Fix a problem that comes up when using generated columns that evaluate to a
constant in an index and then making use of that index in a join.
FossilOrigin-Name:
8b12e95fec7ce6e0de82a04ca3dfcf1a8e62e233b7382aa28a8a9be6e862b1af
dan [Thu, 21 Nov 2019 17:14:55 +0000 (17:14 +0000)]
Fix a recently introduced memory leak in the test code in test_vfs.c.
FossilOrigin-Name:
2d53a30cc23e53033af8e8666457654db5dcc453ed6cd176ce1d0bff4f528159
dan [Thu, 21 Nov 2019 14:20:59 +0000 (14:20 +0000)]
Prevent direct and indirect recursive content= options in fts3/4 and fts5.
FossilOrigin-Name:
2eb997327c2c369c10b7835be80112d77cb2a7cfa9fe4d564042984c21d94698
dan [Wed, 20 Nov 2019 16:10:40 +0000 (16:10 +0000)]
Fix a use-after-free problem in the test suite. No changes to production code.
FossilOrigin-Name:
0d1055a5da8274a59f35170b1f9469597ce4c5a4c5e851a1b81d3be2ccd32871
dan [Wed, 20 Nov 2019 13:31:52 +0000 (13:31 +0000)]
Further improve detection of corrupt records in fts3.
FossilOrigin-Name:
a0f6d526baecd061a5e2bec5eb698fb5dfb10122ac79c853d7b3f4a48bc9f49b
drh [Wed, 20 Nov 2019 12:07:40 +0000 (12:07 +0000)]
Changes to extensions and test logic so that the build works with gcc
and with -std=iso9899:1999
FossilOrigin-Name:
2575a68c3965e72f2ab211d933012442755afe6a9b7de9e9e50cdd2155fd1ec8
drh [Tue, 19 Nov 2019 21:22:16 +0000 (21:22 +0000)]
Enhancements to DBSTAT: (1) Make name=? queries efficient. (2) Add the
ability to aggregate results across each individual btree using the
aggregate=TRUE constraint in the WHERE clause.
FossilOrigin-Name:
a48f6e17599d7ec794cfcd60858d6a69cf05caaae9321048b111fedd86a3b5b2
drh [Tue, 19 Nov 2019 18:48:11 +0000 (18:48 +0000)]
Get the aggregate=TRUE feature working on the DBSTAT virtual table.
FossilOrigin-Name:
16fef3db063830884de46d53a289f637a7204fe84fcdee7ea81dbb8bca578952
drh [Tue, 19 Nov 2019 14:01:51 +0000 (14:01 +0000)]
Begin an enhancement effort for the built-in DBSTAT virtual table.
FossilOrigin-Name:
9b5722f0fe666b99677e5f333dd8413aefb9ace7a461d74f6558f0ac53768719
mistachkin [Tue, 19 Nov 2019 00:13:42 +0000 (00:13 +0000)]
Make the result of sqlite3_normalized_sql() survive its statement being reprepared.
FossilOrigin-Name:
4330f0795dbc2ab41dddd41d5979331fb9b78c477c66367c4be52f929531a45f
mistachkin [Mon, 18 Nov 2019 23:48:03 +0000 (23:48 +0000)]
Add support for the SQLITE_ACCESS_SYMLINK flag in the Win32 VFS.
FossilOrigin-Name:
175c15008e9f19b8f6762c2fe4a545735128765081980eed01d5e46ca4acb500
mistachkin [Mon, 18 Nov 2019 22:34:07 +0000 (22:34 +0000)]
Ensure all file names passed to the VFS layer are double-zero terminated.
FossilOrigin-Name:
251230cf43c591cf49cf9d2f392581c57d334b791bc3407814d216b5999c32f4
drh [Mon, 18 Nov 2019 18:43:19 +0000 (18:43 +0000)]
In the SQLITE_OPEN_NOFOLLOW processing, distinguish between an I/O error
on the xAccess() call and an actual symlink encounter.
FossilOrigin-Name:
2e98b42fcb7bc38e22808a9dc1d7a4231ed08ffa97c9f08f33e6e8cd8726856c
drh [Mon, 18 Nov 2019 17:46:38 +0000 (17:46 +0000)]
drh [Mon, 18 Nov 2019 14:04:21 +0000 (14:04 +0000)]
Improvements to detection of corruption in the %_stat shadow table of FTS4.
FossilOrigin-Name:
6b67eba54e7b4887a8cdab7537b12a95e9f17bcdaa0b423af5ed5bd91f69f2c6
drh [Mon, 18 Nov 2019 12:04:17 +0000 (12:04 +0000)]
Further improvements to shadow table corruption detection in FTS3.
FossilOrigin-Name:
e35d8c76aae59f57cc5193f79b21b4298029bea78e1aab7af67432162ce63e00
drh [Mon, 18 Nov 2019 11:14:59 +0000 (11:14 +0000)]
Detect and prevent infinite recursion in fts3SelectLeaf() due to a
malformed FTS3 btree.
FossilOrigin-Name:
dfcf081d842629a0b177be7eb2eb8ce719324068991040a581e33ea1d5db3d27
drh [Mon, 18 Nov 2019 10:37:57 +0000 (10:37 +0000)]
Improved detection of corruption in the %_stat table of FTS4.
Chromium ticket
1025467 .
FossilOrigin-Name:
10f8a3b718e0f47be528fba086c318e1dfe18ead383d01cfa24dedabad41e0a2
drh [Sun, 17 Nov 2019 11:47:50 +0000 (11:47 +0000)]
Fix an assert that can fail if the schema is corrupt.
FossilOrigin-Name:
ed57c48e4bb337810521bda2da79614313e4835a317ca4eadb52bd67e4eadf98
drh [Sun, 17 Nov 2019 02:41:06 +0000 (02:41 +0000)]
Better detection of corruption in the %_stat and %_docsize shadow tables
of FTS3.
FossilOrigin-Name:
1e449687881f4d388e54a0e51bcabba41ab10cf7e596ff65e31e88a23c70d497
drh [Sun, 17 Nov 2019 00:08:24 +0000 (00:08 +0000)]
drh [Sat, 16 Nov 2019 23:47:40 +0000 (23:47 +0000)]
More improvements to shadow table corruption detection in FTS3.
FossilOrigin-Name:
51525f9c3235967bc00a090e84c70a6400698c897aa4742e817121c725b8c99d
drh [Sat, 16 Nov 2019 21:40:49 +0000 (21:40 +0000)]
Improved detection of corrupt shadow tables in FTS3. Enable the debugging
special-inserts for FTS3 for both SQLITE_DEBUG and SQLITE_TEST.
FossilOrigin-Name:
04b2873be5aedeb1c4325cf36c4b5d180f929a641caf1e3829c03778adb29c8e
drh [Sat, 16 Nov 2019 16:54:53 +0000 (16:54 +0000)]
More restrictions on changes to shadow tables when in defensive mode.
FossilOrigin-Name:
bae76a5c40703871e5ce4cd23d6fae5a3836606f524a63b01ac828c7a602c5e9
drh [Sat, 16 Nov 2019 14:15:19 +0000 (14:15 +0000)]
Do not allow CREATE TABLE or CREATE VIEW of an object with a name that looks
like a shadow table name.
FossilOrigin-Name:
6aef58b629d89955f85f65191ba2be67b2adfac4f0327fe9a7141cb2705dbc00
drh [Sat, 16 Nov 2019 13:51:31 +0000 (13:51 +0000)]
Break out the test for writable shadow tables into a separate subroutine.
FossilOrigin-Name:
8ad34d36a141fa8f5d9bd784dfeb892c983897a6dc6b867607cc668508acf944
drh [Sat, 16 Nov 2019 12:04:38 +0000 (12:04 +0000)]
Do not allow shadow tables to be dropped in defensive mode.
FossilOrigin-Name:
70390bbca49e706649ca5b7c031f0baf416fc38798c17e5f3b73746b3e66e3b5
drh [Sat, 16 Nov 2019 11:33:39 +0000 (11:33 +0000)]
Fix a potential NULL pointer dereference on a RENAME TABLE that references
a VIEW with a logic error in a window function in the ORDER BY clause.
FossilOrigin-Name:
0adb273f7e7671efb0e0a1619887e369500dfd2db7ef1b1e125c2414ea96e96f
drh [Fri, 15 Nov 2019 21:16:34 +0000 (21:16 +0000)]
Modify three test cases so that they work even with unusual versions of the
library printf().
FossilOrigin-Name:
8f4a3750b7d272daf96831655ffee80d457875ee121fc4537008046b9a00d0e7
drh [Fri, 15 Nov 2019 00:52:13 +0000 (00:52 +0000)]
Fix table-valued functions so that they will work as the right table
in a LEFT JOIN. Ticket [
2ae0c599b735d59e ]
FossilOrigin-Name:
2c35d3f67b67a53ead08b1c395e7ca8e5bf65f94a5a962a0562994a3c66c95d9
drh [Thu, 14 Nov 2019 18:07:28 +0000 (18:07 +0000)]
Add support for the sqlite3_hard_heap_limit64() interface and the
hard_heap_limit pragma.
FossilOrigin-Name:
6399c47ea89c5766274bd6abdc9b6a85fe5b7f6c1078972c2f58e624bae59b7c
drh [Thu, 14 Nov 2019 17:46:32 +0000 (17:46 +0000)]
Fix a bug in the hard_heap_limit pragma so that it returns the new value of
the hard_heap_limit, not the soft_heap_limit. Change SQLITE_MAX_MEMORY so
that it works by setting the default hard_heap_limit value.
FossilOrigin-Name:
33fd0c3abcad5555a150990a22d9c1bab99e79be01143fccb9fafc9b52cf92c8
drh [Thu, 14 Nov 2019 15:21:15 +0000 (15:21 +0000)]
drh [Thu, 14 Nov 2019 15:10:48 +0000 (15:10 +0000)]
Minor documentation enhancements. No changes to code.
FossilOrigin-Name:
6153f3aada0cc9c5e773753797892ee78b518b0d76568382f5fbc9ee960f814c
drh [Thu, 14 Nov 2019 13:57:15 +0000 (13:57 +0000)]
drh [Thu, 14 Nov 2019 13:24:04 +0000 (13:24 +0000)]
Ensure that the same subquery does not go through the window-function rewrite
more than once, even when that subquery is part of a virtual table constraint
that lacks the omit flag.
FossilOrigin-Name:
d0bc7db6b0a53edc04815622c46250d26f526f56e59f14875f4e18c75b49000d
mistachkin [Wed, 13 Nov 2019 18:50:36 +0000 (18:50 +0000)]
drh [Wed, 13 Nov 2019 16:50:06 +0000 (16:50 +0000)]
Fix the sqlite3TreeView() output to consistently use a colon and not a
comma after the table number in the AST dumps.
FossilOrigin-Name:
fa2416f623d83fe93253137302a74fcd6cdd041da337a0756df344d7d09a19f5
drh [Tue, 12 Nov 2019 16:21:27 +0000 (16:21 +0000)]
For for the previous check-in: Always enable the nUri variable, even
when debugging is turned off.
FossilOrigin-Name:
f84a15394c369cbdb6fba87c603a609722cf1f499626c7f20699060273ab5081
drh [Tue, 12 Nov 2019 14:43:47 +0000 (14:43 +0000)]
Ensure that the main filename and the journal filenames in the pager
object are all correctly double-zero terminated.
FossilOrigin-Name:
df51ae19c1aa4c26f2dcd427eddc1c9cc24b698e1ab0a948b198a57432e25e1e
drh [Tue, 12 Nov 2019 03:45:23 +0000 (03:45 +0000)]
dan [Mon, 11 Nov 2019 15:13:11 +0000 (15:13 +0000)]
Remove an asm() block from build tool mksourceid.c, as it causes build failures on some systems and performance is not important at build-time.
FossilOrigin-Name:
8e100e6c35c30e0d7e4014b9435f81f9f61ddab2386dfe9a4218d8190a6da3be
drh [Sun, 10 Nov 2019 11:09:06 +0000 (11:09 +0000)]
Proper surrogate pair decoding added to JSON functions. See the mailing list
bug report and [https://bugs.python.org/issue38749]. More test cases
needed here, but it seems to work so far.
FossilOrigin-Name:
51027f08c0478f1bf9d7545d9e268c772c0a5cd5dda4b03d78f16c7d94f2f50d
drh [Sun, 10 Nov 2019 10:08:03 +0000 (10:08 +0000)]
drh [Sat, 9 Nov 2019 15:31:34 +0000 (15:31 +0000)]
Change the COLFLAG_NOTAVAIL bitmask so that it fits in the single-byte
Walker.eCode field.
FossilOrigin-Name:
53847f5c28bdecfbc7b08685d4dcd0565526f6191491b4827c3c966a4b8d4a85
drh [Sat, 9 Nov 2019 14:44:18 +0000 (14:44 +0000)]
drh [Sat, 9 Nov 2019 14:38:58 +0000 (14:38 +0000)]
Make sure the WITH stack in the Parse object is disabled following an error.
FossilOrigin-Name:
de6e6d6846d6a41c4821454dfdc042096234df753be08c5567b79fe535d9b6ea
drh [Fri, 8 Nov 2019 20:13:44 +0000 (20:13 +0000)]
When a virtual table reports orderByConsumed, that tells us nothing about
whether or not the SQLITE_DISTINCTBY constraint is met.
Fix for ticket [
7e59041f9c4e5102 ].
Test cases in TH3.
FossilOrigin-Name:
b59f94e4da9b1653f2004b214407a50340dd476b27e6ec7e29e501a95db9c963
drh [Thu, 7 Nov 2019 14:51:24 +0000 (14:51 +0000)]
Fix the xferCompatibleIndex() function so that it recognizes that a PRIMARY KEY
index for a WITHOUT ROWID table is different from a UNIQUE constraint index
on the primary key. Ticket [
302027baf1374498 ]
FossilOrigin-Name:
34f64f11ca481996b1ff1686bdc5e278946635b6856cd1fe2355fce8e298e0f8
drh [Thu, 7 Nov 2019 02:32:54 +0000 (02:32 +0000)]
Restore generated column loop detection logic that was incorrectly removed
from the previous check-in [
9e07b48934e9a972 ]. This fixes ticket
[
299b50ba812d8e54 ]
FossilOrigin-Name:
104a2beb57037f9353ffa77096aae0eb64e4682e667f31623bfd3d064dd8d881
drh [Wed, 6 Nov 2019 22:19:07 +0000 (22:19 +0000)]
Change the way generated columns are computed so that no column is computed
inside branch code that might not be taken. Ticket [
4fc08501f4e56692 ]
FossilOrigin-Name:
9e07b48934e9a972dcf62e3538b3b21ffa044c553feba0441675ac0bbe13bcb2
mistachkin [Wed, 6 Nov 2019 19:25:45 +0000 (19:25 +0000)]
drh [Wed, 6 Nov 2019 17:31:18 +0000 (17:31 +0000)]
Fix the OP_DeferredSeek index-to-table column map in P4 so that it works
with generated columns. Ticket [
ce22a07731530118 ]
FossilOrigin-Name:
36c11ad51fe9ab1bde0b98d0ea9b8588e07d168cd8027486749372894941ad93
drh [Wed, 6 Nov 2019 14:49:43 +0000 (14:49 +0000)]
Fix the handling of NOT NULL constraint violations for generated columns in
a REPLACE statement. Ticket [
2399f5986134f79c ]
FossilOrigin-Name:
77b1c90add514050fe62f22751362fecacd99f9775346cffc60e09c326e64e10
drh [Mon, 4 Nov 2019 12:49:15 +0000 (12:49 +0000)]
Changes an unreachable testcase() into an assert().
FossilOrigin-Name:
5710845b6314f924b490434b4446169f4bb50576aaa940472af68150db16e127
drh [Mon, 4 Nov 2019 02:05:52 +0000 (02:05 +0000)]
Fix a false-postive in the sqlite3ExprImpliesNonNullRow() decision routine,
that resulted in an incorrect LEFT JOIN strength reduction when the
WHERE clause contained a row-value comparison.
Ticket [
02aa2bd02f97d0f2 ]
FossilOrigin-Name:
ea20068e6d97c9349ebcc7d0a01e99ebf08c6f44363f71a0218a1abea209adc5
drh [Sun, 3 Nov 2019 00:07:41 +0000 (00:07 +0000)]
The optimization of check-in [
9b2879629c34fc0a ] is incorrectly reasoned.
The WHERE clause of the partial index might not be true if the table of
the partial index is the right table of a left join. So disable the
optimization in that case. Ticket [
623eff57e76d45f6 ]
FossilOrigin-Name:
3be19e1151af1850b65991edb82420f9412a7798dd756c86eaa9ffdde573263a
drh [Sat, 2 Nov 2019 17:59:10 +0000 (17:59 +0000)]
Fix a problem in VIEW creation that was introduced by the generated columns
feature.
FossilOrigin-Name:
9c795c4d2b042d2932774bd1274fa0167ca2dc9838e127e0cf31eb9273a32f2c
drh [Sat, 2 Nov 2019 13:45:03 +0000 (13:45 +0000)]
"STORED" is not actually a keyword. The parser looks for STORED as an
ordinary identifier.
FossilOrigin-Name:
167cd574d6a1d4fe2253f5bc5aaa7b031cbc82853e4d33b8d9b72eaf049003d4
drh [Sat, 2 Nov 2019 13:32:50 +0000 (13:32 +0000)]
In sqlite3GenerateIndexKey(), do not attempt to reuse column values from
the previous index if the current index is a partial index as the partial
index test may have corrupted those values. Ticket [
a9efb42811fa41ee ]
FossilOrigin-Name:
17e9f65814264de9c35bc5ba94e0a66fbbf1200c00d33ab9a19a0b6f92bc685a
drh [Sat, 2 Nov 2019 00:00:14 +0000 (00:00 +0000)]
Restore the on-line ".help" for the ".explain" command in the CLI.
FossilOrigin-Name:
28b8f1036d569bccce56b4e7042348024b5dd1ffa04850cbeddab1e35c49e5b7
drh [Fri, 1 Nov 2019 18:52:09 +0000 (18:52 +0000)]
drh [Fri, 1 Nov 2019 17:31:27 +0000 (17:31 +0000)]
The SET DEFAULT and SET NULL conflict resolution actions for foreign key
constraints should cause an error when they appear on a generated column.
FossilOrigin-Name:
b47513d2b32b61ba42c1e9b59287d28f6fee231e6c65de2a3aa19effbbaf1e7f
drh [Fri, 1 Nov 2019 16:37:53 +0000 (16:37 +0000)]
Fix a potential use-after-free bug that follows an OOM error in code
added two days ago by check-in [
84e02d773d60cffe ]. Problem discovered
by OSSFuzz.
FossilOrigin-Name:
0a2eb949f8a759e5745d9468c8183d3c0b4b30e0fa2a14b3062620eb9e1d5c1d