drh [Sat, 27 Jan 2007 02:38:29 +0000 (02:38 +0000)]
Parser changes to allow parenthesized numerical arguments to pragmas,
in support of the integrity_check enhancement of check-in (3609)
and ticket #2176. (CVS 3610)
drh [Sat, 27 Jan 2007 02:24:54 +0000 (02:24 +0000)]
Limit the number of errors returned by PRAGMA integrity_check to 100 by
default. Specify an alternative limit using an argument to the pragma.
Ticket #2176. (CVS 3609)
drh [Fri, 26 Jan 2007 19:23:33 +0000 (19:23 +0000)]
Add code to select.c for printing the contents of parse-tree structures.
The code is normally omitted. You must compile with -DSQLITE_TEST
or -DSQLITE_DEBUG to enable it. (CVS 3606)
shess [Fri, 19 Jan 2007 22:59:56 +0000 (22:59 +0000)]
http://www.sqlite.org/cvstrac/tktview?tn=2166,35
Calling UPDATE against an fts table in a UTF-16 database inserts
corrupted data into the database. The UTF-8 data is being inserted
directly. This appears to happen because sqlite3_ value_text()
destructively coerces a value to UTF-8, and it's never converted back
when updating the table. This works around the problem by rearranging
things so that the update happens before the coercion. (CVS 3596)
drh [Fri, 19 Jan 2007 01:06:01 +0000 (01:06 +0000)]
Make sure the IS NULL optimization introduced by check-in (3494) correctly
handles a LEFT JOIN where the a term from the right table of the join uses
an IS NULL constraint. Ticket #2177. This check-in also adds the new test
cases that were suppose to have been added with (3494) but which were
mistakenly omitted. (CVS 3595)
drh [Tue, 16 Jan 2007 18:19:12 +0000 (18:19 +0000)]
Additional memory initialization in lemon - bug reported from wireshark.
Ticket #2172. Note this problem only comes up with certain grammars,
and does not impact SQLite. On the other hand, it might cause SQLite
to run slower. So we might want to revisit this change at some point. (CVS 3594)
drh [Tue, 16 Jan 2007 03:09:02 +0000 (03:09 +0000)]
Make sure the parser generated by lemon always calls destructors on
unused symbols, even if there is no action following the rule.
Ticket #2171. (CVS 3593)
drh [Fri, 12 Jan 2007 23:09:23 +0000 (23:09 +0000)]
Fix a bug in lemon. The code in which the error appears might well be
unreachable. The changes does not effect the code that is generated for
the SQLite parser. Ticket #2164. (CVS 3591)
drh [Tue, 9 Jan 2007 14:01:13 +0000 (14:01 +0000)]
When an automatic re-prepare occurs, take care not to reset the internal
schema symbol table. Ticket #2156. This change also includes some debugging
enhancements. (CVS 3578)
drh [Mon, 8 Jan 2007 21:07:17 +0000 (21:07 +0000)]
Fix a critical bug in sqlite3_prepare_v2 that can lead to segfaults when
the schema changes and the statement is recompiled automatically.
Ticket #2154. (CVS 3576)
drh [Fri, 5 Jan 2007 02:00:47 +0000 (02:00 +0000)]
In the btree.c, when releasing the page1 lock, first make sure the
pager has not reset and released the lock already. This fixes a bug
introduced by (3549). (CVS 3563)
drh [Wed, 3 Jan 2007 23:37:28 +0000 (23:37 +0000)]
Clean up memory leaks and uninitialized variables detected by valgrind.
Identify all tests where we deliberately derefence freed memory by adding
a "-misuse" tag. (CVS 3550)
drh [Wed, 3 Jan 2007 23:36:22 +0000 (23:36 +0000)]
Additional changes in the pager and os interface layers to fix problems that
might be contributing to recently observed database corruption. (CVS 3549)
drh [Wed, 3 Jan 2007 15:34:29 +0000 (15:34 +0000)]
Make sure that the database size cache in the pager is invalidated whenever
the database is unlocked. A stale value in the database size cache can
result in database corruption on a heavily loaded system running
autovacuum. (CVS 3548)
drh [Tue, 2 Jan 2007 18:41:54 +0000 (18:41 +0000)]
Update the vtab_err test to check for -DSQLITE_MEMDEBUG=1 and skip the tests
if missing. Pager is more careful to clear its file size cache. Remove
an assert() in VDBE that might fail on a corrupt database file. (CVS 3547)
pweilbacher [Fri, 22 Dec 2006 20:33:13 +0000 (20:33 +0000)]
OS/2 change: add safeguard to be able to use SQLite loaded into high memory on OS/2 when compiled with GCC 3.3 or later. Currently, this is only used when building within the Mozilla source tree. (CVS 3546)
drh [Thu, 21 Dec 2006 22:38:23 +0000 (22:38 +0000)]
Disable extension loading by default. At some point we should change
the configure script to detect the presence of dlopen() automatically
and add the appropriate library to the link. But that requires a
working version of autoconf, which I do not have. Ticket #2124. (CVS 3545)
drh [Thu, 21 Dec 2006 01:29:22 +0000 (01:29 +0000)]
Move the shared-library loading routines into the OS portability layer,
thus enabling the os_win.c code to handle the character encoding
confusion of win95/nt/ce. Ticket #2023. (CVS 3541)
drh [Wed, 20 Dec 2006 03:24:19 +0000 (03:24 +0000)]
The query optimizer does a better job of optimizing out ORDER BY clauses
that contain the rowid or which use indices that contain the rowid.
Ticket #2116. (CVS 3536)
drh [Sat, 16 Dec 2006 16:25:15 +0000 (16:25 +0000)]
Query optimizer enhancement: In "FROM a,b,c left join d" allow the C table
to be reordered with A and B. This used to be the case but the capability
was removed by (3203) and (3052) in response to ticket #1652. This change
restores the capability. (CVS 3529)
shess [Wed, 29 Nov 2006 21:03:00 +0000 (21:03 +0000)]
Test that terms longer than interior nodes work correctly. A bug
prior to fts2.c r1.10 meant that such large terms caused an eventual
stack overflow. (CVS 3523)
shess [Wed, 29 Nov 2006 05:17:28 +0000 (05:17 +0000)]
http://www.sqlite.org/cvstrac/tktview?tn=2046
The virtual table interface allows for a cursor to field multiple
xFilter() calls. For instance, if a join is done with a virtual
table, there could be a call for each row which potentially matches.
Unfortunately, fulltextFilter() assumes that it has a fresh cursor,
and overwrites a prepared statement and a malloc'ed pointer, resulting
in unfinalized statements and a memory leak.
This change hacks the code to manually clean up offending items in
fulltextFilter(), emphasis on "hacks", since it's a fragile fix
insofar as future additions to fulltext_cursor could continue to have
the problem. (CVS 3521)
shess [Wed, 29 Nov 2006 01:02:03 +0000 (01:02 +0000)]
Delta-encode terms in interior nodes. While experiments have shown
that this is of marginal utility when encoding terms resulting from
regular English text, it turns out to be very useful when encoding
inputs with very large terms. (CVS 3520)