drh [Mon, 3 Dec 2012 17:04:40 +0000 (17:04 +0000)]
Make sure that the optimization that set the maximum column that will be used
on a particular query does not mistakenly change an opcode other than
OP_OpenRead or OP_OpenWrite. In particular, make sure it does not overwrite
the P4 field of an OP_SorterOpen.
dan [Tue, 27 Nov 2012 10:56:39 +0000 (10:56 +0000)]
Fix problems in test_sqllog.c. Clarify the experimental SQLITE_CONFIG_SQLLOG interface. Handle at least the more likely error conditions in test_sqllog.c.
drh [Tue, 20 Nov 2012 15:06:57 +0000 (15:06 +0000)]
Have the windows implementation of xDelete return SQLITE_IOERR_DELETE_NOENT
if the file to be deleted does not exist. The unix implementation was
previously modified to behave this way. The current changes simply brings
the two implementations into alignment.
drh [Tue, 13 Nov 2012 11:08:49 +0000 (11:08 +0000)]
Use preprocessor macros to automatically detect whether or not
posix_allocate() is available. (It is generally available on Linux
but not on Mac.) Ticket [5eaa61ea1881040b17449ca043b6f8fd9ca55dc3]
drh [Tue, 13 Nov 2012 10:54:12 +0000 (10:54 +0000)]
When available, use posix_fallocate() rather than ftruncate() to allocate
space for mmap()ed -shm files, since posix_fallocate() gives an error if
no disk space is available whereas ftruncate() is silent and leaves the system
vulnerable to a SIGBUS upon first write to the mmap()ed region.
Ticket [5eaa61ea1881040b17449ca043b6f8fd9ca55dc3]
drh [Fri, 9 Nov 2012 21:40:02 +0000 (21:40 +0000)]
Only log unlink() errors if the error is something other than
SQLITE_IOERR_DELETE_NOENT. The error is still reported up the stack, it
is simply not added to the sqlite3_log().
dan [Fri, 9 Nov 2012 20:17:26 +0000 (20:17 +0000)]
Change os_unix.c to propagate ENOENT errors back to sqlite as SQLITE_IOERR_DELETE_NOENT. Have SQLite ignore these where they are benign and propagate them back to the caller where they may indicate a file-system malfunction of some description.
drh [Fri, 9 Nov 2012 18:22:26 +0000 (18:22 +0000)]
Disable the table selection rule that tried to prevent full table scans from
migrating to the outer loop unless they were optimal. The new scaling of
outer-loop costs by cost of inner loops obviates the need for that step. And,
in fact, that step causes problems with the new inner-loop cost accounting.
drh [Fri, 26 Oct 2012 00:55:07 +0000 (00:55 +0000)]
Make sure all virtual table cursors have been closed on a prepared statement
prior to unlinking the perpared statement from its database connection.
The test case for this is in TH3, in the main39.test module.
dan [Thu, 25 Oct 2012 19:25:39 +0000 (19:25 +0000)]
Fix a bug in fts3 causing it to return SQLITE_NOMEM when NEAR, OR and some auxiliary functions were used together. Also a segfault in vtab.c that could follow an OOM condition.
drh [Thu, 25 Oct 2012 15:23:14 +0000 (15:23 +0000)]
Improvements to the command-line argument parsing in the
command-line shell. Command-line options can now occur either before
or after the database name and first command and are still accepted and
processed. Command-line options are processed even if no database name
is given (and :memory: is assumed).
mistachkin [Fri, 19 Oct 2012 00:23:31 +0000 (00:23 +0000)]
Add detailed comments to the build tools used to generate the VSIX package. Also, allow the build configurations and native library directories to be overridden for the multi-platform build tool for MSVC.
drh [Sat, 13 Oct 2012 23:16:00 +0000 (23:16 +0000)]
Ensure that when the source of a backup is a database that is zero bytes
in size, the final destination database consists of at least one page.
Truncating it to zero bytes is equivalent to zeroing the schema cookie
and change counter, which can cause problems for existing clients.
dan [Sat, 13 Oct 2012 19:58:11 +0000 (19:58 +0000)]
Ensure that when the source of a backup is a database that is zero bytes in size, the final destination database consists of at least one page. Truncating it to zero bytes is equivalent to zeroing the schema cookie and change counter, which can cause problems for existing clients.
dan [Wed, 10 Oct 2012 09:46:29 +0000 (09:46 +0000)]
Move a couple of WAL-related function declarations in sqliteInt.h and pager.h into "#ifndef SQLITE_OMIT_WAL" blocks. Otherwise, the amalgamation fails to build using some compilers with SQLITE_OMIT_WAL (static function declared but not defined).
dan [Fri, 5 Oct 2012 19:43:02 +0000 (19:43 +0000)]
Fix a problem in shared-cache mode where a COMMIT statement might cause a busy-handler belonging to a shared-cache connection other than the current writer to be invoked.
drh [Wed, 3 Oct 2012 18:09:32 +0000 (18:09 +0000)]
Fix an out-of-order memset() that occurs before all variable declarations
are finished. Also fix a line that exceeds the 80-character line length
limit.
drh [Wed, 3 Oct 2012 12:56:18 +0000 (12:56 +0000)]
Update the query planner to recognize more cases where ORDER BY clauses
can be optimized out. Add test cases to verify correct behavior of the
ORDER BY optimization when the covering-index-scan optimization is disabled.
Fix a harmless compiler warning in the TCL interface.
drh [Wed, 3 Oct 2012 12:38:19 +0000 (12:38 +0000)]
Fix a query planner problem that only occurs when covering-index-scan is
disabled. Fix to tests whose output changed due to the new and more
aggressive ORDER BY optimization.
drh [Wed, 3 Oct 2012 11:02:33 +0000 (11:02 +0000)]
Fix the TCL interface so that SQL functions implemented in TCL honor the
"nullvalue" setting. Also remove from the TCL interface some unused
legacy UTF8 translation code left over from SQLite2.