danielk1977 [Thu, 5 Mar 2009 14:59:39 +0000 (14:59 +0000)]
Begin purging dirty pages from the cache once 90% of the cache is dirty (insteadof waiting until it is 100% dirty). This improves performance in some circumstances by effectively reserving 10% of the configured page-cache for frequently reused read-only pages. (CVS 6341)
drh [Mon, 2 Mar 2009 14:24:21 +0000 (14:24 +0000)]
Fix the SQLITE_ENABLE_UPDATE_DELETE_LIMIT option for the new Expr compression
logic of check-in (6305). Bug discovered during regression testing. (CVS 6333)
drh [Mon, 2 Mar 2009 01:22:40 +0000 (01:22 +0000)]
Fix a bug in the GROUP BY alias name resolution. The bug was by
check-in (6305). Discovered by regression test on 64-bit linux.
Test cases added so that the problems is detected on 32-bit systems. (CVS 6332)
danielk1977 [Sat, 28 Feb 2009 10:47:41 +0000 (10:47 +0000)]
Instead of linking temporary triggers on non-temporary tables into the Table.pTrigger list, search the temp schema for them on demand. Fix for #3688. (CVS 6329)
drh [Tue, 24 Feb 2009 16:18:05 +0000 (16:18 +0000)]
Enhanced comments on table locking logic as it relates to preparing new
statements. Added assert() and testcase() but no other changes to code. (CVS 6319)
danielk1977 [Mon, 23 Feb 2009 17:33:49 +0000 (17:33 +0000)]
Scan an index instead of a table for "SELECT count(*) FROM <tbl>" queries. Because an index is usually smaller than a table on disk, this saves some IO. (CVS 6315)
drh [Sat, 21 Feb 2009 22:38:59 +0000 (22:38 +0000)]
The sqlite3.def file is automatically generated and is not suppose to be
part of the source code repository. So it is hereby removed.
Ticket #3671. (CVS 6312)
drh [Fri, 20 Feb 2009 03:55:05 +0000 (03:55 +0000)]
Add a count parameter to the OP_Variable opcode and use it to simplify
prepared statements that copy consecutive unnamed parameters into
consecutive registers (a common case). (CVS 6309)
drh [Fri, 20 Feb 2009 01:28:59 +0000 (01:28 +0000)]
Reuse space left-over opcode space at the end of the VDBE opcode array to
store memory cells, VDBE cursors, and other content needed by the VDBE.
This reduces the memory required by a prepared statement. (CVS 6307)
danielk1977 [Thu, 19 Feb 2009 14:39:25 +0000 (14:39 +0000)]
Changes to reduce the heap space consumed by triggers, views and tables in the in-memory representation of the schema. Also to reduce the space used by prepared statements slightly. (CVS 6305)
drh [Wed, 18 Feb 2009 18:37:58 +0000 (18:37 +0000)]
Move the text of C-API requirements out of the sqlite.h.in source file and
into separate files in the "docsrc" CM system. Comment changes only - no
changes to code. (CVS 6303)
drh [Tue, 17 Feb 2009 18:37:28 +0000 (18:37 +0000)]
Add tests to double-check that nothing within SQLite ever tries to allocate
amounts of memory that are close to the maximum signed integer, leading to
an integer overflow within malloc(). This is not currently a problem.
The extra tests just insure it never becomes a problem. (CVS 6298)
drh [Thu, 12 Feb 2009 17:06:41 +0000 (17:06 +0000)]
Update thread tests to clear the sqlite_open_file_count counter at the
end. This counter is not threadsafe and can end up with an invalid value
at the end of the thread tests. (CVS 6289)
danielk1977 [Thu, 12 Feb 2009 09:11:56 +0000 (09:11 +0000)]
Fix a case where during a rollback triggered by an IO or malloc error an unjournalled region of the database could be written to (with it's original data). This was causing an assert in test_journal.c to fail. Add a test case in ioerr2.test to trigger this case. (CVS 6286)
danielk1977 [Wed, 11 Feb 2009 07:38:11 +0000 (07:38 +0000)]
Modify the test_journal.c code to (1) account for the backup code writing to parts of the pending-byte page when changing a databases page-size, and (2) to avoid reading from the pending-byte page and triggering the assert in os_unix.c. Changes to test code only. (CVS 6280)
danielk1977 [Wed, 11 Feb 2009 05:18:06 +0000 (05:18 +0000)]
In test_mutex.c, zero the global structure staticly instead of in Sqlitetest_mutex_Init(). This is because Sqlitetest_mutex_Init() is now called by each thread during thread tests ((6193)). Test code changes only. (CVS 6279)
danielk1977 [Tue, 10 Feb 2009 18:54:02 +0000 (18:54 +0000)]
For the "onefile" demo, pass SQLITE_OPEN_TEMP_DB instead of MAIN_DB to the OS layer when opening the single file. This is to work around the assert() in os_unix.c that tests that the locking region is not written to. (CVS 6278)
danielk1977 [Tue, 10 Feb 2009 14:28:57 +0000 (14:28 +0000)]
Prevent code in test6.c from reading the 512 byte locking region (the PENDING_BYTE page) of a database file. Doing so triggers an assert failure in os_unix.c. (CVS 6276)
danielk1977 [Tue, 10 Feb 2009 11:17:43 +0000 (11:17 +0000)]
Reenable triggering vdbe tracing by creating file-system entries. Add a (redundant) test that modifying the temp schema expires all prepared statements. (CVS 6274)
danielk1977 [Fri, 6 Feb 2009 05:59:44 +0000 (05:59 +0000)]
Changes to the backup API: (1) if a negative number is passed as the second argument to backup_step(), this is interpreted as "copy all remaining pages" and (2) if backup_finish() is called after backup_step() fails with a BUSY or LOCKED error, then this error is also returned by backup_finish() (same handling as for other errors encountered by backup_step()). (CVS 6266)
drh [Wed, 4 Feb 2009 19:16:23 +0000 (19:16 +0000)]
If the truncate operation fails in journalmode=TRUNCATE, do not fall back
to overwriting the journal header with zeros. Simply fail the operation. (CVS 6257)
shane [Wed, 4 Feb 2009 03:59:25 +0000 (03:59 +0000)]
Changes to completely remove all floating point ops if SQLITE_OMIT_FLOATING_POINT defined. Note that w/o fp, date/time, round, nan, etc. are all gone or limited in functionality. Updated some of the test scripts to support missing fp and 64-bit functionality. Ticket #3029. (CVS 6250)
drh [Tue, 3 Feb 2009 22:51:06 +0000 (22:51 +0000)]
Correction to check-ins (6246) and (6247): The backup object might not
hold a valid destination connection pointer. Also, do not reset the
page cache when establishing a read-lock while there is a persistent
or truncated journal, only if there is a journal that really needs to
rollback. Otherwise backups always reset whenever the source database
file is read. (CVS 6248)
drh [Tue, 3 Feb 2009 21:13:07 +0000 (21:13 +0000)]
Must hold mutex on the destination during backups. Add documentation to
warn programmers that attempting to use the destination connection during
a backup can lead to deadlock. (CVS 6246)
shane [Tue, 3 Feb 2009 19:55:20 +0000 (19:55 +0000)]
Fixed postToParent() return type (Tcl_ThreadCreateType) in test_thread.c to compile with MSVC. Removed a few compiler warnings. Test harness change only. (CVS 6245)