dan
0525b6f47f
Add further tests for new window function functionality.
...
FossilOrigin-Name: 1fbddf01b1c3fff95b05e2f2f709754e2b514296060b4846518791e7161d9ddb
2019-03-18 21:19:40 +00:00
dan
108e6b2c87
Always evaluate window functions using the alternative path usually only used by EXCLUDE frames if the SQLITE_QueryFlattener test flag is set.
...
FossilOrigin-Name: 2879a691aca9304aea5acb46bab8e82bb2e08eb54201f3679d60bfc0e8383845
2019-03-18 18:55:35 +00:00
dan
bdabe742da
Fixes for RANGE windows and NULL values.
...
FossilOrigin-Name: 723c84be3ec5ae941b7abd2442cdb76ca3bd76a5ce2d830b0e648c6e1424885a
2019-03-18 16:51:24 +00:00
dan
1e7cb19be3
Fix problems with RANGE windows and string, blob and NULL values.
...
FossilOrigin-Name: cebe09e11cc91d9776f259dd9b87e9c760a460f53ba6fa36481dfe58f77ad417
2019-03-16 20:29:54 +00:00
dan
c782a81aa5
Implement the EXCLUDE clause for window frames.
...
FossilOrigin-Name: 9b43c3ee2e054b05715573f4f3893b84aabc5100832333c9a0f2a1628552a978
2019-03-15 20:46:19 +00:00
dan
a0f6b83300
Add things to this branch that will be required to support the EXCLUDE clause.
...
FossilOrigin-Name: 7d66cd2013206ebad50c7cdb7dab9211fa8b47f5cb7067dcb314b3e0180875f8
2019-03-14 16:36:20 +00:00
dan
db7d895e9d
Merge latest trunk changes into this branch.
...
FossilOrigin-Name: 0b904517bd6c4c59082381577246d3d2351b4265fc9151438ee4c33cf16f2eb1
2019-03-13 17:31:20 +00:00
drh
b65e801e5f
New test cases added to test/fuzzdata8.db
...
FossilOrigin-Name: 049e9926202317f58c54b6351ff120fb69bf821f409909b1a1c5e335c0396707
2019-03-13 13:19:05 +00:00
dan
fcb02429ec
When deserializing a database (sqlite3_deserialize()), do not attempt to parse the schema before the data is loaded.
...
FossilOrigin-Name: 4e1b005e8b397a22161a6b89cbd3f17bda70a6e0a86d8abdc61856edf2a74da4
2019-03-13 11:40:30 +00:00
dan
bb40727857
Allow real values to be used in PRECEDING and FOLLOWING expressions for RANGE window frames.
...
FossilOrigin-Name: 25ff7091cb12c63b1864ce68a9151f8432af5804b5ae905a2175761ab4b9fdd8
2019-03-12 18:28:51 +00:00
dan
9e24439c2f
Fix a crash that could occur if the RHS of an IN expression is a correlated sub-query that refers to the outer query from within a window frame definition only.
...
FossilOrigin-Name: 0524aaaf45681437c2dca3d31ff26a65bee7bd2074730277c29136635ee0be0f
2019-03-12 09:49:10 +00:00
dan
71fddaf195
Fix problems with "RANGE ... ORDER BY <expr> DESC" window frames.
...
FossilOrigin-Name: e7bced731aa071c95bc398cdecd53c939841bf0c52fbcd06e47ba68f8c5cc35a
2019-03-11 11:12:34 +00:00
dan
72b9fdcf20
Add support for RANGE window frames. Some cases still do not work.
...
FossilOrigin-Name: ffc32b246d92d53c66094afe11950b53ffab6a1c230c602eebbfedafb2eb57f4
2019-03-09 20:49:17 +00:00
dan
f7b846e4ed
Merge latest trunk changes into this branch.
...
FossilOrigin-Name: 53ea550ce759ae4683bcf0ae3af655bfe04f85db70f74edee6bcab56d83bb041
2019-03-09 07:38:16 +00:00
dan
0d86a9bd54
Add simple tests for GROUPS window frames.
...
FossilOrigin-Name: 2872702dacadad11f4fd7c437b77ef82763e840c9c92eefe87eac2491c38f963
2019-03-08 20:57:05 +00:00
dan
6c75b39614
Finish consolidation of window frame code. Add untested support for GROUPS frames.
...
FossilOrigin-Name: 954bf369935083c188c3b14e77ed89fc5ec4323cc5b0c67e4a2e48fcc278df45
2019-03-08 20:02:52 +00:00
drh
bcf1f41a62
Add new test cases in test/fuzzdata8.db
...
FossilOrigin-Name: 97bdc090f30610cc5dd29101452d1647550387f9c6f742e50f1e07c3cf68a147
2019-03-08 14:07:15 +00:00
dan
66b8457c7c
Fix another segfault in fts3 that could occur with corrupt records.
...
FossilOrigin-Name: fcc24edde471c2214add2dbc3a27da8890a7148105c5ffa024faf72457964a5f
2019-03-08 13:27:27 +00:00
dan
b33487b0b6
Improvements to the way built-in window functions are handled.
...
FossilOrigin-Name: e8eee566dfca6f4c8af074731dfe91f7fbcd9ca72f0303235b52e4e2e80d5b71
2019-03-06 17:12:32 +00:00
drh
39c5c4ae06
Add the sqlite3_stmt_isexplain() interface.
...
FossilOrigin-Name: ee642d3e2775ba4c73627ac71d0abf7a0f7a4ab3151d88e0076e9992f4814983
2019-03-06 14:53:27 +00:00
drh
aff0fd483c
Add an "|| CORRUPT_DB" term to an assert() that might be false if the database
...
is corrupt. Also add a branch to have sqlite3PagerMovepage() return
SQLITE_CORRUPT in that case.
FossilOrigin-Name: b0d5cf40bba34e459caa7480bc84a1d75496c2ab52029f4bb0a31f2d9369a8ee
2019-03-06 14:08:41 +00:00
drh
7bf3133fef
New dbfuzz2 test cases added to test/fuzzdata7.db
...
FossilOrigin-Name: 25975e1fb2be0c011542c0a6b001385cec8113662df93dc618f725f2a4692bc2
2019-03-05 14:47:53 +00:00
dan
4e72e62f3b
Merge trunk changes into this branch.
...
FossilOrigin-Name: 9b4d561f68febdab6624d8c567fb4357bf67dda500664cf708d16a76f37b8ec1
2019-03-04 21:08:53 +00:00
dan
680f6e8e2e
Support some "ROWS BETWEEN N PRECEDING AND M FOLLOWING" window functions without caching entire partitions.
...
FossilOrigin-Name: e7a91f12282afb5d5d7d78397a11d18e0268ee0c931d85e21fce00d13929494e
2019-03-04 21:07:11 +00:00
drh
f10c535fa5
The fts3_tokenizer() function returns NULL if the
...
SQLITE_DBCONFIG_ENABLE_FTS_TOKENIZER setting is disabled, which is is
by default.
FossilOrigin-Name: f5732f4caf7a37a6445c61ae0d0ac14cc9deb897376e73aa36a1ead025b92c69
2019-03-01 21:33:29 +00:00
drh
c06ede105d
Add the new "bind_fallback" method to the "sqlite3" object in the TCL
...
interface.
FossilOrigin-Name: c7f70b6d96338dba201e005104e7f7148c1a8cd767ab05e35b44617c4c797bc5
2019-02-28 17:29:19 +00:00
drh
4ddf7f4211
New test case loaded into test/fuzzdata8.db.
...
FossilOrigin-Name: 00ae0c6c4815366bd2f36bc054b13bc7b568dd0a3caceddf0eba4db33f010ee4
2019-02-28 14:09:14 +00:00
dan
95fdb63b7f
Avoid an assert() failure and an undefined left-shift operation in the fts3 snippet() function that could occur if the database was corrupt.
...
FossilOrigin-Name: d5250db6322103326f0d5782ba049996d9ce8784f9e53a3112fb6f09f888f1c3
2019-02-28 13:41:35 +00:00
drh
45616c7f75
Add an "|| CORRUPT_DB" term to an assert() statement in the btree defragmenter.
...
FossilOrigin-Name: 6bfd8655f006e031c0d4c988356c4b9206efa6bfdb034fde8ffa3361521a4844
2019-02-28 13:21:36 +00:00
drh
8e0f794d17
Enable the LIKE optimization when the ESCAPE keyword is present and the
...
PRAGMA case_sensitive_like pragma is ON.
FossilOrigin-Name: 6ae4b8c525f446ddb0e0bdd5e4e01e06e2ab975e3effa42fce6a1102b3a39830
2019-02-27 23:05:14 +00:00
dan
89d249364e
Add the "-returntype" option to the "db function" Tcl method.
...
FossilOrigin-Name: 789a492b68c353e2b763d67d399722b7ab61bfe09b472466df2821f65cab1be9
2019-02-27 16:38:19 +00:00
dan
69e224f88a
Reformat the white-space in a few test cases so that the tests work with Tcl 8.6.9.
...
FossilOrigin-Name: 29d02bf2fa9ecacbcc3e862ca70382f5875da8c1dc7fd27366190045fcc42b15
2019-02-26 19:16:49 +00:00
drh
ddc28c23d5
Minor change to dbfuzz2 that allows it to be compiled against older versions
...
of SQLite.
FossilOrigin-Name: 6d39d6a68bf09e0b4f6706218373e74fc03148fd8bdba5031c3de2f750d87cf2
2019-02-26 18:21:08 +00:00
drh
bfa70de117
New test cases added to test/fuzzdata8.db.
...
FossilOrigin-Name: 61fdfc57b9539cb6da5fc24653da2c8fb7c041a7409df911df11b987ed479a3a
2019-02-26 17:52:44 +00:00
dan
f2e5c98613
Fix a couple of assert() statements in fts3 that can be false if the database is corrupt.
...
FossilOrigin-Name: 84162af521f29df8a186163fbdef9856e1aa8aba78e74d7df0ba2cc83bb86240
2019-02-23 20:48:41 +00:00
drh
bc0a55cf0b
Check-in [fa792714ae62fa980] is not a valid fix for ticket
...
[df46dfb631f75694], as the new test case in this check-in demonstrates.
The fix here causes test cases for the [df46dfb631f75694] bug to fail
again, so this check-in is on a branch. A new fix is needed for
[df46dfb631f75694].
FossilOrigin-Name: 0d456456da6e25b20d9d27ca95f1013082bca52ee74ee9bf91732a9fa843ea45
2019-02-22 21:33:56 +00:00
dan
f030b37682
Internally, remove all references to a Window object that belongs to an expression in an ORDER BY clause if that expression is converted to an alias of a result-set expression. Fix for [4feb3159c6].
...
FossilOrigin-Name: 579b66eaa0816561c6e47ea116b46f229188f0fc84c1173bfe0d21df2dff9a9a
2019-02-22 19:24:16 +00:00
drh
480c572f2d
In sqlite3NestedParse() be sure to detect all SQLITE_NOMEM and SQLITE_TOOBIG
...
errors and to distinguish between them.
FossilOrigin-Name: 73056b314bd63288c662752e9bd469b70264c38031c1c857460e64fdb1ed4e2e
2019-02-22 16:18:12 +00:00
drh
255a81f10a
Modify sqlite3_str_finish() and sqlite3VMPrintf() so that they always
...
return NULL on any OOM or SQLITE_LIMIT_LENGTH error.
FossilOrigin-Name: e7144ffd21294d7aebbfa6aa5a262797a6d16de11193f1bf6b75f5f27b04c940
2019-02-22 15:42:10 +00:00
drh
7e85e9033f
Disable unix-specific features of dbfuzz2 when compiling on windows.
...
FossilOrigin-Name: af84774d1eebcfe6a61b564b4edf280ad3c3a93f39b7f70b6fcc56f7bbdfb9eb
2019-02-20 19:06:16 +00:00
drh
042666e4fa
When an IN operator drives a query loop, mark it as "CODED" so that it
...
will not be used afterwards for a (pointless) membership test. This is
a better fix for ticket [df46dfb631f75694] than the previous fix that is
now on a branch as it preserves the full optimization of
check-in [e130319317e76119].
FossilOrigin-Name: fa792714ae62fa980f1767acc6d622a6727ceb677870243c88548423795dcb5b
2019-02-20 12:52:47 +00:00
drh
12fe9a0d25
Fix an assert() that might not be true if the database file is corrupt.
...
FossilOrigin-Name: f2d400db4dbfb05e2540178ed3662f97f8c57a95f8129886c7081c35e53adf0d
2019-02-19 16:42:54 +00:00
drh
b43ac0021f
Fix an assert() that might not be true if the %_segdir table of FTS3 contains
...
corrupt entries.
FossilOrigin-Name: a6509ca3dc2602c7d0376230ee63c1bb4c4066f007e77e9ac20d8eee966e5e13
2019-02-18 12:16:03 +00:00
dan
e7c9ca41b2
Add support for chaining of WINDOW definitions.
...
FossilOrigin-Name: c155125fd5dddb438c09d40f5137c47d88defb7a6ede4261f09d7bdaad250d37
2019-02-16 17:27:51 +00:00
drh
9c7e44cddd
Improved oversized cell detection when updating ptrmap pages in
...
balance_nonroot().
FossilOrigin-Name: aa61435a4c3800f023788081c1342ad6a05a41449a424fa6c039d5ca46072256
2019-02-14 15:27:12 +00:00
drh
62e009f3d8
New test cases in test/fuzzdata8.db.
...
FossilOrigin-Name: ab2356f580384e4b40d128fc04fd6bc4dfcf50109df77d05d59adcc20f339066
2019-02-12 01:28:24 +00:00
drh
3e7800a9db
Defer computing the number of bytes of free space on a btree page until that
...
value is actually needed.
FossilOrigin-Name: 177f5f40eabfcfd229ac7f291dfed9e9ee35762e86923a0f356915f389da177d
2019-02-12 01:04:49 +00:00
drh
6813350966
Fix test cases. Avoid unnecessary tests for MemPage.nFree less than zero.
...
FossilOrigin-Name: 480a5090befdc29eaeb6f0b22831c980d6ee92438d9b2e766de68b037ded38b8
2019-02-11 17:22:30 +00:00
dan
8cd2e4ae03
Build and test fixes for SQLITE_OMIT_WINDOWFUNC builds.
...
FossilOrigin-Name: 8824115a9776e876a3677f0cb479e311ee65584d43872b37766a146afec72d8f
2019-02-11 11:34:01 +00:00
dan
2fa619a3a8
Change a few assert() statements in fts3 that might fail if the database is corrupt.
...
FossilOrigin-Name: db74a56af73d92b7a9d43ceda7e4540915c580c68a0266b4ddefb9e0d5cbcbeb
2019-02-09 19:23:54 +00:00