dan [Fri, 17 Jan 2014 11:48:24 +0000 (11:48 +0000)]
Remove some code from resolve.c that was only required for recursive cte references in sub-queries. Also a stray "finish_test" command in pagerfault.test.
dan [Wed, 15 Jan 2014 18:12:00 +0000 (18:12 +0000)]
When resolving names, consider a reference to a recursive CTE column as equivalent to a reference to the outermost name-context. This ensures that correlated sub-queries are correctly identified as such.
drh [Mon, 13 Jan 2014 20:38:35 +0000 (20:38 +0000)]
In the command-line shell, defend against a NULL-pointer dereference in the
case where sqlite3_column_name() returns NULL (as might happen following an
OOM error).
drh [Sat, 11 Jan 2014 12:52:25 +0000 (12:52 +0000)]
In LEMON, limit the size of the grammar file to 100MB. This ensures that
the program will never experience integer overflow. To be doubly sure,
use calloc() instead of malloc() when allocating arrays.
drh [Sat, 11 Jan 2014 03:27:37 +0000 (03:27 +0000)]
Add the "%token_class" directive to the LEMON parser generator. This opens up
the possibility of simplifying the parser. Also remove all calls to
sprintf(), strcpy(), and strcat() from LEMON to avoid compiler warnings
on OpenBSD. (Aside: It is this change to avoid harmless compiler warnings
that was the cause of the reason spat of bugs.)
drh [Sat, 11 Jan 2014 03:06:18 +0000 (03:06 +0000)]
In LEMON, fix a bug in the text formatter introduced by the previous
commit. Also add the new "%token_class" directive for defining symbolic
names that stand any one of a collection of tokens.
dan [Sat, 4 Jan 2014 19:58:29 +0000 (19:58 +0000)]
Add the usual "fts3" prefix to new static method setEstimatedRows() in fts3.c. This fixes a problem when compiling the amalgamation, as the r-tree module also contains a static method named setEstimatedRows.
dan [Sat, 4 Jan 2014 14:46:39 +0000 (14:46 +0000)]
Have FTS assign extremely high costs to plans that feature unusable MATCH constraints. This discourages the planner from choosing such plans, which lead to "unable to use function MATCH in the requested context" errors.
dan [Sat, 4 Jan 2014 14:42:14 +0000 (14:42 +0000)]
Instead of having the planner ignore plans with unusable MATCH constraints, have FTS assign extremely high costs to such plans in order to discourage the planner from using them.
dan [Sat, 4 Jan 2014 14:16:06 +0000 (14:16 +0000)]
Have the planner detect cases where a MATCH constraint is applied to a virtual table, and ignore any plans that do not allow the virtual table implementation to implement the MATCH filtering.
drh [Wed, 1 Jan 2014 14:00:13 +0000 (14:00 +0000)]
Enhance sqlite3_randomness(N,P) such that it resets the internal PRNG
if N is less than 1. Subsequent calls to sqlite3_randomness() will reinitialize
the internal PRNG by calling the xRandomness() method of the default VFS.
drh [Sat, 21 Dec 2013 16:06:47 +0000 (16:06 +0000)]
Fix harmless compiler warnings in FTS4. This involved corrupting
Martin Porter's beautifully written and elegant stemmer code, making it
a little less beautiful and a little less elegant. Today is a sad
day. But the warnings from GCC grow increasingly verbose and irksome
with each new release and so something had to be done.
drh [Sat, 21 Dec 2013 15:46:06 +0000 (15:46 +0000)]
Fix the ".echo on" dot-command of the shell so that it echos comments in
addition to SQL statements and dot-commands. Add the --explain option
to speedtest1 so that the output can be piped into the command-line shell
to show nicely-formated VDBE code for the entire test.
drh [Fri, 20 Dec 2013 15:59:20 +0000 (15:59 +0000)]
Combine adjacent single-register OP_Copy instructions into a single
multi-register OP_Copy, where possible. Fix the Synopsis comment for
multi-register OP_Copy instructions to show the correct register ranges.
drh [Fri, 20 Dec 2013 13:11:45 +0000 (13:11 +0000)]
Simplify the accumulator reset for aggregate query processing so that it
uses a single multi-register OP_Null rather than a separate OP_Null for each
register.
drh [Thu, 19 Dec 2013 16:26:05 +0000 (16:26 +0000)]
Make sure errors encountered while initializing extensions such as FTS4
get reported out from sqlite3_open(). This fixes a bug introduced by
check-in [9d347f547e7ba9]. Also remove lots of forgotten "breakpoint"
commands left in test scripts over the years.
drh [Wed, 18 Dec 2013 18:44:43 +0000 (18:44 +0000)]
Remove an unnecessary column-cache flush operation. Add code to trace the
column cache when compiled with SQLITE_DEBUG and using
PRAGMA vdbe_addoptrace=ON.
drh [Wed, 18 Dec 2013 16:27:48 +0000 (16:27 +0000)]
Remove an unnecessary column-cache flush. Add another test case to the
speedtest1.c program to accentuate the benefit of not flushing the cache at
that point.
drh [Sat, 14 Dec 2013 13:44:22 +0000 (13:44 +0000)]
Allow the SQLITE_DETERMINISTIC flag to be ORed into the preferred text encoding
of application-defined functions, to mark the function as deterministic.
drh [Fri, 13 Dec 2013 19:35:21 +0000 (19:35 +0000)]
Create and use a new pager interface sqlite3PagerUnrefNotNull() that works
just like sqlite3PagerUnref() but guarantees that its argument is not a
NULL pointer.
drh [Wed, 11 Dec 2013 15:47:39 +0000 (15:47 +0000)]
Add the SQLITE_FCNTL_SYNC and SQLITE_FCNTL_COMMIT_PHASETWO file-controls
and have the pager call them at appropriate times. This is needed in order
to enable ZIPVFS to do multi-file atomic commits.
dan [Wed, 11 Dec 2013 11:03:19 +0000 (11:03 +0000)]
Have the crash-test infrastructure code in test6.c read and write the 512-byte block containing the pending-byte lock as normal. Earlier versions did not access this part of the file in order to avoid triggering an assert in os_unix.c. But the assert() has since been removed. And not reading/writing this part of the file causes problems for multiplexor tests.
drh [Wed, 11 Dec 2013 00:59:10 +0000 (00:59 +0000)]
Do not run the tool/vdbe-compress.tcl script that generates the
vdbeExecUnion object that reduces the size of the sqlite3VdbeExec()
stack frame unless the SQLITE_SMALL_STACK compile-time option is
specified as on of the OPTS in the makefile. The vdbeExecUnion object
gets in the way of C-compiler optimizer and results in slightly slower code.