drh [Thu, 30 Oct 2008 15:03:15 +0000 (15:03 +0000)]
Add the sqlite3_extended_errcode() interface. Change to return
SQLITE_BUSY instead of SQLITE_ERROR when a COMMIT is attempted and one
or more queries are still pending. (CVS 5850)
danielk1977 [Wed, 29 Oct 2008 07:01:56 +0000 (07:01 +0000)]
If a hot-journal file is detected but the application does not have the required read/write permissions, return SQLITE_CANTOPEN. Prior to this change, SQLITE_BUSY was returned. Ticket #3457. (CVS 5849)
drh [Tue, 28 Oct 2008 18:58:20 +0000 (18:58 +0000)]
Remove the vestigial mem4 and mem6 memory allocators. Add the
SQLITE_ZERO_MALLOC compile-time option and the mem0.c module to
handle memory allocation for that case. (CVS 5848)
drh [Sat, 25 Oct 2008 15:03:20 +0000 (15:03 +0000)]
Disable the result-set alias cache when on conditional code branches.
Ticket #3461. The column cache and result set alias cache mechanisms are
prone to this kind of error and need to be refactored. This check-in should
be considered a temporary fix in advance of a more general redesign of the
whole mechanism. (CVS 5841)
danielk1977 [Thu, 23 Oct 2008 05:45:07 +0000 (05:45 +0000)]
Fix a bug in pragma table_info. Column default values specified as negative numbers (col DEFAULT -1) were being reported as NULL by the pragma. (CVS 5839)
shane [Wed, 22 Oct 2008 18:27:31 +0000 (18:27 +0000)]
Updated configure/makefiles to handle SQLITE_ENABLE* compile options. Made sure makefile passes command line options (OPTS=-Dfoo) to the compiler. Add -DSQLITE_COVERAGE_TEST=1 if gcov being used. (CVS 5838)
danielk1977 [Wed, 15 Oct 2008 11:43:55 +0000 (11:43 +0000)]
After running speed1.test and speed1p.test, reset the size of the lookaside buffer. Otherwise, subsequent runs of malloc5.test may report an error. Changes to test code only. (CVS 5824)
drh [Mon, 13 Oct 2008 14:16:11 +0000 (14:16 +0000)]
In rollback.test, do not check for journal deletion if the journal mode
is not DELETE. Call show_memstats after each test module in all.test
and quick.test. (CVS 5814)
danielk1977 [Mon, 13 Oct 2008 10:37:49 +0000 (10:37 +0000)]
If sqlite3_column_value() is called to obtain a value with the MEM_Static flag set, clear it and set the MEM_Ephem flag before returning. Otherwise, if the value is passed to sqlite3_bind_value() or sqlite3_result_value(), sqlite may attempt to use the buffer after the statement has been finalized. This is not always valid, as MEM_Static only guarantees that a MEM.z buffer will be valid for the lifetime of the owner statement, not that it is actually a static buffer. (CVS 5812)
shane [Sun, 12 Oct 2008 00:27:53 +0000 (00:27 +0000)]
Added SQLITE_OMIT_DEPRECATED compile time option to leave out deprecated functions. Updated test scripts to skip tests of deprecated functions if they are compiled out. (CVS 5808)
danielk1977 [Sat, 11 Oct 2008 17:51:38 +0000 (17:51 +0000)]
When transfering an error message from a statement handle to the database handle so that it can be accessed by sqlite3_errmsg(), a malloc may fail. If this malloc fails, it is considered benign. (CVS 5806)
drh [Sat, 11 Oct 2008 17:35:16 +0000 (17:35 +0000)]
Fix to sqlite3DbMallocRaw() when SQLITE_OMIT_LOOKASIDE is defined so that
once it fails it continues to fail. Add a comment explaining why this is
important. (CVS 5804)
drh [Sat, 11 Oct 2008 17:06:04 +0000 (17:06 +0000)]
Fix a OOM segfault in the BETWEEN operator parsing - discovered while
using SQLITE_OMIT_LOOKASIDE. Add SQLITE_OMIT_LOOKASIDE to test_config.c and
bypass lookaside.test when defined. (CVS 5803)
drh [Sat, 11 Oct 2008 16:47:35 +0000 (16:47 +0000)]
Fix a memory leak on ORDER BY of a compound select caused by the resolver
on a flattened query. Also fix a OOM segfault in WHERE clause processing. (CVS 5801)
drh [Sat, 11 Oct 2008 15:38:29 +0000 (15:38 +0000)]
Added an assert() to detect lookaside memory leaks. Also added the
SQLITE_OMIT_LOOKASIDE compile-time option which is useful in trying to
track down lookaside memory leaks. (CVS 5800)
danielk1977 [Thu, 9 Oct 2008 18:48:30 +0000 (18:48 +0000)]
Fix an assert() failure that can occur if the user attempts to set an into an integer primary key column to a text value in a table that has a BEFORE UPDATE trigger. (CVS 5787)
drh [Thu, 9 Oct 2008 15:56:45 +0000 (15:56 +0000)]
Add a test to verify the sqlite3_column_name() interface returns the
correct value when the query is of the form: "SELECT rowid,* FROM...".
Ticket #3429. (CVS 5785)
danielk1977 [Wed, 8 Oct 2008 17:58:48 +0000 (17:58 +0000)]
After an OP_NullRow is executed on a cursor, cause any subsequent OP_Next or OP_Prev to behave as if there were no more rows to traverse. Ticket #3424. (CVS 5782)
drh [Tue, 7 Oct 2008 19:53:14 +0000 (19:53 +0000)]
Raise the hard upper bound on SQLITE_MAX_FUNCTION_ARG to 1000 from 100.
The default upper bound is still 100, but it can now be raised as high
as 1000 at compile-time. (CVS 5780)
drh [Tue, 7 Oct 2008 15:25:48 +0000 (15:25 +0000)]
Remove the SQLITE_MUTEX_APPDEF compile-time option. The SQLITE_THREADSAFE=0
option always removes all mutex code. For application-defined mutexes only,
use SQLITE_THREADSAFE=1 with SQLITE_MUTEX_NOOP=1. Ticket #3421. (CVS 5779)
danielk1977 [Tue, 7 Oct 2008 11:51:20 +0000 (11:51 +0000)]
Fix a problem with hot-journal rollback. SQLITE_CANTOPEN was being returned if the hot-journal file contained a pointer to a master journal file that did not exist. (CVS 5775)
shane [Tue, 7 Oct 2008 05:27:11 +0000 (05:27 +0000)]
Initial support for LIMIT clause on DELETEs and UPDATEs. Changes likely with more testing. The code can be omitted with the define SQLITE_OMIT_UPDATE_DELETE_LIMIT. (CVS 5774)
danielk1977 [Thu, 2 Oct 2008 13:50:55 +0000 (13:50 +0000)]
Optimize queries that contain "WHERE rowid IN (x, y, z...)" by using an intkey btree to store the (x, y, z...) set instead of an index btree. (CVS 5760)