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
a2417ec75c
New dbsqlfuzz cases added to test/fuzzdata8.db.
...
FossilOrigin-Name: d1fbf63330830c4b9549d0e67f6cdc19fe7a9dc3fcf509795fd1175499fddc82
2022-01-24 20:20:35 +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
larrybr
b5d4473221
Fix testcase for CLI .read recursion.
...
FossilOrigin-Name: 53d4404458fb6f0b6b2b69c2225d66b39f09099c356ba3c3e990474f14aba31a
2022-01-24 14:01:31 +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
bcba3655ee
Add support for the sqlite3_vtab_distinct() interface. Virtual table
...
implementations can use this API to determine more detail about the ordering
requirements needed by the query plan and perhaps reduce the amount of
work required to compute a correct answer. This is an optimization
opportunity for the virtual table implementation. The correct answer should
still be obtained (though perhaps more slowly) even if sqlite3_vtab_distinct()
is ignored.
FossilOrigin-Name: e4caf1e3932b1bd0dea072df7fc9458aed98c84ea397b6948b89292603949c41
2022-01-22 22:28:32 +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
4d7f335e8b
Update evidence marks for the latest changes to the documentation.
...
FossilOrigin-Name: 19247e919fab9748cae561cb12c4c3c106064390a37e32e724d9a9066cfaff8e
2022-01-21 19:26:18 +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
d323a3a515
Add the sqlite3_vtab_rhs_value() interface, allowing the xBestIndex method
...
of a virtual table to access known values on the right-hand side of
constraint expressions.
FossilOrigin-Name: e19a0b132a641f0e9f3d72586af538b95b4db8665b1555f84bc0a291bf1a4056
2022-01-21 01:00:53 +00:00
drh
991d1085e3
Add requirements marks and tuning.
...
FossilOrigin-Name: ac951490fd7d5864fe422a80ee8557478e823e79461bec2ee538f57b6733eb5a
2022-01-21 00:38:49 +00:00
drh
bd3a247c73
Test cases for sqlite3_vtab_rhs_value() based on the qpvtab extension.
...
FossilOrigin-Name: 577d3d66558368c34acab8a9e552957cf3fa054c348f1383a9121de6e8b281b7
2022-01-20 19:00:48 +00:00
drh
fdb6f44fac
Enhancements to the qpvtab virtual table to make it more useful for testing
...
and verification of virtual table interfaces.
FossilOrigin-Name: 850efc4cf3d136fba9173c380e9417b43bb93c050f7eeb85d07fd39a4b1cc6aa
2022-01-20 18:27:54 +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
29a7bbffba
Fix a test result for alterauth2.test due to the recent fix to authorizer
...
calls for ALTER TABLE DROP COLUMN.
FossilOrigin-Name: e799a35f2bf85ce43b476738bfbd9b6b378bbf02fa0708dda0deba71dd37f608
2022-01-19 18:31:43 +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
7d44b22d45
Fix test cases so that they all still work even with -DSQLITE_DQS=0.
...
FossilOrigin-Name: 4883776669ee2f2310ea82b0d6df4d008eebaa7cb252102539cf21a635402ebb
2022-01-16 19:11:13 +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
ddbb3cb5ec
Remove code from lemon.c that was made superfluous by
...
[1b22b42e59793af1|check-in 1b22b42e59793af1] in late 2017.
FossilOrigin-Name: 6d2f95a474a0c196f36317d88557bfb449ce125c1d012fc1844378c450697a05
2022-01-14 23:28:11 +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
bbf647e64f
Merge the JSON interface into the core. Add -> and ->> operators for JSON
...
that are compatible with by MySQL and PG.
FossilOrigin-Name: 4cbb3e3efeb40cc41df15e96c7a0c9d6a8c12ca9f2c139ff1b31ea5416735d34
2022-01-11 23: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
875912c246
Fix typo in the json-enhancements.md document.
...
FossilOrigin-Name: feba24ef774d80ebbaf87a93fc106cb7e482edcc3f237edd4c9d4e918ffb3131
2022-01-10 17:43:54 +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
d3c6c3459b
New proposal for -> and ->> operators.
...
FossilOrigin-Name: 1108e12a2244edc6247050a0e9ad25b912bba6c57c71c51c2bc55167a6955175
2022-01-10 13:55:08 +00:00
drh
18ccc5c5ab
Typo fix in doc/json-enhancements.md.
...
FossilOrigin-Name: c3b01d496479b3250a8895c245f79ab43ac469148d163593fea00894db195a37
2022-01-09 20:51:59 +00:00