drh
ddd166a350
Remove a faulty NEVER(). Fix for dbsqlfuzz 4678cf825d27f87c9b8343720121e12cf944b71a
...
FossilOrigin-Name: d4e402458dd4cadb623a30158eb9ff5f24f011240b3b1bc5b1d6ae3c5b855892
2022-01-30 11:42:56 +00:00
drh
86c756015b
Documentation enhancements. No code changes.
...
FossilOrigin-Name: 312642d982f7861fd4db416e5eb24d863535b3ade40539a32f2dfe3f6fc45d46
2022-01-29 21:41:15 +00:00
drh
665b6b6b35
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
2022-01-28 23:44:27 +00:00
drh
f6f7888622
Add a NEVER() on an unreachable branch.
...
FossilOrigin-Name: 388926254b9da6169da7267bd4d5a1a66a26576be435c88269ab8db9eaedc079
2022-01-28 23:19:01 +00:00
drh
75863ec11c
When nesting Parse objects, make sure the new one has nErr set if there
...
has been an OOM error.
FossilOrigin-Name: ae088cbc968a565c3e0a8dd74ce150cac4a87978b593a3204f475fa196f1603c
2022-01-28 21:39:29 +00:00
drh
cee5cb484d
Include hidden columns of table valued functions that are constrained
...
by the function arguments in the colUsed bitmask.
FossilOrigin-Name: 8f8cab0d0e219f0c4bc2b8061c0013d90a2a5e598dd6cf420d302dfd1b7cbe11
2022-01-28 19:53:37 +00:00
drh
d0c7baf505
Remove a NEVER() that has become reachable now that we have the
...
sqlite3_vtab_rhs_value() interface.
FossilOrigin-Name: c4c30df7cd858315359bd9bfa90a07152d87a2301eaec865c5bc1c65e272eec8
2022-01-28 18:43:33 +00:00
drh
0ae56fbdd0
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
2022-01-28 13:18:40 +00:00
drh
8f2c0b59da
Query planner always honors the aConstraintUsage[].omit flag for the
...
SQLITE_INDEX_CONSTRAINT_OFFSET constraint.
FossilOrigin-Name: 38c5151eb8cc789ad082a1b40d16b2ddb55454219bd685b6e420995af6a15f55
2022-01-27 21:18:14 +00:00
drh
233ba1b8eb
Make LIMIT and OFFSET values available to sqlite3_vtab_rhs_value().
...
FossilOrigin-Name: b2d37c086c87fe4aee013bba4eab26f642207cd2a797fe4888a6ef868884c191
2022-01-27 18:45:26 +00:00
drh
895bab3383
Give the virtual table xBestIndex method access to (some) OFFSET and LIMIT
...
clauses.
FossilOrigin-Name: 74fa5757ee0a8499bcd6546dac1a3ecc6048ba9cff9e3e574e28e6e82e894a3d
2022-01-27 16:14:50 +00:00
drh
4b51e8bd68
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
2022-01-27 13:52:01 +00:00
drh
a5c9a70757
Minor adjustment to error handling in sqlite3FinishCoding().
...
FossilOrigin-Name: a8db69411b0d1275909adeb21027784ada17af24efe3a59ae0ae2a897659ff17
2022-01-25 00:03:25 +00:00
drh
15b01def1e
Remove an unnecessary assert() that is sometimes not true following an OOM.
...
FossilOrigin-Name: e9361d72f362b390a31f667363b01cf9d4b78aa19ed5c97f21afe9da764b89c0
2022-01-24 21:47:00 +00:00
drh
b32b30930f
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
2022-01-24 20:16:37 +00:00
drh
1da88b5ce6
Add ALWAYS() macros. Change some existing ALWAYS() into assert(). Other
...
code simplifications.
FossilOrigin-Name: 4aa27b4fcd1ffd06c38357a87ba3f5776367570439c49652f0903873def0bb23
2022-01-24 19:38:56 +00:00
drh
0c7d3d399d
Remove many redundant checks for sqlite3.mallocFailed now that any OOM should
...
cause Parse.nErr to be non-zero.
FossilOrigin-Name: 1f7fa46126ea33ed30e93186aff3df51068aeb4be6f79a102bfe8c4e44941d71
2022-01-24 16:47:12 +00:00
drh
c692df2784
Make it so that any Parse object is always linked into the database conenction
...
while it is active. Hence, an OOM will cause Parse.nErr to be set.
FossilOrigin-Name: 6a45d8fe8bfbc11a5b86d25237e1f8bccfb0f22f3dcaf004ba797aeb57b365ec
2022-01-24 15:34:55 +00:00
drh
3cdb1394b9
Make sure the sqlite3OomFault() routine sets an error in the Parse object
...
if there is a Parse object active and linked to the database connection.
FossilOrigin-Name: ad7aace761c6b21ba453eaf43c68d985be7cbd5a200fe0d2e27a0c7150f99874
2022-01-24 12:48:54 +00:00
dan
f5bc444077
Ensure that any error encountered while coding a trigger program is transfered to the main Parse structure before it is used with any other routine that might set the error code.
...
FossilOrigin-Name: 4293656578811b500786335de7cc9ac0d6ccc6fb273b9419a86968a095404c43
2022-01-24 11:25:42 +00:00
larrybr
d48e88e56d
Limit CLI input redirect nesting
...
FossilOrigin-Name: 7a073931752d16ba71f1a606091461e427ca5ccf4d135d3c5141bfdd4e67e2d5
2022-01-24 06:36:16 +00:00
drh
68dc8151e0
Bring sqlite3_vtab_distinct() up to spec so that it works as described in the
...
documentation.
FossilOrigin-Name: 4289edf3c5e32a05b51f232020099b33f6f5e79b0ceca2b96baf1186168d9af6
2022-01-22 20:45:57 +00:00
drh
9b9fc74f2e
Iimproved documentation for sqlite3_vtab_distinct(). No changes to code.
...
FossilOrigin-Name: 7af03f02940b5380ee7375672ca8d0ff68c5f741d0ea206911631f3eb5a78555
2022-01-22 19:19:35 +00:00
drh
57c58b4de8
Omit the WhereLoopBuilder.pOrderBy field, which is no longer needed.
...
FossilOrigin-Name: a13afc909c8bb643aa154b39ba8c023bae7352d3cd7cfb96be3891fa0e4bc045
2022-01-22 02:52:22 +00:00
drh
ec778d2724
An initial attempt to implement sqlite3_vtab_distinct().
...
FossilOrigin-Name: d571262d2345bb11e71bef395cf078e5d7303b974b38b4e319adda6194ccc1c5
2022-01-22 00:18:01 +00:00
drh
a1c8151bab
Fix some of the new date/time function features to comply with the spec.
...
Update requirement marks.
FossilOrigin-Name: 2f5dc7a9eed89baf6814e9e123354b262c806c853dee1243c93286c564b9aba8
2022-01-21 18:57:30 +00:00
drh
e482fde6ee
When computing a vector to be used as a key for an index lookup, do not
...
check for NULL values and abort until after all key values have been
computed, in case one of the later key values involves some initialization
that is needed by a LEFT JOIN. Fix for the problem identified by
[forum:/forumpost/ab95010d410a0a55|Forum post ab95010d410a0a55].
FossilOrigin-Name: 4db5217a28ce767fa14ddfe51cf3ca25eceb72079d46a2fc00f7d6b8ae9abe0b
2022-01-21 16:41:11 +00:00
drh
991d1085e3
Add requirements marks and tuning.
...
FossilOrigin-Name: ac951490fd7d5864fe422a80ee8557478e823e79461bec2ee538f57b6733eb5a
2022-01-21 00:38:49 +00:00
drh
82801a5b72
Initial implementation of the sqlite3_vtab_rhs_value() interface and the
...
qpvtab extension used for testing the virtual table interface.
FossilOrigin-Name: 0873c76b9b96b66fa9d13ddc8bca126d575ea3352349c7fd648f0c2f75d770f5
2022-01-20 17:10:59 +00:00
drh
f208abdd99
A better and more robust fix for the problem of reading a read-only WAL
...
mode database with existing -wal and -shm files, replacing [f426874e005e3c23].
FossilOrigin-Name: 71bfd0b57ab197405606b8096b8521d784ff174c4eecf1d9804d38342c03cc80
2022-01-20 14:40:34 +00:00
drh
98bb34c501
Fix harmless scan-build warnings.
...
FossilOrigin-Name: ab160e8bae3a4fc2067d73fe33542f261652985390fe9b0390a4f9c33a1990bf
2022-01-20 12:58:15 +00:00
drh
d6b44ec32a
Fix the ability to read read-only WAL-mode database when -shm is present,
...
([00ec95fcd02bb415|check-in 00ec95fcd02bb415]) so that it works
for the case of 64K page size.
FossilOrigin-Name: f426874e005e3c23e8a00083b7c201408e072bca413e52bfc436da6483afb0cd
2022-01-20 02:04:53 +00:00
drh
85b70e009f
Fix ALTER TABLE DROP COLUMN so that it invokes the authorizer. Fix for
...
[forum:/forumpost/fd82b85947541dec|forum post fd82b85947541dec].
FossilOrigin-Name: aca6c61d79215519fb006af19d9011029df68f195a4ce65aff7a1bf4e36efb94
2022-01-18 16:16:32 +00:00
drh
1f3366cd68
Allow an "IntReal" value to count as a REAL when checking types for
...
insertion into a generated column on a STRICT table.
[forum:/forumpost/fa012c77796d9399|Forum post fa012c77796d9399].
FossilOrigin-Name: 1ec44d55da2ced1a1b0b78b489caff628652464f5709ee827e35409eb20ea794
2022-01-17 23:37:25 +00:00
drh
14818366c7
Fix incorrect testcase() and assert() macros in json.c. They were not causing
...
problems. The assert() was simply unreachable. The testcase() added an
unreachable condition.
FossilOrigin-Name: 5623497adc8af9950fd79392000a68ba6fdca43594603eadaa7e19c8fb845a7d
2022-01-17 15:23:57 +00:00
drh
5a6f818d84
Never allow the b-tree layers view of the number of pages in the database
...
file exceed the actual number of pages in the database file, even when
PRAGMA writeable_schema=ON. This helps with earlier detection of corruption,
and prevents excess memory usage and CPU cycles in some integrity_check ops.
FossilOrigin-Name: 0407c8793700491b8519a649b9624f569b0e7e9b94d0db79d4a08139e0ecdb69
2022-01-17 14:42:38 +00:00
drh
72e30421c8
Fix ALTER TABLE so that it works even when compiled using -DSQLITE_DQS=0.
...
[forum:/forumpost/3c1a00b66fca81fe|Forum post 3c1a00b66fca81fe].
FossilOrigin-Name: 092ad64faa4ae93b1e09ccd52159621d619e6817bcb4573331e9053d97f731fd
2022-01-16 15:15:39 +00:00
drh
c4bb999962
Fix a NEVER() in the byte-code engine that can sometimes be true.
...
Test case in TH3.
FossilOrigin-Name: 7ac91b5339f820f49b0eb52055d42b6a55905444883426caf792fada63079516
2022-01-14 21:34:49 +00:00
larrybr
ce0b5e44b7
For .import schema, quote it as for other identifiers.
...
FossilOrigin-Name: bff9153ceedcc7be77f2daf5139fee29c2fab742ff1fce49877965423a7d4be3
2022-01-14 16:29:45 +00:00
larrybr
738d7b9fc0
Add --schema S option to .import
...
FossilOrigin-Name: 38d9dbca166078013a44214c88805fc7cca578976ceed9fc62f5159a38ec96a7
2022-01-13 21:22:54 +00:00
drh
8efc6a8c09
When the result of a subquery is to be stored in a register and that
...
subquery has an ORDER BY clause and an OFFSET, NULL out the destination
register before starting the ORDER BY so that the register will be set
correctly even if the OFFSET is larger than the number of output rows.
Fix for the problem reported in
[forum:/forumpost/0ec80f12d02acb3f|forum post 0ec80f12d02acb3f].
FossilOrigin-Name: 9282bcde301cee2a5c3c068b5b0b7ce992c155ece894413a6a9a51a81e4133fd
2022-01-12 20:31:14 +00:00
larrybr
04f97602e2
Make tool/mctimec.tcl effect more regular and obvious
...
FossilOrigin-Name: 02aaa10f34ab17e76feb7b6f79048309536c0794fcb534b934e06f3daedfeaba
2022-01-12 01:42:50 +00:00
drh
c5432c43e8
Fix mkctimec.tcl with the updated compile-time options for JSON.
...
FossilOrigin-Name: 8ded3f5b0025eb6cc11669c1208681e592862ce352dfff11173dff68daafad30
2022-01-12 00:52:34 +00:00
mistachkin
beacaac2b5
Fix harmless compiler warning seen with MSVC.
...
FossilOrigin-Name: adebb9d7478d092f16fb0ef7d5246ce152b166479d6f949110b5878b89ea2cec
2022-01-12 00:28:12 +00:00
drh
a6c596b194
Remove vestigial traces of json_ntype().
...
FossilOrigin-Name: 8da07c8b09ff83436a34e539e4cce8ba9524390017ca14f4af8344a12e351550
2022-01-11 22:06:25 +00:00
drh
aa97b57b11
Fix the PG-compatible -> and ->> path parsing.
...
FossilOrigin-Name: 22d5138315fb77eeea1c7e66ccc4190bcae18d058a99aa37ddd119e54b52f723
2022-01-11 18:01:17 +00:00
drh
d83c90bd63
Implement the new PG-compliant versions of the -> and ->> operators.
...
FossilOrigin-Name: 39eff3b9bf1f318d3606d8e5361a2adb2ba8bc1ca2a436ce4f9a204aa4cf20dd
2022-01-10 15:43:13 +00:00
drh
d3110034dc
Do not enclude ENABLE_JSON1 in the compile-time options.
...
FossilOrigin-Name: 8bf41bc5cb19fcde569ed2c788553a848ebd9c79065bd3d2aa99e5a6bfed9696
2022-01-09 19:44:36 +00:00
drh
cd379b8a53
Merge trunk enhancements into the json-in-core branch.
...
FossilOrigin-Name: ea755771699dcbffe0ddfd204d42fae9b6e79e107485c725b8eb6caab92aacb8
2022-01-09 19:36:39 +00:00
drh
9d44f18b3c
Add a new built-in subtype() function.
...
FossilOrigin-Name: a25f4ce255c034fc694c33728aedb98289ebccda9c48920829ef780b92b8faee
2022-01-09 16:54:02 +00:00