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)
drh [Tue, 3 Feb 2009 16:25:47 +0000 (16:25 +0000)]
Fix the sqlite3_mprintf_long test command (added by check-in (6224) in order
to address ticket #3621) so that it works on systems with sizeof(int)==4 and
sizeof(long)==8. (CVS 6240)
drh [Tue, 3 Feb 2009 15:27:02 +0000 (15:27 +0000)]
Check at the write() call to work around the msdos bug in OSX actually
succeeds and throw an error if it does not. #ifdef out the work-around
for all platforms other than OSX. Ticket #3633. (CVS 6237)
drh [Mon, 2 Feb 2009 21:57:05 +0000 (21:57 +0000)]
Make group_concat() a 1- or 2-value function, as the documentation says it
should be. Use the md5sum() function to verify ticket #3179, not
group_concat(). This undoes the ill-advised group_concat() change of
check-in (5233). (CVS 6233)
drh [Fri, 30 Jan 2009 17:27:44 +0000 (17:27 +0000)]
Fix a round-off error when moving dates by negative modifier amounts.
Ticket #3618. Enhance the "NNN years" modifier to accept fractional
years. (CVS 6220)
drh [Thu, 29 Jan 2009 19:27:46 +0000 (19:27 +0000)]
Add test cases to make sure that keywords that we say can be used as
identifiers really can be used as identifiers. These tests were
inspired by ticket #3612, but they do not directly address ticket #3612. (CVS 6214)
vapier [Wed, 28 Jan 2009 04:46:14 +0000 (04:46 +0000)]
unify TCLLIBDIR handling with libtclsqlite3.so and use libtool to install it rather than custom tclinstaller.tcl ... this integrates better with autotools and avoids relinking issues (RPATH pointing to builddir) (CVS 6210)