]>
git.ipfire.org Git - thirdparty/sqlite.git/log
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
drh [Fri, 1 Nov 2019 16:08:20 +0000 (16:08 +0000)]
Add another missing column number translation to the foreign key logic.
FossilOrigin-Name:
32df5edcfef2605009f45d6ef1b97c63a99df07c7b4e00dc70f93001cfb8d81f
drh [Fri, 1 Nov 2019 15:19:24 +0000 (15:19 +0000)]
Omit the optimization that reduces the column-count on rowid-table cursors
when the table has generated columns, because we do not know what columns the
generator expressions might try to access.
FossilOrigin-Name:
e6c96ed91e7a96d2bd30ea9df132644ac02d5a321a62f81f8f3984a8e49ed94b
dan [Fri, 1 Nov 2019 13:37:26 +0000 (13:37 +0000)]
Fix an fts3 assert() that could fail when operating on a database containing corrupt records.
FossilOrigin-Name:
7c52f5478f9ecf5c078208759143ae9de43c1bf191dfcd74acb8bd169d4dc883
drh [Fri, 1 Nov 2019 12:14:30 +0000 (12:14 +0000)]
Add missing column translations to foreign key logic.
Ticket [
c28a01da72f8957c ]
FossilOrigin-Name:
bc6a43e7ee6353b9ef3dea4309c77e170a1c798eefcfaa7636bf5a93e51c47ee
drh [Fri, 1 Nov 2019 10:49:15 +0000 (10:49 +0000)]
Fix a potential array bounds overflow in the mkkeywordhash.c code generator.
Also add marks to omit keywords specific to generated columns when building
with -DSQLITE_OMIT_GENERATED_COLUMNS.
FossilOrigin-Name:
cc6a40818387f78f89499f09e3f1c4655c7396af1cba2596c7fb2f23f3e9755f
drh [Fri, 1 Nov 2019 02:30:54 +0000 (02:30 +0000)]
drh [Thu, 31 Oct 2019 20:54:20 +0000 (20:54 +0000)]
Correctly generate pre-UPDATE content for virtual columns that are used
by foreign key constraints. Ticket [
b9befa4b83a660cc ]
FossilOrigin-Name:
40d3282ec285d9f724f6548283f48b601510cf5284da17485723fd650a68f436
drh [Thu, 31 Oct 2019 17:13:17 +0000 (17:13 +0000)]
Add a few simple TCL test cases for generated columns. (Full test coverage
of the generated column logic is provided separately by TH3.)
FossilOrigin-Name:
acedb5c7f7dc1d68bef62098d42ca59e1be7a5083bb03dc07c03b9f9d817158b
drh [Thu, 31 Oct 2019 13:16:26 +0000 (13:16 +0000)]
Ignore differences in Expr.op2 in sqlite3ExprCompare() in cases where it
does matter. Ticket [
1d2a8efc6c3a595a ].
FossilOrigin-Name:
329820673a12ff6a6c8759f40989d4ccf272441064b0366a5f491695b55ad0e9
drh [Thu, 31 Oct 2019 12:30:38 +0000 (12:30 +0000)]
Enhance the TreeView logic to show information about Expr.op2 for
FUNCTION and COLUMN nodes.
FossilOrigin-Name:
aceeaf9e28767a0880a16872867a1f57bff163acd0f10d19d5688068077590fa
drh [Wed, 30 Oct 2019 18:50:08 +0000 (18:50 +0000)]
Always disallow the use of non-deterministic functions in CHECK constraints,
even date/time functions that use the 'now' or similar keywords. Provide
improved error messages when this requirement is not met.
Ticket [
830277d9db6c3ba1 ]
FossilOrigin-Name:
2978b65ebe25eeabe543b67cb266308cceb20082a4ae71565d6d083d7c08bc9f
drh [Wed, 30 Oct 2019 16:29:02 +0000 (16:29 +0000)]
Simplify the bytecode generation for SQL function calls such that the
OP_Function or OP_PureFunc opcodes are coded directly, rather than using
the intermediate OP_Function0 or OP_PureFunc0 - opcodes that are now removed.
FossilOrigin-Name:
84e02d773d60cffe619104991d21d7f0c68616c0f6bb99686bf54f5306c756d0
drh [Wed, 30 Oct 2019 13:00:23 +0000 (13:00 +0000)]
New tokens ALWAYS, GENERATED, and STORED used by generated columns should
all be fallback tokens.
FossilOrigin-Name:
13fe6978b7de208d2e27460d824f7fc778cf6ea0aabfe566b32bb410b8816f63
drh [Tue, 29 Oct 2019 16:18:45 +0000 (16:18 +0000)]
Remove the legacy_file_format PRAGMA. In its place, provide the
SQLITE_DBCONFIG_LEGACY_FILE_FORMAT option to sqlite3_db_config().
Fix for ticket [
6484e6ce678fffab ]
FossilOrigin-Name:
4d424f3047b48fc441475137f30a719d2f079390c86fe2617710ddfb05c5e240
drh [Tue, 29 Oct 2019 03:39:17 +0000 (03:39 +0000)]
Tighten the generated column requirement such that every table must have
at least one non-generated column. Ticket [
166347c6fc994155 ].
FossilOrigin-Name:
4fba090e678ef184736277c9ec9a9374c8bd4df4d41f51a3dc6818e2efcc103b
drh [Tue, 29 Oct 2019 03:30:26 +0000 (03:30 +0000)]
Add a missing translation from table column numbers to storage table numbers
while processing constraints on an UPDATE statement.
Ticket [
9621dd78a024d07a ]
FossilOrigin-Name:
361ea81ae8a13e7d2ec4c2412f30e049bb6ee320980d502c86bedc315cdd3bc0
drh [Tue, 29 Oct 2019 01:26:24 +0000 (01:26 +0000)]
Disallow tables that have only virtual columns.
FossilOrigin-Name:
591973217f1caf24cde91dc15b7edca2edda05dac8ae2b2cd8d71e7aa072f7d1
dan [Mon, 28 Oct 2019 13:54:59 +0000 (13:54 +0000)]
Fix a problem in fts3 causing it to report corruption if a doclist contains consectutive rowid entries that differ by more than 2^63.
FossilOrigin-Name:
0b0a3048f9df88bbc8979f2ac5247bee7d7bc1e585faca252610d2fcbe36d51d
drh [Mon, 28 Oct 2019 13:07:01 +0000 (13:07 +0000)]
Remove a NEVER() comparison from sqlite3ExprCompare().
FossilOrigin-Name:
f4285297e1e7ebef90bfc0f71402a4e1726d31bc15b69fec13a1f0d98fed1f08
drh [Mon, 28 Oct 2019 04:20:28 +0000 (04:20 +0000)]
drh [Sun, 27 Oct 2019 22:22:24 +0000 (22:22 +0000)]
Improved detection of attempts to use a generated column as part of the
primary key. Ticket [
91e86951016a6802 ]
FossilOrigin-Name:
6d1bbba9a004a2491c76b4a7d09edb9b738102c46fdcb3e0f7b22bffa719518e
drh [Sat, 26 Oct 2019 23:51:44 +0000 (23:51 +0000)]
Remove code from the constraint checker that generates virtual column values
with the incorrect time. Turns out the the regular code for all other
columns works correctly and so the incorrect special-case code is not
actually needed. Fix for ticket [
3ea175512444b0d1 ].
FossilOrigin-Name:
5b4c0f2ddc6f324e23bbde0ee3d1ab672cfe8ab5044c9b693f4c33cdd75c211e
drh [Sat, 26 Oct 2019 18:56:12 +0000 (18:56 +0000)]
Remove redundant code resulting from a merge error on the previous check-in.
FossilOrigin-Name:
713fe86b8c9f3c9ef8af952019e99ba2f4741326226264de6a66baaeb1803d2a
drh [Sat, 26 Oct 2019 18:47:47 +0000 (18:47 +0000)]
drh [Sat, 26 Oct 2019 17:08:06 +0000 (17:08 +0000)]
Performance optimization on sqlite3GenerateConstraintChecks() - bypass the
loop that checks each column for NOT NULL constraints if it is known in
advance that the table has no NOT NULL constraints.
FossilOrigin-Name:
e3c3f4d7872f431a95627d52553101388c1e39458cc7e7f93fc81255f49a89a5
drh [Sat, 26 Oct 2019 16:38:49 +0000 (16:38 +0000)]
Clarify some comments and add assert() and testcase() macros to the
replace-trigger recheck logic for ticket [
c1e19e12046d23fe ]
FossilOrigin-Name:
8c0042bd5ccd83f8794d19cbb1ec7564584f0dce54bfebc0ada00b836aca065f
drh [Sat, 26 Oct 2019 16:02:34 +0000 (16:02 +0000)]
Fix a problem in the legacy ".explain on" formatting when it is used on
a query with more than 8 output columns.
FossilOrigin-Name:
070b49825c5f87cce15be4b758f0dfdd65226ec379465ca527a18706a1f3b8f4
drh [Sat, 26 Oct 2019 15:40:17 +0000 (15:40 +0000)]
Minor changes to help ensure the pointer returned by sqlite3VdbeGetOp() is
not used after it becomes invalid.
FossilOrigin-Name:
346bdd49fb93aa58e8bd14250974d8c0c32cc7e8317c8b12da1fa44db10d8a3a
drh [Sat, 26 Oct 2019 12:27:55 +0000 (12:27 +0000)]
Overnight, OSSFuzz helpfully pointed out a potential use-after-free bug in
yesterdays changes, involving continued use of a pointer after the memory
pointed to had been realloc()-ed. Thanks Google.
FossilOrigin-Name:
c422afb507dc875751e6a72e4ba5f4f0793097c0de4533c1600311f689e76ed7
drh [Sat, 26 Oct 2019 01:43:14 +0000 (01:43 +0000)]
Add missing VdbeCoverage() macro. Fix an off-by-one error in partial index
handling. New test cases. Ticket [
c1e19e12046d23fe ]
FossilOrigin-Name:
41cc8e3dab998f7efc898d18837ca7fdac94ea3f89954990c5231456bf725fee
drh [Sat, 26 Oct 2019 00:04:21 +0000 (00:04 +0000)]
If replace triggers are run during uniqueness checking, then rerun all
uniqueness checks a second time using the ABORT algorithm.
Fix for ticket [
c1e19e12046d23fe ]
FossilOrigin-Name:
fbac0c65d8464b126d385262d176864add55452ec9e3d5eb76ffee06e820cb9c
drh [Fri, 25 Oct 2019 14:46:05 +0000 (14:46 +0000)]
Performance optimization in sqlite3BtreeCursor().
FossilOrigin-Name:
ea068b099c96b8b9526114732d2a6be186cf381b7329d102778ad25b95510c9e
drh [Thu, 24 Oct 2019 23:43:32 +0000 (23:43 +0000)]
drh [Thu, 24 Oct 2019 21:02:06 +0000 (21:02 +0000)]
The previous fix was incomplete. It is also necessary to disable the
Expr.y.pTab field when making the translation.
FossilOrigin-Name:
b99d5701312f7472e6b606bd824f9273617e2655920485bf50aa96d408064721
dan [Thu, 24 Oct 2019 20:35:27 +0000 (20:35 +0000)]
In fts5, fix a case of overreading a buffer by 1 byte when counting characters in malformed utf-8. Fix for [
dd1f67bf ].
FossilOrigin-Name:
8d964e1c21d4cea699023e02b0616a75c5859dd083c9365cdcbc0676ebbdaae4
drh [Thu, 24 Oct 2019 20:29:25 +0000 (20:29 +0000)]
Fix handling of covering indexes that use virtual columns.
FossilOrigin-Name:
e0f7e321eca91c49102649f70728de69347cbd7b16599b854203c24cfdc348e6
drh [Thu, 24 Oct 2019 19:35:26 +0000 (19:35 +0000)]
Correction to check-in [
bec5b6d4d083556d ] so that it detects *all*
triggers that might perturb the insertion cursor.
Ticket [
50c09fc2cf0d91ce ].
FossilOrigin-Name:
521f1d36282549488a47a434484a24924ee970d29f05a8ae499b7d536bcd692b
drh [Thu, 24 Oct 2019 01:04:10 +0000 (01:04 +0000)]
Do not allow ALTER TABLE ADD COLUMN for a STORED column.
FossilOrigin-Name:
42fc08bc1528a34a603c2c085b515766a8d33ae7ea0350a52b0ca24b94ebcbc5
drh [Wed, 23 Oct 2019 21:00:40 +0000 (21:00 +0000)]
Add an experimental set of UUID processing functions as the uuid.c
extension in ext/misc/uuid.c.
FossilOrigin-Name:
1a6e009372cf9571e540812c8607e95a86740112a1091f03e3f632339eccb629
drh [Wed, 23 Oct 2019 18:09:39 +0000 (18:09 +0000)]
When a vector comparison appears in the WHERE clause and the constraint side
has a COLLATE clause on the first term of the vector, be sure to honor that
COLLATE clause. Ticket [
135c9da7513e5a97 ].
FossilOrigin-Name:
978b2d20cf95d0b7143e3104ce1e9d5c85002867b554dc6b21deb528b730bbc7
drh [Wed, 23 Oct 2019 15:47:33 +0000 (15:47 +0000)]
Minor adjustments for clarity and test coverage.
FossilOrigin-Name:
30065716878d4058e75eb510b0b27b68e5193d04625eb173210de8061f20f499
drh [Wed, 23 Oct 2019 03:53:10 +0000 (03:53 +0000)]
Fix incorrect arguments to testcase() macros.
FossilOrigin-Name:
812467fbf04ce00228a8381a5eee471e4e35cc63184a4538129fcd70b7cec979
drh [Wed, 23 Oct 2019 00:31:01 +0000 (00:31 +0000)]
Fix the foreign key logic to be compatible with generated columns.
FossilOrigin-Name:
3de57145a18c62ff9b556c7218d8b276000d0052e4890212fa9335235f22d03c
drh [Tue, 22 Oct 2019 21:01:34 +0000 (21:01 +0000)]
Take the declared column time into account when computing the values for
generated columns, and apply appropriate affinity.
FossilOrigin-Name:
9e04ba22dfce3998e61331ac229ff543ecccc590284c9dd5def21efbe594fba0
drh [Tue, 22 Oct 2019 20:16:04 +0000 (20:16 +0000)]
drh [Tue, 22 Oct 2019 19:51:29 +0000 (19:51 +0000)]
Disqualify row-value comparisons for use by an index if the right-hand side
has an affinity that does not match the index.
Fix for ticket [
6ef984af8972c2eb ]
FossilOrigin-Name:
5c118617cf08e17a6edfdfba86e3fc49132a780990b68b52724c2aaeac85f506
drh [Tue, 22 Oct 2019 15:45:03 +0000 (15:45 +0000)]
Do not allow generated columns in the PRIMARY KEY.
FossilOrigin-Name:
1a54743a3d327efc8ecc45b9fde91ddfea3fca36408f9b753453c31f2e4cc69c
drh [Tue, 22 Oct 2019 13:59:23 +0000 (13:59 +0000)]
In UPDATE processing, include generated columns in the set of columns being
updated if and only if their generator expressions reference some other
column that is being updated.
FossilOrigin-Name:
d38176e93a628e03f1bd8b689fbc4152a1495388da917c2d89cefed04353d2d6
drh [Tue, 22 Oct 2019 13:01:24 +0000 (13:01 +0000)]
New testcase() macros. Fix a problem with INSERT when the IPK is to the
right of generated columns.
FossilOrigin-Name:
412799fc5527aaca987e4e04b8a4f774dcdb70fb80e3a126dc3a26d48a66935c
drh [Tue, 22 Oct 2019 12:02:09 +0000 (12:02 +0000)]
Merge changes on trunk into the generated-columns branch.
FossilOrigin-Name:
ba123b8c201053d8f9387de38f3513b06f7721b28d79fab8489f96d336105117
drh [Tue, 22 Oct 2019 11:29:22 +0000 (11:29 +0000)]
Previous check-in to fix [
b47e3627ecaadbde ] was incomplete. This check-in
completes the fix and adds a test cases.
FossilOrigin-Name:
c7da1c01f1f239e68c2173ac5748b8c5798271e43bdcee68f51f97cd0ca92bd5
drh [Tue, 22 Oct 2019 01:00:16 +0000 (01:00 +0000)]
Move the sqlite3LocateCollSeq(), sqlite3FindCollSeq(), and
sqlite3GetCollSeq() routines so that they are all beside one another in
the callback.c source file. No logic changes.
FossilOrigin-Name:
9ff80a9bf8fee776e2f282d0597215b77d48093ebc71d047ad1457da0582ddbc
drh [Tue, 22 Oct 2019 00:03:41 +0000 (00:03 +0000)]
When flipping ("commuting") a comparison operator, set the new EP_Commuted
bit rather than adding extra EP_Collate bits, to single later processing that
the order of precedence for COLLATE operators is inverted.
Fix for ticket [
b47e3627ecaadbde ]
FossilOrigin-Name:
90f7c477354d67d22d5eb0da22dac579f384ab44743fdc19887220e32203ebc2
drh [Mon, 21 Oct 2019 23:41:56 +0000 (23:41 +0000)]
Add a VdbeCoverage() macro that was omitted from check-in [
eea1e7aa57e74c43 ].
FossilOrigin-Name:
cd2317d04c1c4bcf5fe63aa02a6051bdfae8f5566a098e3f45bf9ec1dd0c3ea6
drh [Mon, 21 Oct 2019 16:15:57 +0000 (16:15 +0000)]
Try to fix a harmless compiler warning reported by ICC.
FossilOrigin-Name:
7f41b44ca2ecb907ea0fd09a974ac9dbdf911463a94f0f77c826cf1b1d9c3e8c
drh [Mon, 21 Oct 2019 01:04:11 +0000 (01:04 +0000)]
Changes to the INSERT logic to make it simpler and faster and so that
it works with generated columns and BEFORE triggers.
FossilOrigin-Name:
bc368cb090376d33d3844e3689c4f6bd19eed758e39b878ee67fef93b1c839ea
dan [Sun, 20 Oct 2019 08:26:08 +0000 (08:26 +0000)]
Fix a resource leak in fts5 that could occur if an auxiliary function is called from within a query that does not use the full-text index.
FossilOrigin-Name:
b528bdcd45db1b783ecd9739c3d3c890f04de7003f079668970eafaf8e23b2f3
drh [Sat, 19 Oct 2019 18:47:27 +0000 (18:47 +0000)]
Work toward getting generated columns to work with triggers. Still more
work to do in this area.
FossilOrigin-Name:
932a37275d7e932f8237d32c8fc6087ed8cd342fe01ef2f7a43c7237ab84c9ac
drh [Sat, 19 Oct 2019 15:01:52 +0000 (15:01 +0000)]
drh [Sat, 19 Oct 2019 13:29:10 +0000 (13:29 +0000)]
Refactor names of column index transformation functions, for clarity.
Get generated columns working with ALTER TABLE RENAME COLUMN.
FossilOrigin-Name:
27ab41c9102e7801ff829488fc123a8040da008bef373d6704efbe2f93e1da90
drh [Fri, 18 Oct 2019 18:33:25 +0000 (18:33 +0000)]
Fixes for WITHOUT ROWID tables with VIRTUAL columns and an INTEGER PRIMARY KEY.
FossilOrigin-Name:
86074da0fd2949e231898ef0bc672d90fd89cefa49fb0eb50ff398fbdd91d1ad
drh [Fri, 18 Oct 2019 17:47:47 +0000 (17:47 +0000)]
Merge trunk enhancements into the generated-columns branch.
FossilOrigin-Name:
85bc4524d76999080faa4474e8880d2b6a2ac3a7f6a76239af4de1a42f8138c8
drh [Fri, 18 Oct 2019 17:42:47 +0000 (17:42 +0000)]
Get generated columns working for WITHOUT ROWID tables.
FossilOrigin-Name:
9f409649ec4282a47f0a8b079b419f1922e0c24779b297f477ced168d5b7910d
drh [Fri, 18 Oct 2019 15:58:50 +0000 (15:58 +0000)]
Enhance the ".imposter" command in the CLI so that the first argument
can be an existing WITHOUT ROWID table instead of an index. The resulting
imposter is the same table, but with columns in storage order and with
all constraints removed.
FossilOrigin-Name:
9dc0d34586eebf6705d9bd81494c417ac76707b8625d1ff99eda18b4ca2d8a50
drh [Fri, 18 Oct 2019 12:52:08 +0000 (12:52 +0000)]
Claw back some performance from the sqlite3ExprGetColumnOfTable() routine.
FossilOrigin-Name:
e8426acb94179ff49549aced6ea3c26c49ba4761c2f414fa1772d6a031edc79d
drh [Fri, 18 Oct 2019 12:14:48 +0000 (12:14 +0000)]
Fix sqlite3ColumnOfIndex() to account for virtual columns.
FossilOrigin-Name:
447271123e3b467d9271a4c0cf27f47af2f865c9298b8c355d9e766411a1f422
drh [Fri, 18 Oct 2019 10:05:06 +0000 (10:05 +0000)]
drh [Fri, 18 Oct 2019 02:19:18 +0000 (02:19 +0000)]
STORED columns can now reference other STORED columns, in any order, as long
as there are not loops.
FossilOrigin-Name:
0d236698e64b2a4b46f91a25279c406e0bf392fe66116678456f0a034c11d7b4
drh [Thu, 17 Oct 2019 18:35:57 +0000 (18:35 +0000)]
In the Table object, change the nVCol field to nNVCol - the number of
non-virtual columns, as that is the quantity that we need most.
FossilOrigin-Name:
4ad66af04a654d92711d2d056ce8f35cd21eac4b99fb8d78be1a314620b6d29e
drh [Thu, 17 Oct 2019 18:07:22 +0000 (18:07 +0000)]
Bug fix with INSERT using an explicit column list on a table with
a non-final STORED column.
FossilOrigin-Name:
61b4459ae6a6cc182c11abbc8b1dd629f77beb088d7ccad5e563d8d4769056df
drh [Thu, 17 Oct 2019 17:54:05 +0000 (17:54 +0000)]
Some (but not all) INSERT and UPDATE statements now work for STORED columns.
FossilOrigin-Name:
fe7517bf4d360597576ab9aba29627d7926d23f2bbbfb3e7bf4d32761617574c
drh [Thu, 17 Oct 2019 16:16:34 +0000 (16:16 +0000)]
Fix the xfer optimization for generated columns, so that VACUUM works again.
FossilOrigin-Name:
8f67b89b04622c1509dc102a83be7a80057dc791625804fc2c294089c98b97e4
drh [Thu, 17 Oct 2019 15:59:03 +0000 (15:59 +0000)]
Basic UPDATE functionality working for VIRTUAL tables.
FossilOrigin-Name:
c21959d4eb5d742a097a98e1874c0bf132dc962a97a65be1ab22d6ca3cf2b261
dan [Thu, 17 Oct 2019 15:41:36 +0000 (15:41 +0000)]
Avoid an infinite loop in fts3/4 incremental-merge in the case where the lowest level in the database contains segments but no data (because there is a delete-marker for each valid entry). Fix for [
bf1aab89 ].
FossilOrigin-Name:
35beaee059a6cccead4311886ca928d936f23584cf435e35e265e98feea723dc
drh [Thu, 17 Oct 2019 14:21:07 +0000 (14:21 +0000)]
Bug fixes so that "make test" once against runs with no errors.
FossilOrigin-Name:
7bfe0f679d8951b3e925bdf549efa0f8d6b514eddeaca69cbfddbd9476cfff5f
drh [Thu, 17 Oct 2019 13:15:40 +0000 (13:15 +0000)]
Fix the table_info and table_xinfo pragmas so that they work with virtual
columns. Table_info omits virtual columns. Table_xinfo gives them a
"hidden" flag of 2, and 3 for STORED columns.
FossilOrigin-Name:
069351b85f9a706f60d3e98fbc8aaf40c374356b967c0464aede30ead3d9d18b
drh [Wed, 16 Oct 2019 22:01:56 +0000 (22:01 +0000)]
INSERT with named columns for a table with generated columns.
FossilOrigin-Name:
64db39f92d68d1b9f23e48af35e16b969c38b58041fbe900066eeb3ddb291cef
drh [Wed, 16 Oct 2019 20:05:56 +0000 (20:05 +0000)]
ALTER TABLE is able to add a VIRTUAL column.
FossilOrigin-Name:
120c6b78cb51532f783014605f1107d40b2e4f54e3852fb1f8f167d0c0b78c69
drh [Wed, 16 Oct 2019 19:31:46 +0000 (19:31 +0000)]
Simple INSERT and SELECT operations working with VIRTUAL columns.
FossilOrigin-Name:
7f9f90b1b885fa9905b296f2e0fcc9b2341019b42fc839722a93cf60e49a9252
mistachkin [Wed, 16 Oct 2019 17:46:22 +0000 (17:46 +0000)]
Enhancements to SQL query normalization for UPDATE statements.
FossilOrigin-Name:
bba975c7af3de9aeb5c62fb8b05d61b96e4ecd0b030008442bbdd345e1e5f134
drh [Wed, 16 Oct 2019 14:56:03 +0000 (14:56 +0000)]
If an AFTER DELETE trigger fires when a conflict row is deleted by REPLACE
conflict resolution, make sure the conflict really has been resolved and that
the trigger did not recreate the row before continuing.
Ticket [
a8a4847a2d96f5de ]
FossilOrigin-Name:
eea1e7aa57e74c4329003f4550168e2aed9e33d2301a3ba84b10781a9cebbc1b
drh [Wed, 16 Oct 2019 12:18:59 +0000 (12:18 +0000)]
Initial experimental code for generated column support. Non-functional.
FossilOrigin-Name:
11d472c1df707b8d03ec57d8fc582a34f5eb89a9d02a154a9871650c65065b45
drh [Tue, 15 Oct 2019 19:01:55 +0000 (19:01 +0000)]
Formatting change on a multi-line conditional, for improved clarity.
No logic changes.
FossilOrigin-Name:
7248e3476511ecd317f54edcfe1e87443bfdcc1b10c89c7734eefcabafec6c0b
drh [Mon, 14 Oct 2019 20:32:31 +0000 (20:32 +0000)]
Futher improvements to the IN operator for row-values on virtual tables.
FossilOrigin-Name:
bc751fb64d5b08e5ca4c85cd1c6fbf09590fa9dad7e176ba373082ea373655b5
drh [Mon, 14 Oct 2019 15:24:20 +0000 (15:24 +0000)]
dan [Mon, 14 Oct 2019 15:15:50 +0000 (15:15 +0000)]
Fix a problem with row-value IN(...) operators and virtual tables.
FossilOrigin-Name:
aa57d7abac0bb92d4d5fd4e093a11cf8efc04e4eed748b2a400d01f137250649
drh [Sat, 12 Oct 2019 23:38:00 +0000 (23:38 +0000)]
When Select-Trace is enabled (in debugging builds only) do not show the
result of Window function tree rewrites if there are no window functions.
FossilOrigin-Name:
d1acf72ae1ea7484bb9c3a8630094f1a3a9597578c7b9d6e02fc0a4e3f59c57d
dan [Fri, 11 Oct 2019 18:55:10 +0000 (18:55 +0000)]
Update the zipfile extension to use deflateBound(), instead of compressBound(), to learn the maximum possible size of a deflate()d buffer.
FossilOrigin-Name:
f5ee30426e8876e70304f852153b56991a2a66e0f6a82597e9dcccf49163272d
drh [Fri, 11 Oct 2019 17:14:40 +0000 (17:14 +0000)]
Futher improvements to LEFT JOIN strength reduction.
FossilOrigin-Name:
8a39167bd2d46496f7484cfec371e4bad22da882209b01da9459c4ed5877da25
drh [Fri, 11 Oct 2019 16:01:21 +0000 (16:01 +0000)]
Improvements to the LEFT JOIN strength reduction optimization.
FossilOrigin-Name:
548082dfab5d9484279ccc11cd2833ac131b54b7481372b576d7c28bbb3294ea
dan [Fri, 11 Oct 2019 15:33:13 +0000 (15:33 +0000)]
Ensure fts3/4 prefix indexes are flushed to disk before an 'optimize' command. Fix for [
745f1abc ].
FossilOrigin-Name:
4ed905b18847d4dbf5a2570052abced338065f824137b90300f62d77b3159d80
dan [Fri, 11 Oct 2019 14:27:17 +0000 (14:27 +0000)]
Fix the fts3/4 integrity-check command so that it works with "ORDER=DESC" tables. Fix for [
8a6fa2bb ].
FossilOrigin-Name:
5863546df99abd1ad4ebcaba18dec647be4368e2c13ce0b28e48c8608d3e87ef
drh [Fri, 11 Oct 2019 14:25:00 +0000 (14:25 +0000)]
Increase the version number to 3.31.0 for the next release cycle.
FossilOrigin-Name:
ffd4c30620abe6ba38d82f3db934d18cc8468aaac4cd50a4e01be8910854d3f0
drh [Fri, 11 Oct 2019 14:21:48 +0000 (14:21 +0000)]
Faster response to sqlite3_interrupt() in the OP_IntegrityCk and OP_Count
opcodes.
FossilOrigin-Name:
bf875dc59909f9c22f7c1fc843bc4d9e5d97af5cb4ef43c4fa1d566ddfdeaacb
mistachkin [Thu, 10 Oct 2019 23:58:28 +0000 (23:58 +0000)]
mistachkin [Thu, 10 Oct 2019 23:58:16 +0000 (23:58 +0000)]
Fix harmless compiler warning seen with MSVC.
FossilOrigin-Name:
73a82114733af2a316f20eb8578badef307d14286c6ec03197744a6793425161
dan [Thu, 10 Oct 2019 17:09:44 +0000 (17:09 +0000)]
Prevent SQLite from assuming that if ((? IS NOT NULL) IS NOT NULL) is true, ? may not be NULL. Fix for [
d51a8696 ].
FossilOrigin-Name:
7833feecfe745e237f239ee4c38a9e4bf7ad66a32919150208da87c00a826473
dan [Thu, 10 Oct 2019 16:41:44 +0000 (16:41 +0000)]
Fix a problem in the fts3 integrity-check routine causing it to report as corrupt tables that contain values with embedded 0x00 bytes.
FossilOrigin-Name:
629e20c9880acc2cb9e2fa6da39a15a90483e9a8f433df29d285c23bdfb03b0b