drh
66c48907a2
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
2019-10-29 16:18:45 +00:00
drh
f4658b68fa
Tighten the generated column requirement such that every table must have
...
at least one non-generated column. Ticket [166347c6fc994155].
FossilOrigin-Name: 4fba090e678ef184736277c9ec9a9374c8bd4df4d41f51a3dc6818e2efcc103b
2019-10-29 03:39:17 +00:00
drh
b6d861e523
Add a missing translation from table column numbers to storage table numbers
...
while processing constraints on an UPDATE statement.
Ticket [9621dd78a024d07a]
FossilOrigin-Name: 361ea81ae8a13e7d2ec4c2412f30e049bb6ee320980d502c86bedc315cdd3bc0
2019-10-29 03:30:26 +00:00
drh
2c40a3eb35
Disallow tables that have only virtual columns.
...
FossilOrigin-Name: 591973217f1caf24cde91dc15b7edca2edda05dac8ae2b2cd8d71e7aa072f7d1
2019-10-29 01:26:24 +00:00
dan
9930cfe878
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
2019-10-28 13:54:59 +00:00
drh
0f28e1bdd9
Remove a NEVER() comparison from sqlite3ExprCompare().
...
FossilOrigin-Name: f4285297e1e7ebef90bfc0f71402a4e1726d31bc15b69fec13a1f0d98fed1f08
2019-10-28 13:07:01 +00:00
drh
76baf799a2
ALWAYS macro added for coverage.
...
FossilOrigin-Name: a1e1ba9145049491c593ac70d9e05149662d34770129c270d702f284cd19a481
2019-10-28 04:20:28 +00:00
drh
a0e16a2261
Improved detection of attempts to use a generated column as part of the
...
primary key. Ticket [91e86951016a6802]
FossilOrigin-Name: 6d1bbba9a004a2491c76b4a7d09edb9b738102c46fdcb3e0f7b22bffa719518e
2019-10-27 22:22:24 +00:00
drh
1231b4773d
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
2019-10-26 23:51:44 +00:00
drh
c34f05cca7
Remove redundant code resulting from a merge error on the previous check-in.
...
FossilOrigin-Name: 713fe86b8c9f3c9ef8af952019e99ba2f4741326226264de6a66baaeb1803d2a
2019-10-26 18:56:12 +00:00
drh
a88c8c1ae4
Add support for generated columns.
...
FossilOrigin-Name: b855acf1831943b3914491ed0bc333131321930cab480a5281012a3aebbba492
2019-10-26 18:47:47 +00:00
drh
cbda9c7ac7
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
2019-10-26 17:08:06 +00:00
drh
d3c468b758
Clarify some comments and add assert() and testcase() macros to the
...
replace-trigger recheck logic for ticket [c1e19e12046d23fe]
FossilOrigin-Name: 8c0042bd5ccd83f8794d19cbb1ec7564584f0dce54bfebc0ada00b836aca065f
2019-10-26 16:38:49 +00:00
drh
a015d3c82f
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
2019-10-26 16:02:34 +00:00
drh
166bc383e2
Minor changes to help ensure the pointer returned by sqlite3VdbeGetOp() is
...
not used after it becomes invalid.
FossilOrigin-Name: 346bdd49fb93aa58e8bd14250974d8c0c32cc7e8317c8b12da1fa44db10d8a3a
2019-10-26 15:40:17 +00:00
drh
d901b168b5
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
2019-10-26 12:27:55 +00:00
drh
0660884ea0
Add missing VdbeCoverage() macro. Fix an off-by-one error in partial index
...
handling. New test cases. Ticket [c1e19e12046d23fe]
FossilOrigin-Name: 41cc8e3dab998f7efc898d18837ca7fdac94ea3f89954990c5231456bf725fee
2019-10-26 01:43:14 +00:00
drh
a407eccb61
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
2019-10-26 00:04:21 +00:00
drh
db561bceda
Performance optimization in sqlite3BtreeCursor().
...
FossilOrigin-Name: ea068b099c96b8b9526114732d2a6be186cf381b7329d102778ad25b95510c9e
2019-10-25 14:46:05 +00:00
drh
1b22c1b816
Merge fixes from trunk.
...
FossilOrigin-Name: 4ec57d88415fa4ea2e99d4a5671074ec6829d6824bc8509d5ae9c978d47d1419
2019-10-24 23:43:32 +00:00
drh
4485ac1a25
The previous fix was incomplete. It is also necessary to disable the
...
Expr.y.pTab field when making the translation.
FossilOrigin-Name: b99d5701312f7472e6b606bd824f9273617e2655920485bf50aa96d408064721
2019-10-24 21:02:06 +00:00
dan
ef2df8f343
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
2019-10-24 20:35:27 +00:00
drh
c7476735c9
Fix handling of covering indexes that use virtual columns.
...
FossilOrigin-Name: e0f7e321eca91c49102649f70728de69347cbd7b16599b854203c24cfdc348e6
2019-10-24 20:29:25 +00:00
drh
06baba54b4
Correction to check-in [bec5b6d4d083556d] so that it detects *all*
...
triggers that might perturb the insertion cursor.
Ticket [50c09fc2cf0d91ce].
FossilOrigin-Name: 521f1d36282549488a47a434484a24924ee970d29f05a8ae499b7d536bcd692b
2019-10-24 19:35:26 +00:00
drh
035f6d909f
Do not allow ALTER TABLE ADD COLUMN for a STORED column.
...
FossilOrigin-Name: 42fc08bc1528a34a603c2c085b515766a8d33ae7ea0350a52b0ca24b94ebcbc5
2019-10-24 01:04:10 +00:00
drh
31269a9f5f
Add an experimental set of UUID processing functions as the uuid.c
...
extension in ext/misc/uuid.c.
FossilOrigin-Name: 1a6e009372cf9571e540812c8607e95a86740112a1091f03e3f632339eccb629
2019-10-23 21:00:40 +00:00
drh
269d322de2
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
2019-10-23 18:09:39 +00:00
drh
6ab61d7052
Minor adjustments for clarity and test coverage.
...
FossilOrigin-Name: 30065716878d4058e75eb510b0b27b68e5193d04625eb173210de8061f20f499
2019-10-23 15:47:33 +00:00
drh
ab0992f022
Fix incorrect arguments to testcase() macros.
...
FossilOrigin-Name: 812467fbf04ce00228a8381a5eee471e4e35cc63184a4538129fcd70b7cec979
2019-10-23 03:53:10 +00:00
drh
a1a01ffb5e
Fix the foreign key logic to be compatible with generated columns.
...
FossilOrigin-Name: 3de57145a18c62ff9b556c7218d8b276000d0052e4890212fa9335235f22d03c
2019-10-23 00:31:01 +00:00
drh
e70fa7feba
Take the declared column time into account when computing the values for
...
generated columns, and apply appropriate affinity.
FossilOrigin-Name: 9e04ba22dfce3998e61331ac229ff543ecccc590284c9dd5def21efbe594fba0
2019-10-22 21:01:34 +00:00
drh
7b8ab230dc
Merge the row-value fix from trunk.
...
FossilOrigin-Name: 1fbd7438611174aa594485241c8cc2f4ea6d09c57ef2fc16c8995e8061fdfdd6
2019-10-22 20:16:04 +00:00
drh
db36e255d5
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
2019-10-22 19:51:29 +00:00
drh
f4b1d8dc17
Do not allow generated columns in the PRIMARY KEY.
...
FossilOrigin-Name: 1a54743a3d327efc8ecc45b9fde91ddfea3fca36408f9b753453c31f2e4cc69c
2019-10-22 15:45:03 +00:00
drh
7e7fd73b25
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
2019-10-22 13:59:23 +00:00
drh
427b96aedf
New testcase() macros. Fix a problem with INSERT when the IPK is to the
...
right of generated columns.
FossilOrigin-Name: 412799fc5527aaca987e4e04b8a4f774dcdb70fb80e3a126dc3a26d48a66935c
2019-10-22 13:01:24 +00:00
drh
6b910364bb
Merge changes on trunk into the generated-columns branch.
...
FossilOrigin-Name: ba123b8c201053d8f9387de38f3513b06f7721b28d79fab8489f96d336105117
2019-10-22 12:02:09 +00:00
drh
98c94e60d0
Previous check-in to fix [b47e3627ecaadbde] was incomplete. This check-in
...
completes the fix and adds a test cases.
FossilOrigin-Name: c7da1c01f1f239e68c2173ac5748b8c5798271e43bdcee68f51f97cd0ca92bd5
2019-10-22 11:29:22 +00:00
drh
a5d0911546
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
2019-10-22 01:00:16 +00:00
drh
898c527eaf
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
2019-10-22 00:03:41 +00:00
drh
2c3de90da1
Add a VdbeCoverage() macro that was omitted from check-in [eea1e7aa57e74c43].
...
FossilOrigin-Name: cd2317d04c1c4bcf5fe63aa02a6051bdfae8f5566a098e3f45bf9ec1dd0c3ea6
2019-10-21 23:41:56 +00:00
drh
276d7f7847
Try to fix a harmless compiler warning reported by ICC.
...
FossilOrigin-Name: 7f41b44ca2ecb907ea0fd09a974ac9dbdf911463a94f0f77c826cf1b1d9c3e8c
2019-10-21 16:15:57 +00:00
drh
f5f1915d59
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
2019-10-21 01:04:11 +00:00
dan
52612bec3c
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
2019-10-20 08:26:08 +00:00
drh
dd6cc9b52a
Work toward getting generated columns to work with triggers. Still more
...
work to do in this area.
FossilOrigin-Name: 932a37275d7e932f8237d32c8fc6087ed8cd342fe01ef2f7a43c7237ab84c9ac
2019-10-19 18:47:27 +00:00
drh
c5f808d85e
Add testcase macros.
...
FossilOrigin-Name: fb9c9bb284d441bd7aa34c87b6fd8ce57d036c17623d82354154fc6286bdd134
2019-10-19 15:01:52 +00:00
drh
b9bcf7ca60
Refactor names of column index transformation functions, for clarity.
...
Get generated columns working with ALTER TABLE RENAME COLUMN.
FossilOrigin-Name: 27ab41c9102e7801ff829488fc123a8040da008bef373d6704efbe2f93e1da90
2019-10-19 13:29:10 +00:00
drh
f95909c764
Fixes for WITHOUT ROWID tables with VIRTUAL columns and an INTEGER PRIMARY KEY.
...
FossilOrigin-Name: 86074da0fd2949e231898ef0bc672d90fd89cefa49fb0eb50ff398fbdd91d1ad
2019-10-18 18:33:25 +00:00
drh
4102deb962
Merge trunk enhancements into the generated-columns branch.
...
FossilOrigin-Name: 85bc4524d76999080faa4474e8880d2b6a2ac3a7f6a76239af4de1a42f8138c8
2019-10-18 17:47:47 +00:00
drh
8e10d74b21
Get generated columns working for WITHOUT ROWID tables.
...
FossilOrigin-Name: 9f409649ec4282a47f0a8b079b419f1922e0c24779b297f477ced168d5b7910d
2019-10-18 17:42:47 +00:00