drh [Fri, 30 Mar 2007 17:18:50 +0000 (17:18 +0000)]
Remove asserts on the existing of journal files in pager - asserts that
are not valid for certain kinds of simulated I/O errors or for async I/O. (CVS 3769)
drh [Fri, 30 Mar 2007 16:01:55 +0000 (16:01 +0000)]
Always enable exclusive access mode for TEMP databases. This cannot be
changed. The locking_mode pragma has not effect on the TEMP database. (CVS 3766)
drh [Fri, 30 Mar 2007 14:06:34 +0000 (14:06 +0000)]
Refactoring the btree and pager routines into distinct two-phase commit
routines. We've always done a two-phase commit - this change is just
making that more apparent in the code. (CVS 3762)
drh [Fri, 30 Mar 2007 11:29:32 +0000 (11:29 +0000)]
Move the sqlite3_temp_directory global variable out of the OS porting layer
and into main.c so that it is more accessible to non-standard OS porting
layers. (CVS 3759)
shess [Thu, 29 Mar 2007 18:41:03 +0000 (18:41 +0000)]
Buffer updates per-transaction rather than per-update. If lots of
updates happen within a single transaction, there was a lot of wasted
encode/decode overhead due to segment merges. This code buffers
updates in memory and writes out larger level-0 segments. It only
works when documents are presented in ascending order by docid.
Comparing a test set running 100 documents per transaction, the total
runtime is cut almost in half. (CVS 3751)
drh [Thu, 29 Mar 2007 18:19:52 +0000 (18:19 +0000)]
Change the name of PAGER_SECTOR_SIZE to SQLITE_DEFAULT_SECTOR_SIZE. Make
the new OS-layer interface routine for finding sector size optional. (CVS 3750)
shess [Thu, 29 Mar 2007 16:30:38 +0000 (16:30 +0000)]
Don't call ctype functions on hi-bit chars. Some platforms raise
assertions when this occurs, and it's almost certainly not the right
thing to do in the first place. (CVS 3746)
drh [Thu, 29 Mar 2007 05:51:49 +0000 (05:51 +0000)]
Change BtreeMoveto so that it can be biased to the right or to the center.
Use a right bias when appending and a center bias when searching. This
gives about a 15% reduction in calls to sqlite3VdbeRecordCompare. (CVS 3741)
drh [Thu, 29 Mar 2007 04:43:26 +0000 (04:43 +0000)]
Bias the b-tree binary search toward the high end. The common case is to
append data and this heuristic makes append run much faster because there
are fewer comparisons. (CVS 3740)
drh [Thu, 29 Mar 2007 01:44:45 +0000 (01:44 +0000)]
Lemon change: compile the resulting parser with -DYYSTACKDEPTH=0 or set
the "%stack_size" parameter to 0 in the grammar and the parser stack
will be dynamically allocated using realloc() and free(). The default
behavior is to have a finite depth stack. (CVS 3738)
drh [Wed, 28 Mar 2007 14:30:06 +0000 (14:30 +0000)]
Correctly handle NULLs in IN operators. Ticket #2273.
The changes in where.c and in the WhereLevel.aInLoop structure are
not strictly necessary to fix this problem - they just make the code
easier to read. Only the change in OP_Next/OP_Prev operator of vdbe.c
is required. (CVS 3735)
drh [Tue, 27 Mar 2007 22:24:11 +0000 (22:24 +0000)]
The SQLITE_ENABLE_LOAD_EXTENSION macro enables the load_extension() SQL
function by default without having to invoke sqlite3_enable_load_extension()
first. (CVS 3732)
danielk1977 [Tue, 27 Mar 2007 16:19:51 +0000 (16:19 +0000)]
Test handling of IO errors that occur in OsDelete() or OsTruncate() operations. Also use an anonymous file for temporary storage during a VACUUM. (CVS 3729)
drh [Tue, 27 Mar 2007 14:44:50 +0000 (14:44 +0000)]
The -DSQLITE_OMIT_ATTACH=1 option now omits both the ATTACH and VACUUM
commands. Ticket #2268.
The regression test suite depends on both of these commands
and will not run if compiled with this option. (CVS 3727)
shess [Thu, 22 Mar 2007 00:14:28 +0000 (00:14 +0000)]
Refactor PLWriter to remove owned buffer. DLCollector (Document List
Collector) now handles the case where PLWriter (Position List Writer)
needed a local buffer. Change to using the associated DLWriter
(Document List Writer) buffer, which reduces the number of memory
copies needed in doclist processing, and brings PLWriter operation in
line with DLWriter operation. (CVS 3707)
shess [Tue, 20 Mar 2007 23:52:37 +0000 (23:52 +0000)]
Refactor PLWriter in preparation for buffered-document change.
Currently, PLWriter (Position List Writer) creates a locally-owned
DataBuffer to write into. This is necessary to support doclist
collection during tokenization, where there is no obvious buffer to
write output to, but is not necessary for the other users of PLWriter.
This change adds a DLCollector (Doc List Collector) structure to
handle the tokenization case.
Also fix a potential memory leak in writeZeroSegment(). In case of
error from leafWriterStep(), the DataBuffer dl was being leaked. (CVS 3706)
drh [Sat, 17 Mar 2007 13:27:54 +0000 (13:27 +0000)]
First cut at an implementation of the REPLACE() function. We might yet
make this a compile-time option or move it into a separate source file. (CVS 3697)
shess [Fri, 16 Mar 2007 18:30:54 +0000 (18:30 +0000)]
Out-of-memory cleanup in tokenizers. Handle NULL return from
malloc/calloc/realloc appropriately, and use sizeof(var) instead of
sizeof(type) to make certain that we don't get a mismatch between
them as the code rots. (CVS 3693)
drh [Thu, 15 Mar 2007 12:51:16 +0000 (12:51 +0000)]
Fix the pager so that it handles persistent I/O errors correctly.
Update the testing infrastructure so that it tests for persistent
I/O errors instead of just transient errors. (CVS 3690)
drh [Sat, 10 Mar 2007 13:47:01 +0000 (13:47 +0000)]
Updates to the copyright.html page to address concerns some users have
SQLite have about copyright issues. A links to the wikipedia article
on public domain and a public domain icon. (CVS 3679)
drh [Sun, 4 Mar 2007 13:15:27 +0000 (13:15 +0000)]
Changes to the btree and pager that reduce the amount of I/O when dealing
with the freelist. (1) Avoid journaling pages of a table that is being
deleted. (2) Do not read the original content of pages being pulled off
of the freelist. (CVS 3671)