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)
Misc clean up. Wrapped a CE only variable in if-defs. Changed to only provide cache hint for CE builds (as this prevents CE from compressing the file.) Performance testing on XP and Vista showed caching hint had little effect when the DB size was much smaller than the O/S disk cache size, and provided only marginal benefit when the DB size was much larger than the cache. On Vista, overall system performance was hurt for very large DBs. Ticket #3387. (CVS 5753)
Remove the reparentPage() and reparentChildPages() functions from btree.c. All calls to these functions can now be replaced by a call to setChildPtrmaps(). (CVS 5751)
Instead of storing a pointer to the parent page in the MemPage structure, have each B-Tree cursor keep track of the ancestry of the current page. (CVS 5747)