Fix a segfault in Lemon that occurs if the input grammar does not define
a type for tokens. This does not effect SQLite since the SQLite grammar
does define a type for tokens. (CVS 6451)
Clarify the meanings of the SQLITE_SYNC_NORMAL and SQLITE_SYNC_FULL flags
passed into the xSync method of the VFS. Comment changes only - no changes
to code. (CVS 6447)
Remove a blank line in sqlite.h.in that was preventing the
SQLITE_LOCKED_SHAREDCACHE constant appears in the automatically-generated
documentation. Ticket #3775. (CVS 6446)
Use integer rather than floating point compuations in converting from julian
day number to unix-time to avoid round-off errors on Borland compilers.
Ticket #3769. (CVS 6445)
Make sure the VACUUM statement locks down the page_size and auto_vacuum
modes after it runs. Otherwise, pragmas might change these settings on
a populated database, resulting in problems. (CVS 6442)
Fix the sqlite3_prepare() family of interfaces so that they zero the *ppStmt
value even on an SQLITE_MISUSE return. Make it clear in the documentation
that the ppStmt parameter cannot be zero. (CVS 6441)
Disable the query flattening optimization when the subquery is a compound
query with an ORDER BY clause. Ticket #3773 shows why that combination
does not work. (CVS 6437)
In the built-in SQL function implementations, improve some comments, fix
an off-by-one error in detecting over-size strings, and add testcase()
macros to verify that boundary values have been tested. (CVS 6434)
Mark untestable branches of memjournal.c as such. Reduce the size of a
single block allocation to a power of two. Reenable the inmemory_journal
permutation test. (CVS 6431)
Fix a bug in the sqlite3Utf16ByteLen() function so that it computes the
correct length even for strings that contain surrogate pairs.
Ticket #3766. (CVS 6427)
In pageReinit() in btree.c, only reinitialize a page if there are one or more references to it, not including the transient reference held by pager.c. This was always the intent. (CVS 6424)
Remove dead code from the UTF conversion routines. Fix a bug in
sqlite3_prepare16_v2() in which an out-of-memory error fails to
set the statement return pointer to NULL. (CVS 6423)
drh [Mon, 30 Mar 2009 17:19:48 +0000 (17:19 +0000)]
Add a comment to the pageReinit() routine explaining why the return code from
sqlite3BtreeInitPage() is ignored. Comment change only - no changes to code. (CVS 6412)
drh [Mon, 30 Mar 2009 12:56:52 +0000 (12:56 +0000)]
Avoid calls to newer TCL interfaces in the test logic. This helps the
TCL test harness compile without warnings and link when using older versions
of the TCL library. (CVS 6409)
danielk1977 [Mon, 30 Mar 2009 07:39:35 +0000 (07:39 +0000)]
Another change related to (6401) and (6402): When an attempt to unlock a file fails in os_unix.c, close all files held open waiting for the unlock event anyway.
This prevents a file-descriptor leak when testing IO errors. (CVS 6406)
drh [Sun, 29 Mar 2009 15:12:09 +0000 (15:12 +0000)]
Add a comment to the doubleToInt64() routine that explains why returning
minInt is in fact correct when it seems like maxInt should be returned. (CVS 6405)
danielk1977 [Thu, 26 Mar 2009 14:48:07 +0000 (14:48 +0000)]
Prevent the tcl test suite from throwing an exception when a threadsafe SQLite is linked against a non-threadsafe Tcl for testing. Print a warning instead. Ticket #3753. (CVS 6389)
danielk1977 [Thu, 26 Mar 2009 11:49:11 +0000 (11:49 +0000)]
Ensure that the test vfs in test_journal.c zeroes sqlite3_file.pMethods if an xOpen() call fails. Similar problem to that fixed by #6384. This was a problem with test code, not SQLite itself. (CVS 6387)
drh [Wed, 25 Mar 2009 14:24:41 +0000 (14:24 +0000)]
When a VFS.xOpen fails, make sure the pMethods pointer is zeroed on the
sqlite3_file object so that subsequent xClose() operations against that
same file handler are no-ops. Bug in the test_async.c module only - not
in the core library. Ticket #3744. (CVS 6384)
drh [Tue, 24 Mar 2009 18:42:16 +0000 (18:42 +0000)]
Change OS_UNIX to SQLITE_OS_UNIX in test_thread.c. Modify notify2.test to
print out its timings in addition to reporting success or failure. (CVS 6382)
danielk1977 [Tue, 24 Mar 2009 04:46:08 +0000 (04:46 +0000)]
Add a comment to prepare.c explaining why the lookaside buffer is disabled before sqlite3_exec() is called to parse a schema statement. No code changes. (CVS 6376)
drh [Mon, 23 Mar 2009 17:49:14 +0000 (17:49 +0000)]
Add asserts to make sure that database connection locks are held when
accessing the lookaside memory allocation buffers. No defects were found. (CVS 6374)
danielk1977 [Mon, 23 Mar 2009 17:11:26 +0000 (17:11 +0000)]
Fix an obscure race condition that can occur when multiple threads, shared cache and DDL statements are combined. Enhance notify2.test to test this scenario. (CVS 6373)
danielk1977 [Mon, 23 Mar 2009 04:33:32 +0000 (04:33 +0000)]
Use the ROUND8() macro to round an integer up to the nearest multiple of 8 and ROUNDDOWN8() macro to round down to the nearest multiple of 8. This is a cosmetic change. (CVS 6372)
drh [Sat, 21 Mar 2009 14:56:52 +0000 (14:56 +0000)]
Rig the unix backend to use fdatasync() by default, without having to set the
HAVE_FDATASYNC macro. Systems that do not support fdatasync() can be compiled
using -Dfdatasync=fsync. (CVS 6368)
drh [Sat, 21 Mar 2009 14:41:04 +0000 (14:41 +0000)]
On unix, always use fdatasync() instead of fsync() when available, even if
the file size changes, since (we are told) fdatasync() will automatically
flush the inode when the file size changes. (CVS 6367)
drh [Fri, 20 Mar 2009 13:15:30 +0000 (13:15 +0000)]
Rename the unused MEM2 static mutex to OPEN and reuse it to serialize access
to the sqlite3BtreeOpen() routine to prevent a race condition on detection
of sharable caches. Ticket #3735. (CVS 6363)
danielk1977 [Fri, 20 Mar 2009 09:09:37 +0000 (09:09 +0000)]
Fix a problem in loadext.test causing an error on OSX. This is not a real problem, just a case of the test script expecting a slightly different error message than the one returned. (CVS 6361)
danielk1977 [Thu, 19 Mar 2009 07:58:31 +0000 (07:58 +0000)]
Change sqlite3_step() to return SQLITE_LOCKED if a statement cannot be re-compiled due to locks on the shared-cache schema. Also add a blocking wrapper of sqlite3_prepare_v2() to the test code. (CVS 6359)
drh [Tue, 17 Mar 2009 22:33:00 +0000 (22:33 +0000)]
Move the rowid cache out of VdbeCursor and into BtCursor. When multiple
BtCursors are open on the same table, set their rowid cache all at the
same time. Ticket #3731. (CVS 6354)