dan [Tue, 5 Mar 2013 15:27:34 +0000 (15:27 +0000)]
Do not attempt to set the permissions on an existing journal or wal file. Do this only immediately after creating a new file (or opening one zero bytes in size).
dan [Tue, 5 Mar 2013 15:09:25 +0000 (15:09 +0000)]
Add extended error code SQLITE_READONLY_ROLLBACK. Returned if a read-only connection cannot read the database because doing so would require it to roll back a hot-journal.
drh [Fri, 1 Mar 2013 01:07:17 +0000 (01:07 +0000)]
Always use strncmp() rather than memcmp() when comparing strings where one
or other string might be less than the length parameter, since optimized
versions of memcmp() might read past the first difference and in so doing
generate an access violation.
drh [Tue, 26 Feb 2013 12:57:42 +0000 (12:57 +0000)]
When comparing names during name resolution, make sure the names match
exactly and that one name isn't merely a prefix of the other.
Fix for ticket [7a31705a7e6c95d51].
dan [Sat, 23 Feb 2013 16:40:46 +0000 (16:40 +0000)]
If a rollback mode transaction reduces the size of the database file, avoid actually truncating the file until after the transaction has been committed (but before the db has been unlocked). This means pages that are removed from the database by truncating the file need not be journalled.
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.