drh [Tue, 12 Feb 2013 22:09:48 +0000 (22:09 +0000)]
A bug report coming from from Firefox
([https://bugzilla.mozilla.org/show_bug.cgi?id=840377])
describes an infinite recursion. We are unable to reproduce the problem.
Nevertheless, this check-in should prevent the problem from ever occurring
again.
drh [Sat, 9 Feb 2013 15:37:11 +0000 (15:37 +0000)]
Rename SQLITE_CONSTRAINT_RAISE to SQLITE_CONSTRAINT_TRIGGER. Put the
extended constraint error codes in alphabetical order. Add many test cases
for the extended constraint error codes.
drh [Fri, 8 Feb 2013 20:39:02 +0000 (20:39 +0000)]
Make sure the virtual tables that take advantage of IN operators sort the
RHS of the IN operator in the correct order according to the ORDER BY
clause.
drh [Fri, 8 Feb 2013 16:04:19 +0000 (16:04 +0000)]
Allow the "a=?1 OR a=?2" to "a IN (?1,?2)" transformation to work on virtual
tables again. This was formerly restricted because virtual tables could not
optimize IN terms. (See check-in [fad88e71cf195e].) But IN terms are now
used by virtual tables (as of check-in [3d65c70343]) so the restriction can
now be removed.
drh [Tue, 29 Jan 2013 23:55:50 +0000 (23:55 +0000)]
Fix LIMIT and OFFSET so that they work and do not leak memory even on
complex queries involving deeply nested views of UNION ALL compounds.
Ticket [db4d96798da8]. Secondary to ticket [d58ccbb3f1b7].
drh [Tue, 29 Jan 2013 19:14:31 +0000 (19:14 +0000)]
New debugging pragmas: PRAGMA vdbe_debug=ON is short-hand for the sql_trace,
vdbe_listing, and vdbe_trace pragmas. PRAGMA vdbe_debug enables tracing of
sqlite3VdbeAddOp() calls. None of this is active unless compiled with
SQLITE_DEBUG.
drh [Mon, 28 Jan 2013 19:00:20 +0000 (19:00 +0000)]
Issue an error message and quit (rather than overflowing a reference counter)
if the number of references to a table exceeds the maximum due to nested
UNION views. Fix for ticket [d58ccbb3f1].
drh [Mon, 28 Jan 2013 18:18:26 +0000 (18:18 +0000)]
Cause the command-line shell to issue an error message if you give something
that does not look like a boolean value to a dot-command that wants a boolean
argument.
drh [Fri, 25 Jan 2013 19:11:31 +0000 (19:11 +0000)]
Fix the test_spellfix.c extension so that it can be made loadable at run-time.
Add spellfix to the shell when building using the build-shell.sh script.
drh [Fri, 25 Jan 2013 18:33:43 +0000 (18:33 +0000)]
Enhance the command-line shell so that adding a non-zero numeric argument
to the ".exit" command causes an immediate exit without cleaning up. This
can be used (for example) to cause journal files to be left behind.
drh [Fri, 25 Jan 2013 15:59:55 +0000 (15:59 +0000)]
Add btree-page decoding logic to showwal.c. Commands of the form:
"showwal $FILE 123bmc" show the content of the btree page in frame
123. "b" means decode the btree. "c" means show cell content.
"m" means give a map of the btree page.
drh [Fri, 25 Jan 2013 15:31:44 +0000 (15:31 +0000)]
Further improvements to showwal.c: Reset the checksum after each frame so that
only individual checksum failures are shown. And only show failures, not
correct checksums.
drh [Thu, 17 Jan 2013 16:18:55 +0000 (16:18 +0000)]
Avoid unnecessary collating sequence and affinity restrictions on the use
of transitivity. Add test cases to show that the restrictions are not
needed.
drh [Thu, 17 Jan 2013 00:08:42 +0000 (00:08 +0000)]
Improved comments explaining the operation of the findTerm() utility routine
in where.c. Increase the maximum number of levels of transitivity from 4
to 11.
drh [Wed, 16 Jan 2013 00:46:09 +0000 (00:46 +0000)]
Improvements to query planning for joins: Avoid unnecessary calls to
"optimal scan" checks in cases where table reordering is not possible.
Make sure optimal scan checks are carried out for CROSS JOINs and LEFT
JOINs.
drh [Tue, 15 Jan 2013 18:49:07 +0000 (18:49 +0000)]
Fix a missing word in a comment. Enhance the "wheretrace" debugging output
to show the estimated cost of each table option while planning the join order.
drh [Wed, 9 Jan 2013 11:31:17 +0000 (11:31 +0000)]
Fix an over-aggressive optimization of ORDER BY on a three-way join where the
second table is UNIQUE and the ORDER BY occurs on the third table.
Ticket [598f5f7596b0557].
drh [Fri, 4 Jan 2013 20:45:13 +0000 (20:45 +0000)]
Do not use umask() since it change the umask for the entire process, not just
the thread using SQLite. Make whatever permission changes are needed using
fchmod() after the file is created, instead.
drh [Wed, 19 Dec 2012 16:25:55 +0000 (16:25 +0000)]
Additional test cases involving the use of a result column specified by its
"AS" name as a logical term of the WHERE clause.
Ticket [a7b7803e8d1e8699cd].
drh [Tue, 18 Dec 2012 19:36:11 +0000 (19:36 +0000)]
Optimize the degenerate case of a FROM clause table name enclosed all by
itself inside parentheses. Generate code as if the parentheses did not
exist, rather than the old behavior of manifesting the parenthesized table
into a transient table. Also, tag every FROM-clause SELECT subquery that is
generated by a parenthesized FROM-clause expression using the SF_NestedFrom
flag. The new SF_NestedFrom flag is not yet used for anything.
dan [Tue, 18 Dec 2012 11:59:39 +0000 (11:59 +0000)]
On atomic-write capable systems, if copying the contents of an in-memory journal to disk fails, close the (on disk) journal file before returning the error to the caller. This causes the subsequent rollback operation to use the in-memory journal. Fix for [df678d738adb].
drh [Mon, 17 Dec 2012 20:40:39 +0000 (20:40 +0000)]
Enhance the error message for "foreign key mismatch" to include the names of
the child and parent tables. Begin adding test cases for
PRAGMA foreign_key_check. Make sure PRAGMA foreign_key_check gets all
necessary table locks.