Commit Graph

21016 Commits

Author SHA1 Message Date
dan
7971b7fe92 More minor test file fixes.
FossilOrigin-Name: 352878fe1cbcf7b6803624544bba5a95565d1638d4dd09e91764ddad17889301
2019-09-26 20:57:53 +00:00
drh
91f34eab2d Allow DROP TABLE to work on tables name "sqlite_parameters" just as it
does with tables named "sqlite_stat%".  Fix for the ".parameter clear"
command in the shell.

FossilOrigin-Name: e768179baacb2423205a774cc8149fe58ed86a9320102aff4844b1d8933aa1db
2019-09-26 20:05:16 +00:00
dan
9d30c8ff8f Minor fix for test file indexexpr1.test.
FossilOrigin-Name: 0ceab26f15c4c7039647cbccf8939dd5c36a60b70ffeefcd3b415c8d4d8351cd
2019-09-26 19:53:26 +00:00
drh
ec39707fe6 New dbsqlfuzz cases added to test/fuzzdata8.db.
FossilOrigin-Name: 49073b7003330027303c4c776e9f85112f8b99b89f848fec3f953eba501d7505
2019-09-26 16:57:42 +00:00
drh
d79cd92b23 Test for an OOM condition in resolveAlias().
FossilOrigin-Name: 322eca7f6ad2234059669015aabb773a790e8bc3da95431c9c851ff5342c969b
2019-09-26 16:08:35 +00:00
dan
a51ddb1ed7 Fix a window-functions problem that could occur if an ORDER BY clause contains an alias for a window-function that is not a top-level expression.
FossilOrigin-Name: 1cc6cf6407c6e25aeafeca379a93d0ad2614839c07fb3644e46926fce5f1cfab
2019-09-26 15:53:37 +00:00
drh
b19131a8c6 Add a missing VdbeCoverage() macro.
FossilOrigin-Name: 36d35dbd5a80dc4a149ed7409cc4b43712622fc4c6a8915b4fbb62fd1d6b7763
2019-09-25 18:44:49 +00:00
drh
2829df082c Remove an unused variable.
FossilOrigin-Name: a19884455b9bafcdc769362d61cfd02df1b5643263e004cb533698bbcfca752b
2019-09-25 17:47:41 +00:00
dan
e7579a53fb Further simplifications to window-function code.
FossilOrigin-Name: 5fe15c1d8383989257e11d1806e6b035acacd1b504ae385ba58d20db10f26eee
2019-09-25 16:41:44 +00:00
drh
edf8a7bf57 In the previous check-in, the variable should be openMode, not openFlags.
FossilOrigin-Name: 77b0db22d6c7a031f332bfcf1c8fcd94e464de9f2396f0327ee761a30ebc8b60
2019-09-25 11:49:36 +00:00
drh
1116b1785c In the unix VFS layer, do not attempt to chown() the journal to be the same
as the database if running in 8+3 filename mode.  Also, update the comments
on the chown() attempt to be more precise.

FossilOrigin-Name: ab853724a7e01ca32167d294c3c80d6632e805bdf39b6d56db82226a00ad72dc
2019-09-25 10:36:31 +00:00
drh
c5b35ae567 Simplifications to the window-function code.
FossilOrigin-Name: 489a1eb3aa2f1225b97b50a5f8688cf1a4ab0371973da1badc29616d70386c03
2019-09-25 02:07:50 +00:00
dan
37d296a717 Bug fixes for window frames of the form (... RANGE BETWEEN b PRECEDING AND a PRECEDING) or (... RANGE a FOLLOWING AND b FOLLOWING) where (a > b).
FossilOrigin-Name: 040e196a8be3ca41b9365310ab88c2a3cc84b918a6511c77a6d95d4b4e0da3ed
2019-09-24 20:20:05 +00:00
drh
5776ee5cf5 Omit the sqlite3IntTokens array constant for a code simplification.
FossilOrigin-Name: f907395ef5a2dc1d084b6a286af00de4c742cf12d4f347c21e1b757786508f57
2019-09-23 12:38:10 +00:00
drh
7ca1347f59 When a scalar subquery has a pre-existing "LIMIT X" then change it to
"LIMIT X<>0" rather than just "LIMIT 1" so that if X is 0 the limit
will still be zero.  Ticket [99cd4807dc03f178]

FossilOrigin-Name: 82e5dcf5c1d500ed82f398b38fdae0f30033804e897fbab3c10f1e15e2abedef
2019-09-23 11:55:22 +00:00
drh
b7fc7c8556 Fix a harmless unused variable warning in the test logic.
FossilOrigin-Name: d7673a445f4cde8f71153ce81efdc34fbed8b8625714d54afae1a83d548671ff
2019-09-21 18:49:12 +00:00
drh
e39f388eb1 Fix harmless compiler warnings.
FossilOrigin-Name: 8ea1dc727d391b15d0c4fa858ff68d5b8a63dde46408f24027dac8d28f044cbd
2019-09-21 17:31:03 +00:00
dan
8c9bcb2328 Allow SQLite to omit redundant ORDER BY sorts in the case where a SELECT statement has GROUP BY and ORDER BY clauses that use the same expressions, even when the ORDER BY expressions are marked "DESC".
FossilOrigin-Name: 20f7951bb238ddc0b8932a55145df426b6fdf7b8631e069345902c853c90f191
2019-09-21 15:44:12 +00:00
drh
e47d5ca737 Add --multithread, --serialized, and --singlethread options to the
speed-check.sh test script.

FossilOrigin-Name: c17078af6046ba3cb0d7819c915a800c851d7368e13d149140db2a124df32bab
2019-09-21 13:34:59 +00:00
dan
af9b58b335 Simplify the fix in the previous commit.
FossilOrigin-Name: 5ef64b0f55d952c7b0016055eaf6bbc1b5b7afc09a62ee8e5e694ffa9863ac7c
2019-09-20 21:12:40 +00:00
dan
ed09dddece Fix a problem with queries containing a min() or max() function for which the FILTER clause excludes all rows.
FossilOrigin-Name: b1d7e104e034655fe41bc55c562d91e8074a2973d538b8b29301458db45afc57
2019-09-20 20:52:16 +00:00
dan
14e3e22773 Fix an assert() in fts3 that could fail when accessing a corrupt database.
FossilOrigin-Name: 601ce9532d34f97a5faa170b6d8a272e5c54f2eabff84660201a1840e0fd9929
2019-09-19 13:51:52 +00:00
drh
6d2566dfc2 Always clear the temporary register cache after coding a subroutine.
FossilOrigin-Name: b6f2a7f9cdb547c925f08306df82519e41a7a0dd2cabd9861a48917bb6eef845
2019-09-18 20:34:54 +00:00
dan
572b0dddee Add extra tests for the handling of corrupt records in fts3.
FossilOrigin-Name: 40e29a47d1266c16a4992e43579a51addcc632503099c4cd128f77dd4e67da3c
2019-09-18 17:22:00 +00:00
drh
aa16c603ab Fix another potential "jump depends on uninitialized value" warning.
FossilOrigin-Name: 633b214e9b9d99788ed72ab4823a69a43c7c40ed07fb76c7d56c50453c0e58ab
2019-09-18 12:49:34 +00:00
dan
4b48c72721 Fix a "jump depends on unititialized value" valgrind error in fts5 triggered by corrupt database records.
FossilOrigin-Name: 6b6751cd90601a1e2744a7d233c973291ecb783801b9327c3b99734dd22bcd27
2019-09-18 11:46:34 +00:00
drh
9d70284022 Fix an OOB read in the INSTR() function introduced yesterday by check-in
[3fb40f518086c1e8] and detected by OSSFuzz.  The test case is in TH3.

FossilOrigin-Name: d49047c1b59bbfd05204af9973cdb0fab51b4d2661b550aec10d917fff94dc9b
2019-09-18 11:16:46 +00:00
drh
ec722c1088 Do not change the OP_String8 opcode into OP_String until *after* any necessary
encoding conversions are accomplished.  Otherwise, a rerun of the prepared
statement after an OOM can result in errors.  Test case in TH3.

FossilOrigin-Name: 8efd62594eae725decb719aa7777c020f982b7cdc2c92bab3b91bf349a5bc298
2019-09-17 21:28:54 +00:00
drh
e691dcb506 Test cases for ticket [587791f92620090e]
FossilOrigin-Name: ca0e3a83a1c015b346a791e6de03904d17a769c52dad0e3d71316c6e2e3f43c7
2019-09-17 13:30:30 +00:00
drh
97b0250599 Fix the instr() SQL function so that it makes a copy of its argument
before changing the datatype, since the datatype affects processing.
Also fix the sqlite3_value_text() routine so that it always works even
for values obtained form sqlite3_value_dup().  Ticket [587791f92620090e]

FossilOrigin-Name: 3fb40f518086c1e8d11eb1f4134e965450dbedfa4277bce39ef1e969fc747d38
2019-09-17 03:16:29 +00:00
drh
70738712de Improved type information display when tracing VDBE execution.
FossilOrigin-Name: ee83d8e30d6f9ca8f1cce653ee094ff151f633f4b6a21dd814ab07e8cfb901eb
2019-09-16 20:16:17 +00:00
drh
91f473b5cc Do not attempt the LIKE optimization for non-text columns and a pattern
prefix of "-".  Ticket [0f0428096f17252a]

FossilOrigin-Name: 6fe0367f9a337b7c62886b7771f3ce0642faa13f4e4f3d9a0c848abbab514cd0
2019-09-16 18:19:41 +00:00
drh
130dbc3d96 Add recent interesting cases from dbsqlfuzz.
FossilOrigin-Name: f06ef3d75d85545dd58c6dda10f7ad04fafbb7ae8706b3821be21f86a94795f1
2019-09-16 15:15:38 +00:00
drh
2ad35d980b Documentation updates for the SQLITE_DIRECTONLY flag.
FossilOrigin-Name: 5beb6dc9bc2d3d0003e33488df9c01aaf28c41c30fd9ca35543cbe3ec5a8d9ce
2019-09-16 14:42:07 +00:00
dan
b42eb3571c Fix a problem with processing CTEs that use a WINDOW clause.
FossilOrigin-Name: ca564d4b5b19fe56842a04f31bb61352e6ae9d72a7e7634eb27ebcf5f670545a
2019-09-16 05:34:08 +00:00
dan
8cce6b8310 Add the --no-rowids option to the ".recover" command.
FossilOrigin-Name: 01d71b947a7422081d5c7d6ac2c91b9c936dc41926ab58c92f4a088a64e8c051
2019-09-14 16:44:51 +00:00
drh
d44c617ad4 Extra comments on fields of the Window object.
FossilOrigin-Name: 3dbed162518a73213bbfb137c763064518fdc2daeae3952cfab39ce0e6813d3f
2019-09-14 16:21:02 +00:00
drh
fab5b07395 Fix the windows inverse function on the JSON aggregates.
FossilOrigin-Name: f464d847af490dd3ec45565dcc4c2e6ff4ed1ebb65036f30ca0b3ce2e73080e6
2019-09-14 00:21:34 +00:00
dan
51a75aaa76 Fix a problem with using json1 window functions with an EXCLUDE clause.
FossilOrigin-Name: 4a1978814da41608a16f6953bd575c97d587a34bd80b7ac0e619d62bfdc903d2
2019-09-13 20:42:46 +00:00
drh
e087a7c35b Fix the windowB test module so that it works even if SQLite is built without
JSON support.

FossilOrigin-Name: 807975c76b36347f02aa0ce9661d608adbffe1f7e77c15f8da677e47e1187153
2019-09-13 18:59:04 +00:00
dan
cd9cb85a41 Add the SQLITE_SUBTYPE flag, which may be passed to sqlite3_create_window_function() to indicate that the window function uses sqlite3_value_subtype() to check the sub-type of its arguments.
FossilOrigin-Name: ba2ebc3a348decc5cedaf14960e30e7ae26a26824cfa198727f2499162142ef3
2019-09-13 18:27:17 +00:00
drh
477f1f12e2 Fix a typo in the carray extension header comment - the comment that serves
as the documentation to this extension.

FossilOrigin-Name: 658a42d3633b31fda260f2c5a1a2c7dd8eb4eb0114d322369017c56faf5ecd42
2019-09-13 17:30:24 +00:00
dan
01a3b6b1b2 Change the meaning of the SQLITE_SUBTYPE flag so that it indicates that the user-defined function cares about the subtypes of its arguments.
FossilOrigin-Name: af1bc20f502816db460d2b2d353f715da5cf660e59095de5214c829c1cb20981
2019-09-13 17:05:48 +00:00
dan
945a3527d5 Merge latest trunk changes with this branch.
FossilOrigin-Name: 14ef7543465dd14d8fa141fcceb1950b5c2d265a3e862323969d747b39c0cd8c
2019-09-13 16:19:53 +00:00
drh
3f3f2c7357 Ensure that the idxStr for FTS5 is always zero-terminated.
Fix for check-in [e6db945454a0dae2]

FossilOrigin-Name: 090cd07d37904da4610d6a6787a3cc825c9a8bdcc5f051267d4608bba9b49d03
2019-09-13 13:23:13 +00:00
drh
fbb9a5b1e3 Fix harmless compiler warnings.
FossilOrigin-Name: a8927d14f88c44828e794787bab080455ab62705c93f65ce7d8db83478aa5a8e
2019-09-13 12:24:58 +00:00
dan
685b2ee0c3 Allow fts5 to filter on multiple MATCH clauses in a single scan.
FossilOrigin-Name: 9d418a7a491761eeb38a70898677a493e2631e5d62e75ee88431f52d3dfd2344
2019-09-12 19:38:40 +00:00
mistachkin
acf6e08d20 Fix typo for one instance of line number handling in the Lemon tool.
FossilOrigin-Name: 980be1730dc1239c63a107923bf2e32b4ec7d4bc31b9190e711cc35f18cc2bb4
2019-09-11 15:25:26 +00:00
drh
c204d81a6c Enhance treeview to show SOFT-COLLATE for TK_COLLATE operators that omit
the EP_Collate flag.

FossilOrigin-Name: a97804620a27acc30bebd2aaa04e38f2f36de48b0931038ca8bdc9cb0c36b8f4
2019-09-10 17:51:27 +00:00
dan
fa50834914 Ensure the columns of views and sub-queries maintain their implicit collation sequences when the "push-down" optimization is applied. Fix for [18458b1a].
FossilOrigin-Name: 36997c4ade2ef3a274cd1ac52b44118fb3a05325adb650b7b338ecb43d060575
2019-09-10 15:33:52 +00:00