SQLite

Timeline
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

100 check-ins occurring around 17198a1206e2fbc9.

2018-07-10
15:45
Merge latest trunk changes into this branch. (check-in: e9a3e864 user: dan tags: begin-concurrent)
07:39
Fix a harmless warning about comment formatting in the previous check-in. Simplify the ORDER BY dereferencing logic so that it avoids unreachable branches. (check-in: 0f6ec605 user: drh tags: trunk)
07:25
Assert that if two functions compare equal in every other way, then they must both have OVER clauses, or neither has an OVER clause. Use this fact to simplify expression comparison. (check-in: 52559ad5 user: drh tags: trunk)
06:47
Enhance the sqlite3ExprCompare() routine so that it knows to compare the OVER clause of window functions. (check-in: 0a7649af user: drh tags: trunk)
06:32
Enhance the TreeView mechanism so that it shows the window function data structures as part of the abstract syntax tree. (check-in: a2c0e1be user: drh tags: trunk)
05:11
New VDBE comments and coverage macros. (check-in: a9a30726 user: drh tags: trunk)
2018-07-09
22:49
Fixes for various harmless compiler warnings. (check-in: 5023b1b8 user: drh tags: trunk)
20:58
Add a comment to restriction (6) of the push-down optimization. No changes to code. (check-in: 0c8a2f25 user: drh tags: trunk)
20:41
Add an ALWAYS() around a branch in sqlite3BtreeSkipNext() that we believe must always be true. (check-in: 12be361a user: drh tags: trunk)
18:55
Avoid leaving view-definitions with an incomplete set of column names/types in the in-memory schema if an OOM strikes while allocating the same. (check-in: 1ddbb537 user: dan tags: trunk)
18:11
Add a couple of OOM tests. (check-in: 50de2a0d user: dan tags: trunk)
17:33
Remove redundant branches in window function processing. (check-in: 8fdaf3f3 user: drh tags: trunk)
16:24
Simplification to the grammar rules for window functions. Fix a memory leak that can follow an OOM while parsing a comma-separated list of window definitions. (check-in: a568f9c9 user: drh tags: trunk)
13:31
Throw an error if the second argument passed to nth_value() is not a positive integer. (check-in: 1a06e57a user: dan tags: trunk)
06:51
Fix a bad assert() in window.c. (check-in: fe8aaf0c user: dan tags: trunk)
02:37
Simplification to the logic that detects misuse of the application-defined function creation interfaces. (check-in: 8f21d778 user: drh tags: trunk)
02:02
During WITHOUT ROWID table creation, if the sqlite3CreateTable() call fails due to an authorizer denying the INSERT into the sqlite_master table, then detect this fact and abort the CREATE TABLE early, to avoid an assertion fault. (check-in: 164b1641 user: drh tags: trunk)
2018-07-08
01:02
Identify specific FuncDef objects for window functions using the pointer to the function name (FuncDef.zName) rather than the pointer to the xStep method. This allows xStep method pointer to be replaced with a single noopStepFunc() procedure, and thus save having lots of different no-op step functions. (check-in: 410e13b0 user: drh tags: trunk)
2018-07-07
20:55
Simplifications to the implementation of the sum() SQL function. (check-in: a8b13002 user: drh tags: trunk)
20:26
Fix another problem with reusing LSM cursors for range scans. (check-in: ae3fc765 user: dan tags: trunk)
20:23
Fix the JSON extension so that it can be compiled separately from the amalgamation. (check-in: 4b8cfe7b user: drh tags: trunk)
20:13
Fix an LSM problem caused by using the same cursor for equality and range scans. (check-in: f05bead3 user: dan tags: trunk)
19:47
Add ALWAYS() macros on results of sqlite3_aggregate_context() calls in xInverse() implements, since they can never fail. (check-in: fdef2a92 user: drh tags: trunk)
19:36
Add an assert() to help verify that OP_AggInverse is never called on an accumulator that has not previously been processed by OP_AggStep. (check-in: 42138891 user: drh tags: trunk)
17:38
Add missing VdbeCoverage() macro to window.c. (check-in: 63f4d306 user: dan tags: trunk)
17:30
Fix a problem with the handling of NULL values in the min() window function. (check-in: b76f35b0 user: dan tags: trunk)
2018-07-06
17:19
Try to improve the error messages for misformed frame specifications in window definitions. (check-in: 927b95a0 user: drh tags: trunk)
14:31
Also disallow non-constant expressions in "<expr> PRECEDING" or "<expr> FOLLOWING" clauses. (check-in: a6dffecc user: dan tags: trunk)
14:15
Ensure an error is returned if the user specifies an unsupported frame type. (check-in: 0f3f8fcd user: dan tags: trunk)
13:48
Prevent "UNBOUNDED FOLLOWING" from being used as the starting boundary of a window-frame. And "UNBOUNDED PRECEDING" from being used as the ending boundary. (check-in: e51fdf66 user: dan tags: trunk)
13:25
Remove some bad assert() statements from the implementations of window functions percent_rank() and cume_dist(). (check-in: 443f0c28 user: dan tags: trunk)
07:42
Return an error if DISTINCT is used with a window-function (e.g. "count(DISTINCT <expr>) OVER (...)"). (check-in: d59bcc8e user: dan tags: trunk)
2018-07-05
21:22
Use separate opcodes, OP_AggValue and OP_AggInverse, for the new callbacks associated with Window Functions, for improved readability of EXPLAIN output. (check-in: fa653805 user: drh tags: trunk)
20:33
Update the recipe for resetting a database using SQLITE_DBCONFIG_RESET_DATABASE. (check-in: c43dd23f user: dan tags: trunk)
20:05
Get the json_group_array() and json_group_object() SQL functions working as window functions. (check-in: 916cdc83 user: drh tags: trunk)
18:34
Return an error if a "RANGE" window-frame uses "<expr> PRECEDING" or "<expr> FOLLOWING". (check-in: 786c87ba user: dan tags: trunk)
18:19
Fix a problem in the xInverse method of window-function group_concat(1). (check-in: 73391283 user: dan tags: trunk)
17:35
Fix the .dump command in the command-line shell so that it does not show extraneous SELECT statements when ".echo on" is enabled. (check-in: 11763cac user: drh tags: trunk)
17:16
In wal mode, if a "BEGIN EXCLUSIVE" command (or any other command that upgrades from no transaction directly to a write transaction) hits an SQLITE_BUSY_SNAPSHOT error, change the error code to SQLITE_BUSY to indicate to the caller that the condition may be transient. (check-in: e6108047 user: dan tags: trunk)
17:03
Fix a typo inside an assert() statement introduced by the previous commit. (Closed-Leaf check-in: e3357728 user: dan tags: exp-busy-snapshot-fix)
15:46
In wal mode, if a "BEGIN EXCLUSIVE" command (or any other command that upgrades from no transaction directly to a write transaction) hits an SQLITE_BUSY_SNAPSHOT error, change the error code to SQLITE_BUSY to indicate to the caller that the condition may be transient. (check-in: 221ff63e user: dan tags: exp-busy-snapshot-fix)
2018-07-04
14:28
Experimental planner change to avoid a skip-scan if a regular index scan on the same index columns can be done instead. (Leaf check-in: 32924446 user: dan tags: exp-avoid-expensive-skipscan)
2018-07-03
20:17
Test that a race condition can cause a "BEGIN EXCLUSIVE" to return SQLITE_BUSY_SNAPSHOT in wal mode. (check-in: 5a12db75 user: dan tags: trunk)
2018-07-02
17:45
Fix a problem in the xInverse callback for the built-in sum() window function. (check-in: b6563647 user: dan tags: trunk)
17:14
Fix a segfault caused by having identical window functions in the select-list and ORDER BY clause of a SELECT statement. (check-in: 693b4350 user: dan tags: trunk)
15:03
Fix a crash caused by a LIKE pattern that consists of a single escape character. Problem found by OSSFuzz. (check-in: bb9bfc3a user: dan tags: trunk)
12:07
Fix a segfault caused by invoking a regular aggregate as a window-function. And some problems with count(*) when used as a window-function. (check-in: 4f3c8a82 user: dan tags: trunk)
2018-07-01
16:05
Quick patch to the Lemon parser template to avoid an array overread reported by OSSFuzz. A proper fix involves enhancements to the table generators in Lemon to make the overread impossible. That fix will take longer to implement. The current check-in is a stop-gap. (check-in: 3f6730be user: drh tags: trunk)
2018-06-30
20:26
Avoid a warning in fts5.c due to not using generated routine sqlite3Fts5ParserFallback(). (check-in: 65ff5144 user: dan tags: trunk)
20:15
Merge implementation of SQL window functions from the exp-window-functions into trunk. (check-in: 17198a12 user: dan tags: trunk)
20:00
Fix a minor problem in the code for determining whether or not an SQL statement is SQLITE_TOOBIG. (Closed-Leaf check-in: 763e6c9e user: dan tags: exp-window-functions)
19:12
Merge all changes from the weak-fallback branch except those related to the weak-fallback feature itself. (check-in: aad718fb user: dan tags: exp-window-functions)
18:54
Have the tokenizer handle fallback for tokens "OVER" and "FILTER" in the same way as it does for "WINDOW". (Leaf check-in: 12d819e1 user: dan tags: weak-fallback)
2018-06-29
20:43
Further performance related tweaks for sqlite3RunParser(). (check-in: 5eb47765 user: dan tags: weak-fallback)
20:21
Further tweaks to sqlite3RunParser(). (check-in: eef61ffa user: dan tags: weak-fallback)
19:54
Improve on the previous checkin. Still a bit slow. (check-in: c1fb41aa user: dan tags: weak-fallback)
17:44
Instead of using a lemon %fallback directive, have the tokenizer try to figure out whether an instance of "WINDOW" should be TK_WINDOW or TK_ID. (check-in: 022079cb user: dan tags: weak-fallback)
2018-06-28
20:05
Modifications to parse.y to better support backwards compatibility for the "window" keyword. (check-in: 7c4b879b user: dan tags: weak-fallback)
03:38
Introduce the concept of "weak fallback" in the parser. A weak fallback only occurs if a syntax error would result otherwise. (check-in: c41d7079 user: drh tags: weak-fallback)
2018-06-27
20:24
Add missing VdbeCoverage() and VdbeCoverageNeverTaken() macros to window.c. (check-in: 4383cb68 user: dan tags: exp-window-functions)
19:48
Avoid redundant ORDER BY operations when rewriting SELECT statements that contain window functions. (check-in: 336de43a user: dan tags: exp-window-functions)
2018-06-26
20:19
Merge latest trunk changes. (check-in: d9f814b4 user: dan tags: exp-window-functions)
2018-06-25
20:34
Add documentation comment for sqlite3_create_window_function(). And further tests. (check-in: 3f2705b9 user: dan tags: exp-window-functions)
11:42
Fix another problem that could cause a crash when a window function was used in a view. (check-in: e954145a user: dan tags: exp-window-functions)
2018-06-23
19:29
Fix problems with using window-functions in correlated sub-queries. (check-in: 3e23cfc8 user: dan tags: exp-window-functions)
16:26
Fix a problem with using LIMIT in window-function queries. (check-in: c1abd2dd user: dan tags: exp-window-functions)
07:59
Fix a problem with using a window-function SELECT as a FROM clause sub-query in some circumstances. (check-in: 11d73339 user: dan tags: exp-window-functions)
2018-06-22
20:51
Omit all window-function related code when building with SQLITE_OMIT_WINDOWFUNC. (check-in: 5f04b016 user: dan tags: exp-window-functions)
17:57
Merge latest trunk changes. (check-in: ebe65b23 user: dan tags: exp-window-functions)
2018-06-21
23:53
Improved context for error_log message coming from sqlite3_prepare(). (check-in: fea7ade6 user: drh tags: trunk)
23:43
Improved context for error_log message coming from sqlite3_prepare(). (Leaf check-in: 64df1189 user: drh tags: ieee754)
19:20
Fix a problem with handling single row partitions in the percent_rank() window function. (check-in: b84fbf16 user: dan tags: exp-window-functions)
2018-06-20
09:23
Add tests to improve coverage of code in window.c. Fix a problem with "SELECT row_number() OVER ()". (check-in: f41b6b73 user: dan tags: exp-window-functions)
2018-06-19
21:15
Make the ieee754() a built-in function. Add the --ieee754 option to the ".dump" command in the shell to cause it to output floating-point values as ieee754() calls, so that the floating point number will be reproduced exactly. Not sure yet that we want to go this way, but it is one option. (check-in: 7fa8f16e user: drh tags: ieee754)
19:16
The file_control_ofd_locks TCL command in testfixture distinguishes between OFD locks unavailable on the platform and OFD locks not used. (Leaf check-in: 87a9e9d7 user: drh tags: ofd-locks)
19:15
Merge latest trunk changes with this branch. (check-in: 6ad0e64b user: dan tags: exp-window-functions)
19:01
OFD locks are now mostly working, but need additional tests. (check-in: 4f1fb5c9 user: drh tags: ofd-locks)
18:11
Fix a problem caused by a sub-query containing a window function in the FROM clause of a query that itself uses a window function. (check-in: f4b1b6f8 user: dan tags: exp-window-functions)
17:19
Miscellaneous cleanup of OFD logic. Add an #if 0 to disable the use of OFD logic, temporarily, until I can get it to actually work. (check-in: d849ade3 user: drh tags: ofd-locks)
17:13
Fix a problem with using min() or max() as a window function. (check-in: 801074ce user: dan tags: exp-window-functions)
13:45
Initial attempt to get SQLite working with OFD locks on Linux. The code here does not function correctly. This is an incremental check-in for a work in progress. (check-in: 148f8dec user: drh tags: ofd-locks)
11:15
Minor change to the input grammar to make the parser tables slightly smaller. (check-in: 320fa69e user: drh tags: trunk)
2018-06-18
20:34
Fix problems with using window functions in CREATE VIEW statements. (check-in: 943bccd2 user: dan tags: exp-window-functions)
20:08
Add test case for the fix in the previous commit. (check-in: 39434262 user: dan tags: trunk)
19:09
Fix typo in the 'normalize' extension. (check-in: 0c9163ea user: mistachkin tags: trunk)
17:36
Ensure that all four callbacks are provided when registering a window function (otherwise SQLITE_MISUSE is returned). (check-in: 5720dcd8 user: dan tags: exp-window-functions)
16:55
Add new API function sqlite3_create_window_function(), for creating new aggregate window functions. (check-in: da03fb43 user: dan tags: exp-window-functions)
2018-06-15
20:46
Add extra OOM test. (check-in: ac251f72 user: dan tags: exp-window-functions)
19:01
Fix another problem in lead()/lag(). And some errors that could occur following OOM faults. (check-in: fadd4dc1 user: dan tags: exp-window-functions)
16:10
Fix a bug in the lead() and lag() window functions causing them to fail when used in queries featuring multiple window functions. (check-in: 3839fb18 user: dan tags: exp-window-functions)
2018-06-14
20:52
Fix a problem with handling of statements containing two or more different windows. (check-in: 567e09ef user: dan tags: exp-window-functions)
19:06
Fix problem with window functions min() and max() when used with a PARTITION clause and a frame starting point other than "UNBOUNDED PRECEDING". (check-in: 43eb1e75 user: dan tags: exp-window-functions)
14:30
Merge latest trunk changes into this branch. (check-in: 5cf5f180 user: dan tags: exp-window-functions)
14:27
Improve comments and code legibility in new file window.c. (check-in: bb915854 user: dan tags: exp-window-functions)
2018-06-13
20:29
Fix problems with "RANGE BETWEEN CURRENT ROW AND UNBOUNDED FOLLOWING" window frames. (check-in: c34f31db user: dan tags: exp-window-functions)
17:19
Output infinity as 1e999 in the ".dump" command of the command-line shell. (check-in: ee431d55 user: drh tags: trunk)
16:52
Pad out the sqlite3_value structure to be a multiple of 8 bytes. (check-in: f76dc33b user: drh tags: trunk)
16:08
Fix some test case numbers in expert1.test. (check-in: b90c3c16 user: dan tags: trunk)
11:41
Unless SQLITE_OMIT_AUTOINIT is defined, allow sqlite3_vfs_unregister() to be called before sqlite3_initialize(). (check-in: ab6c1ae4 user: dan tags: trunk)
11:11
Check that malloc() has not already failed when invoking the xUpdate() method of a virtual table implementation. This fixes an assert() failure in FTS5 that could occur following an OOM condition. (check-in: e9a7e4d5 user: dan tags: trunk)