Commit Graph

3687 Commits

Author SHA1 Message Date
drh
89c69d00bd Fix for ticket #2141. (CVS 3552)
FossilOrigin-Name: 70f5f3b85f30bbec0ddc59ba364e1229c09ed636
2007-01-04 01:20:28 +00:00
drh
0bc5370cac Add a comment to vdbe.c to explain the use of an uninitialized variable. (CVS 3551)
FossilOrigin-Name: 1773eb7badf105b0e23316d4236903049c354c71
2007-01-04 01:20:11 +00:00
drh
dddb2f23e2 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)

FossilOrigin-Name: 70a862702d6dfcfe73bdeef8f0502c6c50e32a3a
2007-01-03 23:37:28 +00:00
drh
bafda0962e Additional changes in the pager and os interface layers to fix problems that
might be contributing to recently observed database corruption. (CVS 3549)

FossilOrigin-Name: a593d5743eab12c0f93a7bc436f0d69dfab0c387
2007-01-03 23:36:22 +00:00
drh
1aa2d8b55b 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)

FossilOrigin-Name: 6806b9ecb5e3b90e793c5862404e76485df33b25
2007-01-03 15:34:29 +00:00
drh
588f5bc31b 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)

FossilOrigin-Name: bf1afd016ad71dac90e58540122108f92e77ce3d
2007-01-02 18:41:54 +00:00
pweilbacher
4fffb4f0ef 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)
FossilOrigin-Name: 720189b8fafa61e5b712b409e76c368079b4bf96
2006-12-22 20:33:13 +00:00
drh
abc19b11e1 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)

FossilOrigin-Name: 87a9ee077aa53f1677667983f4566d61ea68b500
2006-12-21 22:38:23 +00:00
drh
584c094ba4 More fixes to the microsoft code-page nightmare... (CVS 3544)
FossilOrigin-Name: 0b47d88060069781e7e184806d6ecaeff9b9e5d1
2006-12-21 03:20:40 +00:00
drh
2a4d54b2cd Use GetProcAddressA() on wince. Ticket #2123 (CVS 3543)
FossilOrigin-Name: e3dddd1cef5877c009852fd7f484973843e26e00
2006-12-21 02:21:56 +00:00
drh
c96d49892c Reduce the number of utf8->unicode conversions required in wince. Ticket #2122 (CVS 3542)
FossilOrigin-Name: 6d2ff0962dff0477fe2af0323032dc16337f42ab
2006-12-21 01:37:39 +00:00
drh
761df87ea5 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)

FossilOrigin-Name: a1bcc6de578992b28924c1cf974ea58251454e2d
2006-12-21 01:29:22 +00:00
drh
ec4d88fab5 Change a parameter type from "int" to "DWORD" in the windows interface.
Ticket #2122. (CVS 3540)

FossilOrigin-Name: cca1eb3dfaa67d64ced3e49e7ddbd8db27a5526a
2006-12-21 00:46:42 +00:00
drh
644a5299aa The xFilter method is not optional. (CVS 3539)
FossilOrigin-Name: 6fdbd3bc91559ed95314842c0df33adbf276913e
2006-12-20 14:53:38 +00:00
drh
3f87d2a37e Initialize a variable to avoid compiler warnings and human confusion.
Ticket #2117. (CVS 3538)

FossilOrigin-Name: 951af8d5c57d665ee2ad3ee09ce34c023aa9e771
2006-12-20 14:31:24 +00:00
drh
3c7a1580c9 Patch to get extension loading working on wince. Ticket #2023. (CVS 3537)
FossilOrigin-Name: a81f3ddfd0626ae642c5ffd27a23c568d06f58dc
2006-12-20 03:37:34 +00:00
drh
cc19254de9 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)

FossilOrigin-Name: f245f5c2c2d337fe6458824beb7f9e721837765f
2006-12-20 03:24:19 +00:00
drh
2b7acc3551 Allow constraint names on DEFAULT values in a table definition.
Ticket #2109. (CVS 3535)

FossilOrigin-Name: 893d58c23da2a9b900a13eaa5202d94429862136
2006-12-20 02:15:00 +00:00
drh
f533acc0a7 Build without warnings and pass all tests with SQLITE_OMIT_LOAD_EXTENSION.
Ticket #2113. (CVS 3534)

FossilOrigin-Name: c3d118b40811b201e4a98b62549c5439d7d5098d
2006-12-19 18:57:11 +00:00
drh
cf68ae91ea Fix a typo in shell.c. Ticket #2111. (CVS 3533)
FossilOrigin-Name: 6f8a56231c4d0d990c54365f0ff0544bd8b3caf8
2006-12-19 18:47:41 +00:00
drh
9404d50e3b Use sqlite3_mprintf() instead of strdup() to reduce libc dependencies.
Ticket #2114. (CVS 3532)

FossilOrigin-Name: bf4a78cb315c0b1fca31c6f596ff0a8ece96860f
2006-12-19 18:46:08 +00:00
drh
d3627afc47 Speed improvement: do not journal or rollback pages that are pulled out of
the freelist. (CVS 3531)

FossilOrigin-Name: 4dffc4c3c9c4ccc024669cec204c68e953333563
2006-12-18 18:34:51 +00:00
drh
73aa096f36 Updates to the "Distinctive Features" document. (CVS 3530)
FossilOrigin-Name: c734585e1a801bec2d393d000c323ba842c2292d
2006-12-18 14:12:21 +00:00
drh
61dfc31d80 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)

FossilOrigin-Name: 7393c81b8cb9d4344ae744de9eabcb3af64f1db8
2006-12-16 16:25:15 +00:00
drh
f0fa1c1b9f Fix a bug in lemon that leads to an assertion fault given an invalid
grammar.  The bug and this fix do not effect on SQLite.  Ticket #2107. (CVS 3528)

FossilOrigin-Name: f2ad230f6dce98d664370d77845b5f585de20f08
2006-12-14 01:06:22 +00:00
drh
736c7d4b2c Change the table_info pragma so that it returns NULL for the default
value if there is no default value.  Ticket #2078. (CVS 3527)

FossilOrigin-Name: 5f21c3a5f02b4f2c4550f5904e9d0e1e2eafb0f3
2006-11-30 13:06:37 +00:00
drh
741f70633d Improvements to the new performance tests. (CVS 3526)
FossilOrigin-Name: 27f56c20514030e009fc3aa7e060d2e6276ddb83
2006-11-30 13:06:00 +00:00
drh
1468438a8e Fix indentation typo in btree.c. (CVS 3525)
FossilOrigin-Name: 5d61486f0fbd21ef992879b39d4e563fbfe46596
2006-11-30 13:05:29 +00:00
shess
f7912aff8a Drop a couple variables which are no longer used anywhere. (CVS 3524)
FossilOrigin-Name: 08c2cc0e0782cfaca89947a01b7ea4474dbe71aa
2006-11-29 23:41:10 +00:00
shess
d53f898f51 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)

FossilOrigin-Name: 66581162daa188d23078c9d21fd5b2563d4d238a
2006-11-29 21:03:00 +00:00
drh
abcddedb37 Added the speed1.test script (CVS 3522)
FossilOrigin-Name: 30355dfbd920f3b6a78110aaf370371f620324b7
2006-11-29 20:52:59 +00:00
shess
5c327dbb46 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)

FossilOrigin-Name: 18142fdb6d1f5bfdbb1155274502b9a602885fcb
2006-11-29 05:17:28 +00:00
shess
7e3d0c2d2f 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)

FossilOrigin-Name: c8151a998ec2423b417566823dc9957c7d5d782c
2006-11-29 01:02:03 +00:00
drh
3590f15775 Improvements to the speed tests recently added to the test suite. (CVS 3519)
FossilOrigin-Name: 272c1a6e61d053121b5412564948dad4366b5727
2006-11-23 21:09:10 +00:00
drh
2fca7fef28 Fix a typo in the OMIT_AUTORIZATION in expr.c. (CVS 3518)
FossilOrigin-Name: 3dea7fbefdadb269e58ae76bb9a7281c96d8b15b
2006-11-23 11:59:13 +00:00
drh
600123299e Make the pager sector size configurable at compile-time. (CVS 3517)
FossilOrigin-Name: 6221cf4f52e79f53043b7c10daedf2755d8fb167
2006-11-23 11:58:44 +00:00
drh
b62c335ed6 Add performance tests to the test suite. (CVS 3516)
FossilOrigin-Name: 270c745dffad7aa24f8707720b3d68ad7a6b2749
2006-11-23 09:39:16 +00:00
drh
45e29d8a1e Fix the ".dump" command in the shell. Ticket #2072. Also ticket #2065. (CVS 3515)
FossilOrigin-Name: 9fdc249609a4745715a2bf49bbf1376ea243a20a
2006-11-20 16:21:10 +00:00
drh
c28e3a1828 Make sure VACUUM cleans up after itself. Ticket #2071. (CVS 3514)
FossilOrigin-Name: 2fdc147d0059dcdfff2da33bd9fedb0bee057aa1
2006-11-18 20:20:21 +00:00
shess
f72442be68 Store minimal terms in interior nodes. Whenever there's a break
between leaf nodes, instead of storing the entire leftmost term of the
rightmost child, store only that portion of the leftmost term
necessary to distinguish it from the rightmost term of the leftmost
child. (CVS 3513)

FossilOrigin-Name: f6e0b080dcfaf554b2c05df5e7d4db69d012fba3
2006-11-18 00:12:44 +00:00
shess
9e6a561554 Refactoring groundwork for coming work on interior nodes. Change
LeafWriter to use empty data buffer (instead of empty term) to detect
an empty block.  Code to validate interior nodes.  Moderate revisions
to leaf-node and doclist validation.  Recast leafWriterStep() in terms
of LeafWriterStepMerge(). (CVS 3512)

FossilOrigin-Name: f30771d5c7ef2b502af95d81a18796b75271ada4
2006-11-17 21:12:15 +00:00
shess
de163af26e Delta-encode docids. This is good for around 22% reduction in index
size with DL_POSITIONS.  It improves performance about 5%-6%. (CVS 3511)

FossilOrigin-Name: 9b6d413d751d962b67cb4e3a208efe61581cb822
2006-11-13 21:09:24 +00:00
shess
debbcdfead Require a minimum fanout for interior nodes. This prevents cases
where excessively large terms keep the tree from finding a single
root.  A downside is that this could result in large interior nodes in
the presence of large terms, which may be prone to fragmentation,
though if the nodes were smaller that would translate into more levels
in the tree, which would also have that problem. (CVS 3510)

FossilOrigin-Name: 64b7e3406134ac4891113b9bb432ad97504268bb
2006-11-13 21:00:54 +00:00
shess
545311eeca Allow backing tables to be missing on dropping fts table. Fixes
http://www.sqlite.org/cvstrac/tktview?tn=1992,35 . (CVS 3509)

FossilOrigin-Name: 9628a61a6f33b7bec3455086534b76437d2622b4
2006-11-13 20:15:27 +00:00
aswift
448aa6f71a The uninitialized file descriptor from the unixFile structure is passed to sqlite3DetectLockingStyle in allocateUnixFile rather than the file descriptor passed in. This was causing the locking detection on NFS file systems to behave somewhat randomly and the result was locks were not respected and data loss could occur. (CVS 3508)
FossilOrigin-Name: b9dd16ef3df0785d8d0eea9a6f2ad580a7289834
2006-11-11 01:31:58 +00:00
drh
1fe336f69c Update the documentation to talk about the new sqlite3_prepare_v2() API. (CVS 3507)
FossilOrigin-Name: d9e14b6121a7b6786cccafd6e1e83474554632aa
2006-11-09 15:18:00 +00:00
drh
b900aaf34a First cut at adding the sqlite3_prepare_v2() API. Test cases added, but
more testing would be useful.  Still need to update the documentation. (CVS 3506)

FossilOrigin-Name: f1efae9224170c9155afcf17ab3ee769a557b874
2006-11-09 00:24:53 +00:00
drh
47ad6840f5 Make the .exit and .quit commands work again in the shell. Ticket #2056. (CVS 3505)
FossilOrigin-Name: f39978ef13e986a16ee322ee84ab9bd38ffc5a8b
2006-11-08 12:25:42 +00:00
drh
f4fa85826f Fix a typo in os_win.c. Ticket #2055. (CVS 3504)
FossilOrigin-Name: d309680ec7a806d181b601e0105aebf1e33bfb81
2006-11-07 15:02:07 +00:00
drh
551b77365e Use the difference between the SQLITE_IOERR_SHORT_READ and SQLITE_IOERR_READ
returns from sqlite3OsRead() to make decisions about what to do with the
error. (CVS 3503)

FossilOrigin-Name: 6324ea811eec1200cee89e6f377368eaf2fcda77
2006-11-06 21:20:25 +00:00
drh
382765866b Fix a bug in the optimizer that was causing it to miss an OR optimization
opportunity. (CVS 3502)

FossilOrigin-Name: 9bf153b54c6e9ba16914dedd9e2949f32d7550ea
2006-11-06 15:10:05 +00:00
drh
0a9e376c55 Modify Makefile.in to install sqlite3ext.h. (CVS 3501)
FossilOrigin-Name: 35c8c4781736d45019d8b823b8517c24622d3313
2006-11-01 12:20:16 +00:00
drh
e804cebacc Remove dead code from btree.c. Ticket #2050. (CVS 3500)
FossilOrigin-Name: dbd0125c62457681689db48e1f0a752767855773
2006-11-01 12:08:40 +00:00
drh
fd288f3549 Change the default temp file prefix to be "sqlite" spelled backwards.
Tickets #2049 et al. (CVS 3499)

FossilOrigin-Name: a19ce5c1c4e86d141f7e04af6babeb2ecb75b523
2006-10-31 21:27:33 +00:00
drh
79de864cd1 Change the default prefix for temporary files so that it no longer
contains the text "sqlite".  In this way, perhaps we will not get so
many false bug reports such as ticket #2049, #1989, and #1841. (CVS 3498)

FossilOrigin-Name: 7ce48000bb0dafda8a171bfc040dfe2300f84ed2
2006-10-31 21:16:48 +00:00
shess
aedbce0376 Fix a pair of memory leaks. These were turned up by running valgrind
memcheck with various 10k doc insert, update, delete, and query tests. (CVS 3497)

FossilOrigin-Name: 3cd9b64b96018f69163ad0be0b5c07dd1be6abc6
2006-10-31 18:13:42 +00:00
drh
2e7568f237 Make the command-line shell ".dump" command more resilient in the face of
database corruption. (CVS 3496)

FossilOrigin-Name: ebd44f0b5e229b990910bb44565de9a5c06cb5bc
2006-10-31 18:08:27 +00:00
drh
371de5ad8b Changes to support non-ASCII characters in win95 filenames.
Ticket #2047. (CVS 3495)

FossilOrigin-Name: 9fa3ae584ae4936696fd2f23a64697f0409ef313
2006-10-30 13:37:22 +00:00
drh
50b3996899 Enhance the optimizer so that IS NULL can use an available index. (CVS 3494)
FossilOrigin-Name: 64762a9d582e4655d6bc5989d8e0ad773d659a7d
2006-10-28 00:28:09 +00:00
drh
89b5cad3c2 Fix the ".dump" command in the command-line shell so that it shows
TRIGGERs and VIEWs.  Ticket #2044. (CVS 3493)

FossilOrigin-Name: 58171a41f706dd2fab1da5d83d2176d0103643fb
2006-10-27 14:21:54 +00:00
drh
0660e26efe Changes directed toward optimizing IS NULL terms in WHERE clauses. (CVS 3492)
FossilOrigin-Name: 4d336e9ef5f65b95959e7d01cd0357d46e9b1fa5
2006-10-27 14:06:57 +00:00
drh
c49f44eff1 Bring CVS output into more commonly accepted practice. Tickets #2030, #1573.
Add command-line options -bail and ".bail" commands.  Default behavior is
to continue after encountering an error.  Ticket #2045. (CVS 3491)

FossilOrigin-Name: 517712d6fbc5ba5299942a54852298030f4d3381
2006-10-26 18:15:42 +00:00
drh
c28490c056 Command-line shell enhancements. Bail out when errors are seen in
non-interactive mode.  Override isatty() using -interactive or -batch
command-line options.  Report line number in error messages.
Tickets #2009, #2045. (CVS 3490)

FossilOrigin-Name: 3baa04cfb91039e27f642f6f78ef761b5770cb08
2006-10-26 14:25:58 +00:00
shess
93d2a81401 Empty queries should get no results. My recent change
( http://www.sqlite.org/cvstrac/chngview?cn=3486 ) broke test fts2a-5.3.
This change should make the expected result more obvious. (CVS 3489)

FossilOrigin-Name: cde383eb467de0d752e94a22cd2f890c2dc599cc
2006-10-26 00:41:51 +00:00
shess
9d5586fc9f Make memset() uses less error-prone.
http://www.sqlite.org/cvstrac/tktview?tn=2036,35 describes some cases
where we were passing memset() a length which was the sizeof a
pointer, rather than the structure pointed to.  Instead, wrap this
idiom up in CLEAR() and SCRAMBLE() macros. (CVS 3488)

FossilOrigin-Name: 5878add0839f9c5bec77caae2361ec20cb60b48b
2006-10-26 00:04:31 +00:00
shess
627a74c48c Remove unreferenced local variable. (CVS 3487)
FossilOrigin-Name: 2d3b22197c7c06488b789cce333b34b6d1ae39aa
2006-10-25 23:22:03 +00:00
shess
87f1d16bdb Replace the DocList and DocListReader structures. The new structures
distinguish reading from a static buffer from writing to a dynamic
buffer.  This allows n-way doclist merging, and in-place merging of
segment leaf nodes, which together cut segment merge times in half. (CVS 3486)

FossilOrigin-Name: af5bfb986e39248abbfc6fff2e13c6f9e634a751
2006-10-25 21:00:09 +00:00
shess
d5d63ca6a3 Test to force edge cases in query logic. Basically, exercise code to
handle lack of hits correctly. (CVS 3485)

FossilOrigin-Name: 2cb59033662f25677169e2e63b871fb0a4c10c21
2006-10-25 20:27:39 +00:00
shess
9289cba076 Don't store empty segments. When inserting empty strings, the code
was writing out a segment made up of a single leaf node containing the
\0 header.  LeafReader assumed that leaf nodes always contained at
least one term, so assertions would fail.

While it would be possible to support reading and merging empty
segments, there's no reason to do so.  While this change could have
been done in writeZeroSegment(), I put it in leafWriterFlush() so that
it would work right if segmentMerge() created an empty segment, which
could happen with future changes to how deleted documents are handled. (CVS 3484)

FossilOrigin-Name: fed79beec7da24a26ae94494bdc0c98dd102bc06
2006-10-25 05:21:55 +00:00
shess
8e734e3518 dup fts1 tests and edit for fts2. fts1porter.test omitted because it
depends on being able to poke through to %_term table. (CVS 3482)

FossilOrigin-Name: 2806c3415841b98d52163fa672a747d0a47ffd41
2006-10-19 23:36:25 +00:00
shess
1c5f160762 Add tests for delete and update in fts1. (CVS 3481)
FossilOrigin-Name: b01c4371d861a087623a34c38cb8db74eca95348
2006-10-19 23:28:35 +00:00
shess
a26cf57782 fts2 support for testing. These are a prelude to adding some test
scripts. (CVS 3480)

FossilOrigin-Name: 004ad1943f8c5933ee9584a57b2de9d421470d3c
2006-10-19 20:27:58 +00:00
drh
b3fa0e0146 When converting UTF8 or UTF16 strings, change overlong strings and other
illegal codes to 0xFFFD.  Ticket #2029. (CVS 3479)

FossilOrigin-Name: 0c6736df9cb4c3c8f6224e30df939cead9cd5369
2006-10-19 01:58:43 +00:00
drh
28f4591466 Fix a problems that arise if malloc() fails while compiling SELECT
statements within a TRIGGER. (CVS 3478)

FossilOrigin-Name: ee4894b49995e4904db1991281563cfbb7b1c16d
2006-10-18 23:26:38 +00:00
drh
f6bbe022c7 Make sure the names of all expressions in compound SELECT statements used
as subqueries are correctly resolved.  Ticket #2018. (CVS 3477)

FossilOrigin-Name: b886eaa334150262ce4d1a1d0470ca4cf623a396
2006-10-13 15:34:16 +00:00
drh
5048962a0f Avoid expanding %d contained in the action of a lemon parser rule.
Ticket #1063.  This is a fix for lemon only.  It does not effect SQLite. (CVS 3476)

FossilOrigin-Name: 81daedcf48372949b9df009ce6121a514ecf6f2e
2006-10-13 12:25:29 +00:00
drh
d9033a6569 Removing debugging printf from the porter stemmer code. Ticket #2016. (CVS 3475)
FossilOrigin-Name: 7a08c6272f76d53b13313019b4f9da3c8f02b650
2006-10-13 11:55:39 +00:00
shess
8a235d4d3b Convert fts2 to store data in a way which allows for much faster
updates.  Groups of documents form segments which are encoded in a
btree layered over a table of blocks, with various tricks to make
merges fast.  This performs 20x-25x faster than fts1 when loading the
Enron corpus, and is only slightly slower for queries. (CVS 3474)

FossilOrigin-Name: 85272b2f5394e37916afb1d509e7296810d976f5
2006-10-12 23:15:24 +00:00
aswift
108bc320f9 Bug fix: named local variable lockStyle as lockingStyle in SQLITE_ENABLE_LOCKING_STYLE block in allocateUnixFile (CVS 3473)
FossilOrigin-Name: aa0b96c3dfa1d8008cd944281c227604b2ee16d1
2006-10-11 17:19:46 +00:00
shess
0d6e29b832 Fix leaky symbols. With this change, fts1 and fts2 can both be
statically linked. (CVS 3472)

FossilOrigin-Name: 5e8bbb85c1493e3ab2d807d24c68294f26838e49
2006-10-10 23:22:40 +00:00
shess
2670a173ed Copy fts1/ to fts2/, changing reference from fts1 to fts2. For future
reference, the source versions copied were:

README.txt r1.1
fts1.c r1.37
fts1.h r1.2
fts1_hash.c r1.1
fts1_hash.h r1.1
fts1_porter.c r1.1
fts1_tokenizer.h r1.4
fts1_tokenizer1.c r1.6 (CVS 3471)

FossilOrigin-Name: d0d1e7cdcc1dd085f1e359ce35c441699d517b02
2006-10-10 17:37:14 +00:00
drh
0058d84432 VACUUM now uses a temporary file in the official TEMP folder instead of
a file in the same directory as the original database. (CVS 3470)

FossilOrigin-Name: b743429dd54e2dcae213ec1993e9e916a9ba678d
2006-10-10 13:07:36 +00:00
drh
1c50296188 Version 3.3.8 (CVS 3469)
FossilOrigin-Name: 0658bb9e3f57e6aff4745590821a0590abc815f6
2006-10-09 00:38:41 +00:00
drh
383736b7c9 Website changes for version 3.3.8. Remove a C++-ism from test8.c. (CVS 3468)
FossilOrigin-Name: 465ce5b2fe4462191dd02672838f3f903cd0f976
2006-10-08 18:56:57 +00:00
shess
9f4683cd42 Fix incorrect doclist initialization in term_select_all().
docListRestrictColumn() generates a DL_POSITIONS doclist, which means
that after the first doclist is processed, the second doclist is
initialized as DL_POSITIONS, but with DL_POSITIONS_OFFSETS data.
(Note that DL_DEFAULT is now DL_POSITIONS, which masks this bug.) (CVS 3467)

FossilOrigin-Name: 144e3f11e22c6efd6f2d960599ab2d93542db406
2006-10-05 21:48:56 +00:00
drh
bb2abb2c09 Fix another UTF conversion problem on x64. Ticket #2008. (CVS 3466)
FossilOrigin-Name: d16523e555afa1e6e89409f614fd665261fa3865
2006-10-05 11:43:53 +00:00
drh
53c36d5444 The snippet generator adds ellipsis between text from different columns. (CVS 3465)
FossilOrigin-Name: 6cf1fb9f801dc1b2865c0d1f9afb1b2076d4246e
2006-10-04 17:35:28 +00:00
drh
a39f4c5c8b Fix UTF conversions for -O2 on gcc 4.1.1. Ticket #2008. (CVS 3464)
FossilOrigin-Name: 86a08bb7c5da42fbeb5a026287d67912a2ffb7f1
2006-10-04 15:23:21 +00:00
drh
d9910fe529 Tests cases automatically remove many of their temporary files. (CVS 3463)
FossilOrigin-Name: eef0ec0d7ae0743d29454567f539e46ad2d5008e
2006-10-04 11:55:49 +00:00
drh
b1b6d4a929 Make DL_POSITION the default mode in FTS1. Remove the need to compile
with SQLITE_CORE when SQLITE_ENABLE_FTS1 is used. (CVS 3462)

FossilOrigin-Name: df1a4b4834fdc88056371bcc767c5dfde2eaab72
2006-10-03 19:37:37 +00:00
drh
0c97940da6 Modify the makefile(s) to know about the FTS1 module - however FTS1 is
turned off by default.  Bump the version number to 3.3.8. (CVS 3461)

FossilOrigin-Name: 288ff63783725a5d8f86b6171473bb4ae3c4e37b
2006-10-03 19:12:32 +00:00
drh
fa7d4acf0b Report the error SQLITE_CORRUPT instead of SQLITE_IOERR if unable
to rollback a hot journal that was damaged (for example) by filesystem
corruption following a power failure. (CVS 3460)

FossilOrigin-Name: 70501e4ea588ed762e4f6bc211ce63397faa3367
2006-10-03 19:05:18 +00:00
drh
bfe6631e7a Add the OS-X locking style patches to os_unix.c. Disabled by default. (CVS 3459)
FossilOrigin-Name: f4103dea5e1a87adccccca715946e174d1cc7450
2006-10-03 17:40:40 +00:00
drh
35c12830d1 Fix sqlite3_analyzer so that it works when compiled against Tcl8.5. (CVS 3458)
FossilOrigin-Name: e774adce8e461a70ead9474cd64cb05c2d633eb9
2006-10-03 12:08:54 +00:00
drh
f316c8c08b Fix sqlite3_analyzer so that it works on databases containing virtual tables. (CVS 3457)
FossilOrigin-Name: 47c8567fcb6b184ca13fcb67f80d261205c66fc8
2006-10-03 12:04:11 +00:00
drh
d75e03df2b Add the option to omit offset information from posting lists in FTS1. (CVS 3456)
FossilOrigin-Name: fdcea7b1ffd821f3f2b6d30997d3957f705a6d0c
2006-10-03 11:42:28 +00:00
drh
f02a759980 Another typo in the Porter stemmer check-in. (CVS 3455)
FossilOrigin-Name: 6696bda11ccad9663b15206592116d638aa3ff0a
2006-10-01 20:41:03 +00:00
drh
b3be9815a1 Typo in previous check-in. (CVS 3454)
FossilOrigin-Name: a7350bf86c41c428adbfe42dc9cbb3ecf0045c25
2006-10-01 18:59:56 +00:00
drh
8923c9d378 Remove one non-working test case fromthe Porter stemmer tests and add
an acknowledgement for the source of the test data (Martin Porter himself.) (CVS 3453)

FossilOrigin-Name: 1a2df2a61b3c84feae7587fa5b1eebf9c7e73daa
2006-10-01 18:58:31 +00:00
drh
6da40bcd79 Add a Porter stemmer option to the FTS1 module. (CVS 3452)
FossilOrigin-Name: 936b06aaa8133e83104de87e03dc94e286a31f86
2006-10-01 18:41:19 +00:00
drh
2564ef9781 Make sure memory does not leak when patching up column names so that
they are unique in a join or view.  Tickets #1952 and #2002. (CVS 3451)

FossilOrigin-Name: fcde639119c309c699ee9dd60ed60fd6e9c8c077
2006-09-29 14:01:04 +00:00
drh
7cf43fa64e Fix a bug in the handling of the OR operator in FTS1. Test cases added to
prevent a repeat. (CVS 3450)

FossilOrigin-Name: 8cdf1d6ae018dfc93f8f0962b2530e31aa0bebff
2006-09-28 19:43:31 +00:00
drh
07aa67c14a More snippet generator improvements and test cases. (CVS 3449)
FossilOrigin-Name: 0934d220b33c52024f42c89fa13326bd52333f39
2006-09-28 18:57:59 +00:00
drh
1e7423e57f Bug fix in the FTS1 snippet generator. Improvements in the way the snippet
generator handles whitespace. (CVS 3448)

FossilOrigin-Name: d3f4ae827582bd0aac54ae3211d272a1429b6523
2006-09-28 18:37:15 +00:00
drh
361e2bdeb5 Avoid segfaults when inserted NULL values into FTS1. (CVS 3447)
FossilOrigin-Name: 165645d30115f3171fc45489823f85639fe2bfcd
2006-09-28 11:41:41 +00:00
drh
6f68a5cf11 Fix to the previous check-in. (CVS 3446)
FossilOrigin-Name: 944d5f812004e2dc0065fce267accf8907235a50
2006-09-26 00:37:11 +00:00
drh
50c2b35ea7 Performance improvement and bug fix in sqlite3WinDelete(). (CVS 3445)
FossilOrigin-Name: 46ac1ac2d10cf2f1ebfb8dd4bb9a2ccffd85e816
2006-09-26 00:34:17 +00:00
drh
7f986a651e CVS malfunctioned on the previous check-in. Make sure the revision to
date.c was received.  Ticket #1991. (CVS 3444)

FossilOrigin-Name: 433dac1f2924d00282ef952668b21a9c023c93cb
2006-09-25 18:05:04 +00:00
drh
9df9492adc Fix a roundoff error in the %f converter of strftime(). Ticket #1991. (CVS 3442)
FossilOrigin-Name: 51b9c755ea01528e32690aabe91236ed917369f1
2006-09-25 18:03:28 +00:00
drh
21e2cab932 Add a pragma for activating proprietary extensions. (CVS 3441)
FossilOrigin-Name: c63d34ce0c7412852fdcf047bc388d2f9710f297
2006-09-25 18:01:57 +00:00
drh
b1f1e6ebd7 Fix a round-off problem in the %f conversion of strftime(). Ticket #1991. (CVS 3443)
FossilOrigin-Name: bf4608406a3246fe7a214cb31b79e51f86b7ee18
2006-09-25 18:01:31 +00:00
drh
6f8359865d Bug fix in pragma table_info(). (CVS 3440)
FossilOrigin-Name: c037403bae0d78f9dd2703ff05cc3cd3ac54e062
2006-09-25 13:48:30 +00:00
drh
2e584cd250 Remove legacy cruft from shell.c. (CVS 3439)
FossilOrigin-Name: 815d8f84b317d26a3ca87405d27376e1e4493d8b
2006-09-25 13:09:22 +00:00
drh
aac2f5542d Fix a bug in the handling of I/O errors introduced by the addition
of extended error codes in check-in (3422). (CVS 3438)

FossilOrigin-Name: 20d7b29443ea7d9ec1ef81219c74ba725e8711e3
2006-09-23 21:44:23 +00:00
drh
8c77bdde9f Fix documentation typo. Ticket #1986 (CVS 3437)
FossilOrigin-Name: 58c32ce35a04838b4a8e4210299bac935e60bfb9
2006-09-23 20:46:23 +00:00
drh
ece3c728d0 Be sure to ignore PRAGMA encoding pragmas if the encoding has already been
set for a database.  Ticket #1987.  This patch also includes some cleanup
of the schema parser and initialization logic. (CVS 3436)

FossilOrigin-Name: dc797bf4fa96deabd9ceb6cc062b98d2ac49a574
2006-09-23 20:36:01 +00:00
shess
7409310ac3 Fix a build problem around sqlite3_overload_function. Only affects
so/dll builds. (CVS 3435)

FossilOrigin-Name: 791d70936b9c4fed57c95f61e3b4dfdd24221ee4
2006-09-22 23:38:21 +00:00
adamd
adf52ce14b Implemented UPDATE for full-text tables.
We handle an UPDATE to a row by performing an UPDATE on the content table and by building new position lists for each term which appears in either the old or new versions of the row.  We write these position lists all at once; this is presumably more efficient than a delete followed by an insert (which would first write empty position lists, then new position lists). (CVS 3434)

FossilOrigin-Name: 757fa22400b363212b4d5f648bdc9fcbd9a7f152
2006-09-22 00:06:39 +00:00
adamd
f40a504164 When gathering a doclist for querying, don't discard empty position lists until the end; this allows empty position lists to override non-empty lists encountered later in the gathering process. This fixes #1982, which was caused by the fact that for all-column queries we weren't discarding empty position lists at all. (CVS 3433)
FossilOrigin-Name: 111ca616713dd89b5d1e114de29c83256731c482
2006-09-21 20:56:52 +00:00
drh
154d4b2446 Be more aggressive with the SQLITE_OMIT_VACUUM macro. Saves about 150
bytes of code space. (CVS 3432)

FossilOrigin-Name: 7e618db4579d752cc6d775c664c93e141217948f
2006-09-21 11:02:16 +00:00
drh
8b62817797 Implementation of the snippet() function for FTS1. Includes a few
simple test cases but more testing is needed. (CVS 3431)

FossilOrigin-Name: c7ee60d00976efab25a830e7416538010c734129
2006-09-21 02:03:08 +00:00
adamd
d47522807e Fixed a build problem in sqlite3_extension_init(). (CVS 3430)
FossilOrigin-Name: bb2e1871cb10b470f96c793bb137c043ef30e1da
2006-09-18 21:14:40 +00:00
drh
c1daee8574 Convert all names to lower case before sending them to the xFindFunction
method of a virtual table.  In FTS1, use strcmp instead of strcasecmp.
Ticket #1981. (CVS 3429)

FossilOrigin-Name: cd4e1de896ef715c444071f758b74dbb607e0572
2006-09-18 20:24:02 +00:00
drh
a70034de7c Convert all names to lower case before sending them to the xFindFunction
method of a virtual table.  In FTS1, use strcmp instead of strcasecmp.
Ticket #1981. (CVS 3428)

FossilOrigin-Name: efa8fb32a596c7232bb1754b3231e4f2421df75b
2006-09-18 20:24:02 +00:00
drh
b08249ced3 Modify FTS1 so that the "magic" column has the same name as the virtual
table.  Offsets are retrieved using a special "offsets" function whose
first argument is the magic column.  Snippets will ultimately be retrieved
in the same way. (CVS 3427)

FossilOrigin-Name: 5e35dc1ffadfe7fa47673d052501ee79903eead9
2006-09-18 02:12:47 +00:00
drh
b7481e70c5 Add the sqlite3_overload_function() API - part of the virtual table
interface. (CVS 3426)

FossilOrigin-Name: aa7728f9f5b80dbb1b3db124f84b9166bf72bdd3
2006-09-16 21:45:14 +00:00
drh
572d11dc8f Add documentation for the sqlite3_extended_result_codes() API. (CVS 3425)
FossilOrigin-Name: a6b3f6bed209dc27d36cd4e159159f73266e9911
2006-09-15 16:58:48 +00:00
drh
ae2f2048df Fix an initialization problem in FTS1. Ticket #1977. (CVS 3424)
FossilOrigin-Name: 5a18dd88498ca35ca1333d88c4635868d0b61073
2006-09-15 16:08:59 +00:00
drh
e49f982792 Bug fix and better testing of the extended result codes. (CVS 3423)
FossilOrigin-Name: 78ae74db1cbf605cd421e7ea321e879d3638968e
2006-09-15 12:29:16 +00:00
drh
4ac285a1c2 Add support for extended result codes - additional result information
carried in the higher bits of the integer return codes.  This must be
enabled using the sqlite3_extended_result_code() API.  Only a few extra
result codes are currently defined. (CVS 3422)

FossilOrigin-Name: ba579ddc4361fc6e8ea66f9385770d70dfe94751
2006-09-15 07:28:50 +00:00
drh
8abc58e33b New FTS1 test data based on enron emails. (CVS 3421)
FossilOrigin-Name: 01651a32c6e67c4ac2cd23f1da7f3cc3adad1b33
2006-09-14 21:08:54 +00:00
drh
dddaf9ff86 Remove file containing real email addresses. Ticket #1978. (CVS 3420)
FossilOrigin-Name: 373a575f745dc2002090328f30539bbfef3119d5
2006-09-14 18:25:28 +00:00
adamd
4fc9308373 Minor build fixes. (CVS 3419)
FossilOrigin-Name: 3564b07c40ab4563482a9aa36850757963f44238
2006-09-14 16:57:19 +00:00
drh
5968593b51 Enhanced I/O error simulation. (CVS 3418)
FossilOrigin-Name: 86931854fc5a63571719639d9a23b1d6614a6153
2006-09-14 13:47:11 +00:00
drh
f800e3e63a The FTS1 tables have a new automatic column named "offset" that returns
a string containing byte offset information for all matching terms.
Also added a large test case based on SQLite mailing list entries. (CVS 3417)

FossilOrigin-Name: f25cfa1aec0e4c1fe07176039a1b7f4e6a2c66ec
2006-09-14 01:17:30 +00:00
drh
0b9a594ae1 Modify the ".dump" command in the command-line shell so that it works
with virtual tables. (CVS 3416)

FossilOrigin-Name: afd40184b752f641b423ceffac2476f2cfbdfd31
2006-09-13 20:22:02 +00:00
drh
235a818e61 Remove unused malloc failure test. (Ticket #1976)
Also include fixes for other problems
discovered while investigating ticket #1976. (CVS 3415)

FossilOrigin-Name: f4ab546b2e8105422fb1baa2b86e688b5d19f20e
2006-09-13 19:21:28 +00:00
drh
8f116cc15c In FTS1: Retain the Query structure as part of the cursor. It will be used
laster as part of snippet generation. (CVS 3414)

FossilOrigin-Name: 607d928ce91f3efa9c7019fc789a9cd3c41cfc92
2006-09-13 19:18:29 +00:00
shess
c48f2a10aa Earlier refactoring changed name in fts1.c but not fts1.h. (CVS 3413)
FossilOrigin-Name: d4edb8035c8abbdb301893557934dd644ef3c950
2006-09-13 18:40:25 +00:00
drh
1de6154d39 Minor code cleanup in FTS1. (CVS 3412)
FossilOrigin-Name: fca592816767de397fbaf22cccdf1028fc5dfc91
2006-09-13 17:17:48 +00:00
drh
a3baa963bc Implementation of "column:" modifiers in FTS1 queries. (CVS 3411)
FossilOrigin-Name: 820634f71e3a3499994f82b56b784d22a7e3cdcf
2006-09-13 16:02:43 +00:00
drh
cbaac514bc Module spec parser enhancements for FTS1. Now able to cope with column
names in the spec that are SQL keywords or have special characters, etc.
Also added support for additional control lines.  Column names can be
followed by a type specifier (which is ignored.) (CVS 3410)

FossilOrigin-Name: adb780e0dc8bc7dcd1102efbfa4bc17eefdf968e
2006-09-13 15:20:13 +00:00
drh
a6be0dc938 Fix the FTS1 test cases and add new tests. Comments added to the FTS1 code. (CVS 3409)
FossilOrigin-Name: 528036c828c93c78ca879bf89a52131b72e24067
2006-09-13 12:36:08 +00:00
adamd
4f1a424e72 Allow virtual tables to contain multiple full-text-indexed columns. Added a magic column "_all" which can be used for querying all columns in a table at once.
For now, each posting list stores position/offset information for multiple columns.  We may implement separate posting lists for separate columns at some future point. (CVS 3408)

FossilOrigin-Name: 366a70b086c817bddecd83053472ec76ef20f309
2006-09-13 02:18:20 +00:00
adamd
341d60838c Answer queries for a particular rowid in a full-text table by looking up
that rowid directly rather than by performing a table scan. (CVS 3407)

FossilOrigin-Name: 877d5558b1a6f65201b1825336935b146583bffa
2006-09-12 23:36:45 +00:00
drh
fdd48a76a6 Add support for IF EXISTS on CREATE/DROP TRIGGER/VIEW. Ticket #1899. (CVS 3406)
FossilOrigin-Name: e4fe736cfbbdc081581911a01690576034877b72
2006-09-11 23:45:48 +00:00
shess
4240240f12 Re-use deleted rowids for new segments. This has a somewhat
surprising impact on performance, I believe because it keeps the index
smaller (by keeping rowids smaller), and also because it improves
locality in the table (deleting a row means we've already touched the
pages leading to that rowid). (CVS 3405)

FossilOrigin-Name: 2f5f6290c9ef99c7b060aecc4d996c976c50c9d7
2006-09-11 21:39:21 +00:00
drh
66b224cbb0 Get VACUUM working with virtual tables. (CVS 3404)
FossilOrigin-Name: d5ffef3870f06d2dd744ce9470d3c0e68062e804
2006-09-11 11:13:26 +00:00
drh
e410296021 Add a rudimentary tokenizer and parser to FTS1 for parsing the module
arguments during initialization.   Recognized arguments include a
tokenizer selector and a list of virtual table columns. (CVS 3403)

FossilOrigin-Name: 227dc3feb537e6efd5b0c1d2dad40193db07d5aa
2006-09-11 00:34:22 +00:00
drh
4ca8aac2b4 Add pzErr parameters to the xConnect and xCreate methods of virtual tables
in order to provide better error reporting.  This is an interface change
for virtual tables.  Prior virtual table implementations will need to be
modified and recompiled. (CVS 3402)

FossilOrigin-Name: f44b8bae97b6872524580009c96d07391578c388
2006-09-10 17:31:58 +00:00
drh
fe1368ee08 Add a new zErrMsg field to the sqlite3_vtab structure to support returning
error messages from virtual table constructors.  This change means that
virtual table implementations compiled as loadable extensions for version
3.3.7 will need to be recompile for version 3.3.8 and will not be usable
by both versions at one.  The virtual table mechanism is still considered
experimental so we feel justified in breaking backwards compatibility
in this way.  Additional interface changes might occurs in the future. (CVS 3401)

FossilOrigin-Name: 36693a5cb72b4363010f9ab0866e1f7865f65275
2006-09-10 17:08:29 +00:00
drh
a2a9d18869 Add some simple test cases for the OR and NOT logic of the fts1 module.
Fix lots of bugs discovered while developing these test cases. (CVS 3400)

FossilOrigin-Name: 70bcff024b44d1b40afac6eba959fa89fb993147
2006-09-10 03:34:06 +00:00
drh
a7e98f2a54 Add support for OR and NOT terms in fts1. (CVS 3399)
FossilOrigin-Name: ae50265791d1a7500aa3c405a78a9bca8ff0cc08
2006-09-09 23:11:51 +00:00
shess
fb6794360d Write doclists using a segmented technique to amortize costs better.
New items for a term are merged with the term's segment 0 doclist,
until that doclist exceeds CHUNK_MAX.  Then the segments are merged in
exponential fashion, so that segment 1 contains approximately
2*CHUNK_MAX data, segment 2 4*CHUNK_MAX, and so on. (CVS 3398)

FossilOrigin-Name: b6b93a3325d3e728ca36255c0ff6e1f63e03b0ac
2006-09-08 17:00:17 +00:00
drh
8759576540 Add HAVE_GMTIME_R and HAVE_LOCALTIME_R flags and use them if defined.
Unable to modify the configure script to test for gmtime_r and
localtime_r, however, because on my SuSE 10.2 system, autoconf generates
a configure script that does not work.  Bummer.  Ticket #1906 (CVS 3397)

FossilOrigin-Name: 862302eaae7bdad6f1b6431f08439c4ce7e0e4bb
2006-09-08 12:49:43 +00:00
drh
f11c34df74 Bug fix in date/time computations. Ticket #1964.
Some unrelated comment typos are also fixed and got accidently
checked in at the same time. (CVS 3396)

FossilOrigin-Name: c81eaa0dc9a327d222e066076c4a2da5e69d8c21
2006-09-08 12:27:36 +00:00
drh
b3556f3d71 Improvements to the documentation of the return codes for sqlite3_step().
Tickets #1633, #1366, #1178, #906, and probably others too. (CVS 3395)

FossilOrigin-Name: 508248e783dc1e3da3695b28467ca3b79629e582
2006-09-08 11:56:30 +00:00
adamd
2e8464afdb Include io.h on Windows to quell a build warning about access() having no prototype. (CVS 3394)
FossilOrigin-Name: b3eb1732bd529b14bef1872171a3c6429e209d31
2006-09-06 21:39:40 +00:00
adamd
338565ad4b A minor change to fts1.c to fix broken build. (CVS 3393)
FossilOrigin-Name: 55a03b96251515a4817a0eefb197219a460640e7
2006-09-05 18:21:31 +00:00
drh
b2b4996280 Fix a bug in the new misc6.test script. Fix error messages when not
compiled with memory debugging enabled.  Ticket #1957. (CVS 3392)

FossilOrigin-Name: 9fb92024bf5058bdc32066a0d07b93da575779fa
2006-09-04 18:54:14 +00:00
drh
f0313813ec Make sure strings returned by sqlite3_value_text() and sqlite3_value_text16()
are always '\000'-terminated. (CVS 3391)

FossilOrigin-Name: 2c63588b45f4e1ab9b9f1b72c901f3800433424a
2006-09-04 15:53:53 +00:00
drh
f80ad49f72 Fix bugs in test scripts so that fulltest will pass. (CVS 3390)
FossilOrigin-Name: 367bd8376f323beb3148eab86ada1a3cb379ba3b
2006-09-02 22:14:59 +00:00
drh
79dc6691de Changes to the Makefile.in so that MinGW users can build a DLL. Ticket #1955. (CVS 3389)
FossilOrigin-Name: 7279ddd08444d54712f738d997c5d11f6af064c1
2006-09-02 22:14:11 +00:00
drh
fb52cc95ff Add a TRACE macro to the FTS1 module for troubleshooting. Turned off by
default. (CVS 3388)

FossilOrigin-Name: d4923e98c66ae03d899f633e5e309471f5695abb
2006-09-02 20:58:25 +00:00
drh
189d4afaaf Do not call the xDisconnect method on a virtual table while xUpdate is
pending.  Instead, defer the xDisconnect until after xUpdate completes. (CVS 3387)

FossilOrigin-Name: 61148f4c36255c4ed3552f888fa75252b300589d
2006-09-02 20:57:52 +00:00
drh
80788d8b65 Test for busted TCL builds that do not support 64-bit integers and print
a warning message to users that test failures may be a result of the bad
TCL build and not some problem with SQLite.  Ticket #1953. (CVS 3386)

FossilOrigin-Name: ca864ee913ea5ae88761e617bcac300ffa339369
2006-09-02 14:50:23 +00:00
drh
7c2d87cd71 Convert static variables into constants in the FTS module. (CVS 3385)
FossilOrigin-Name: 098cbafcd6dcf57142b0417e796d27ffddcc0920
2006-09-02 14:16:59 +00:00
drh
aa29c13579 Automatically register the FTS module if it is compiled into the build. (CVS 3384)
FossilOrigin-Name: 8a96bdb72439c0b337cbaa2d07897d0896ea3024
2006-09-02 13:58:06 +00:00
drh
37b9056ad8 Construct the .def files before calling dllwrap to build the .dll files.
Ticket #1951. (CVS 3383)

FossilOrigin-Name: e6e49a3811d4b26518026cc1692c654e8edbf741
2006-09-02 13:22:28 +00:00
adamd
9eb3997b02 Miscellaneous restructuring and cleanup based on suggestions from shess. (CVS 3382)
FossilOrigin-Name: e98b0cf292f6dc9deb6ae9b773c52b16867f7556
2006-09-02 00:23:01 +00:00
drh
3957781b1f Automatically compute the sqlite3.def and tclsqlite3.def files when
building windows DLLs.  This will (hopefully) keep the .def files in
perfect synchronization with the DLLs.  Ticket #1951. (CVS 3381)

FossilOrigin-Name: 1f6d79266a7f8d0e909e47d9858557e3f95407db
2006-09-01 17:06:20 +00:00
drh
9645d8d4b3 Remove use of the "clock" command in the test suite so that the tests
will run in Tcl8.5.  Ticket #1445. (CVS 3380)

FossilOrigin-Name: bedbac54db173ceb74bd78acd021209f28aa30a8
2006-09-01 15:49:05 +00:00
shess
b2f4d0173a Make fts1.c not rely on nul-terminated strings. Mostly a matter of
making sure we always pass around ptr/len, but there were a few places
where we actually relied on nul-termination.

An earlier change had additionally changed appropriate
sqlite3_bind_text() calls to sqlite3_bind_blob().  I've found that
this changes what's actually stored in the database, so backed those
changes out.  Also (and this is weird), I found that I could no longer
do straight-forward = queries against %_term.term at a command-line. (CVS 3379)

FossilOrigin-Name: 5844db1aa9c23a005c88104b084f68afb21891c7
2006-09-01 00:33:44 +00:00
shess
c0beb14f23 Make tokenizer not rely on nul-terminated text. Instead of using
strcspn() and a nul-terminated delimiter list, I just flagged
delimiters in an array and wrote things inline.  Submitting this for
review separately because it's pretty standalone. (CVS 3378)

FossilOrigin-Name: 2631ceaeefaca3aa837e3b439399f13c51456914
2006-09-01 00:05:17 +00:00
drh
5db455e7b5 Refactor the FTS1 module so that its name is "fts1" instead of "fulltext",
so that all symbols with external linkage begin with "sqlite3Fts1", and
so that all filenames begin with "fts1". (CVS 3377)

FossilOrigin-Name: e1891f0dc58e5498a8845d8b9b5b092d7f9c7003
2006-08-31 15:07:14 +00:00
shess
2b85d5f46e Just don't run tolower() on hi-bit characters. This shouldn't cause
us to break any UTF-8 code points, unless they were already broken in
the input. (CVS 3376)

FossilOrigin-Name: 6c77c2d5e15e9d3efed3e274bc93cd5a4868f574
2006-08-30 21:40:30 +00:00
drh
6fb1d6492e Bug fix: Get INSERT INTO ... SELECT working when the target is a virtual
table. (CVS 3375)

FossilOrigin-Name: 7cdc41e748c2d8f9e3d85c07143b8bc343bf2426
2006-08-29 18:46:14 +00:00
drh
16ed8a64f6 Bug fix: Get INSERT INTO ... SELECT working when the target is a virtual
table. (CVS 3374)

FossilOrigin-Name: 7912485705c96e365a942932bb12d5b9113c9885
2006-08-29 18:46:14 +00:00
drh
e07b862e71 Document the fact that SQLite allows NULL values in PRIMARY KEY columns
and the fact that we might design to change this in the future.
Ticket #518. (CVS 3373)

FossilOrigin-Name: b99d845ef4776595022c6fb855e582cfe6ef2f9f
2006-08-29 13:08:37 +00:00
drh
80e8be9337 Improved built-in help in the command-line shell. Enable the
fulltext search extension in the TCL interface. (CVS 3372)

FossilOrigin-Name: 9763b4bfd5f0579f9fb821899ffa8bfe650054d7
2006-08-29 12:04:19 +00:00
shess
c9e0a9057e Make static some symbols which shouldn't have been exported. (CVS 3371)
FossilOrigin-Name: 58006e38af760b53cf72bf127d7c7b8a619a1282
2006-08-28 23:46:01 +00:00
shess
4f4897e80d Make hi-bit characters delimiters. This is a stopgap until the tokenizer
and fulltext.c recognize UTF-8 correctly. (CVS 3370)

FossilOrigin-Name: ca850d3d80f67672172d11392fcdf60bfbb94c02
2006-08-28 20:08:56 +00:00
drh
aa5ac05b5f Add sqlite3_malloc and sqlite3_realloc to the sqlite3.def file. Ticket #1943. (CVS 3369)
FossilOrigin-Name: 4a74838eac5b939058c8aebef30113c5bdb354e5
2006-08-27 14:10:39 +00:00
drh
147d0ccc15 Add support for INSERT INTO ... DEFAULT VALUES. Tickets #299, #1940. (CVS 3368)
FossilOrigin-Name: bc84cb54b0df09738fd90e48820dc3cdfa7828c2
2006-08-25 23:42:53 +00:00
shess
0de250e46f Fix gcc gripe about parens in a ||/&& in mergePosList().
Drop unused pBlob/nBlob in index_insert_term().
Fix NULL deref in an assertion in docListUpdate() delete case.
Minor code tightening in docListUpdate(). (CVS 3367)

FossilOrigin-Name: a6fcf9101a831bf5f129c6045eabf30376d365dc
2006-08-25 19:20:26 +00:00
drh
b8b1421963 Documentation updates for the new SQLITE_FUNCTION authorization. (CVS 3366)
FossilOrigin-Name: e029637e54e190c89206725a99e1ee7db6c23804
2006-08-24 15:18:25 +00:00
drh
5169bbc6a3 Enhance the sqlite3_set_authorizer() callback so that it provides callbacks
on each SQL function that is invoked. (CVS 3365)

FossilOrigin-Name: 4547c81f7da29b1490c6eba8d9c333218c5cb88f
2006-08-24 14:59:45 +00:00
drh
882e8e4df2 Tcl interface does filename translation prior to calling sqlite3_open().
Ticket #1937. (CVS 3364)

FossilOrigin-Name: 5696e0cb771ea62df6f91cb03dfc428af1441e9e
2006-08-24 02:42:27 +00:00
adamd
1717edd157 A first implementation of a full-text search module for SQLite. (CVS 3363)
FossilOrigin-Name: b0d8e0d314d6f77b7d4b5dd00c694a1323f7a8e4
2006-08-23 23:58:50 +00:00
drh
1409be69aa Add the new experimental sqlite3_auto_extension() API. (CVS 3362)
FossilOrigin-Name: a85fc877eb8c92bbb79ac9b7fa91fb362f37cdf7
2006-08-23 20:07:20 +00:00
shess
ad42c3a352 Add argc as a default global to match standard tcl environment. (CVS 3361)
FossilOrigin-Name: 533154099c9fe1238705eea03aba388dd71dc35e
2006-08-22 23:53:46 +00:00
drh
fa9b4b1499 Add the ext/fts1 subdirectory for holding the first full-text search
extension. (CVS 3360)

FossilOrigin-Name: 7f152f9f3a647d30874f2da46ce93a1e31ea7cf3
2006-08-22 14:45:37 +00:00
drh
a7e18326c6 Fix bug in documentation. Ticket #1927. (CVS 3359)
FossilOrigin-Name: 90296bc8fa443833e6316c873dd18b951d3247f7
2006-08-19 13:32:05 +00:00
drh
bdf67e0efe Fix for the (unsupported) soundex algorithm so that it conforms to Knuth.
Ticket #1925.  Test cases added. (CVS 3358)

FossilOrigin-Name: 7810d1abf611ce40dd0de45610269359a8ca9222
2006-08-19 11:34:01 +00:00
drh
164a1b693f Improved method for finding the home directory under windows. Ticket #1926. (CVS 3357)
FossilOrigin-Name: 10907bb2011eefa306c0e6ee573b6dfe765c8631
2006-08-19 11:15:20 +00:00
drh
9bd41eaec7 Remove obsolete clause in the documentation. Ticket #1923. (CVS 3356)
FossilOrigin-Name: d4f182e5aa7163de3c692c9ce8dc9092d9d8de49
2006-08-16 22:58:49 +00:00
drh
980b1a7405 Allows UPDATE, INSERT, and DELETEs to occur while a SELECT is pending on
the same table. (CVS 3355)

FossilOrigin-Name: 8c52d2ad468615e50a727adab2977a0bef1bc068
2006-08-16 16:42:48 +00:00
drh
73bdf07713 Tighten an assert (ticket #1920). Change to "sqlite3.h" from <sqlite3.h>
on the sqlite3ext.h header (ticket #1916).  Fix a bug in the test scripts. (CVS 3354)

FossilOrigin-Name: 3ebedbb6f90ec0f9d3bed181f8fb5366f91fc48c
2006-08-15 14:21:16 +00:00
drh
417ec6381f Change the table_info pragma to show the text of the default value expression,
not the result of evaluating the default value expression.
Ticket #1919. (CVS 3353)

FossilOrigin-Name: b4d53974c30d195c061cc7605a707d7d30c52740
2006-08-14 14:23:41 +00:00
drh
3225007b42 Adjust the Makefile.in so that there are no test errors when using
the configure script.  Ticket #1918. (CVS 3352)

FossilOrigin-Name: 6a25be921b7255e540952fc213e145ae3b56daf0
2006-08-13 21:49:07 +00:00
drh
29a0138c2c Add vdbeaux.c to the list of files that must be compiled with -DSQLITE_TEST=1
in order to generate testfixture.  Do not require sqlit3OsDelete() to
succeed on a multi-database commit.  (Ticket #1917) (CVS 3351)

FossilOrigin-Name: dfc833ac79cb255902b20700d6d8949a66af093f
2006-08-13 19:04:18 +00:00
drh
09df9e28e5 Vtab2.test script works regardless of what TCL version is used. (CVS 3350)
FossilOrigin-Name: 6df3f6761a16ac5a02152f3c7f0c0e4944112ada
2006-08-13 18:43:54 +00:00
drh
77bba59b18 Compile in test code whenever -DSQLITE_TEST=1 is present. Do not rely
on -DSQLITE_DEBUG=1 because somebody might try to run the tests without it. (CVS 3349)

FossilOrigin-Name: 867defe32873ce82b6e1f5ddb8ad12178f2d76d6
2006-08-13 18:39:26 +00:00
drh
2205111273 Version 3.3.7 (CVS 3348)
FossilOrigin-Name: 85434a4b96389359a15556551cdc72259fc505e8
2006-08-12 14:42:57 +00:00
drh
b308fdc5e9 Documentation changes prior to the release of 3.3.7. (CVS 3347)
FossilOrigin-Name: c276cca2aafc1b417e12ba7119c65902ef7d61ec
2006-08-12 14:38:46 +00:00
drh
fe5a816bc0 Fix a bug in out-of-memory processing introduced by check-in (3336). (CVS 3346)
FossilOrigin-Name: 8d98a205cbe9948039884947db33f41a63a09062
2006-08-12 13:28:23 +00:00
drh
67dd9011fc Require whitespace or punctuation between a numeric literal and an
identifier or keyword.  Ticket #1912. (CVS 3345)

FossilOrigin-Name: 0f667c4abd73bbb806a5efb31b0aba6efaf40fb8
2006-08-12 12:33:14 +00:00
drh
1e31e0b25b Make sure sufficient memory is allocated to hold the collating sequence
pointers for all columns of an ORDER BY clause even if the ORDER BY
clause contains more columns than where originally in the table.
Ticket #1911. (CVS 3344)

FossilOrigin-Name: 924ea730f4dd384d7ef3deca357befd064dac70a
2006-08-11 19:08:27 +00:00
drh
10cfdd5fa1 Fix an reference to an undefined variable introduced by the previous
checkin. (CVS 3343)

FossilOrigin-Name: 73ff3452a0e38f046b7b41bcf653cf5e6848471f
2006-08-08 15:42:59 +00:00
drh
0f7eb61108 Remove most static and global variables from a pure build. There
are still a number of static and global variables used for testing. (CVS 3342)

FossilOrigin-Name: 76e4d4187779097954038e444111f837737e789c
2006-08-08 13:51:43 +00:00
drh
ffc13f69b5 Reset the schema before checking for outstanding statements inside
sqlite3_close() so that virtual tables will be disconnected. (CVS 3341)

FossilOrigin-Name: af05c3ca06163ef92ca1ca135302c00b7ddddabf
2006-07-30 20:50:44 +00:00
adamd
0a3daa3086 Report any error which occurs in closing the database at exit. Free a
couple of strings which were leaking. (CVS 3340)

FossilOrigin-Name: 47353f62ca7635b693718997e792358d16bd117b
2006-07-28 20:16:14 +00:00
danielk1977
20b1eaffd8 Disallow writing to, creating or dropping virtual tables from within xSync() callbacks. (CVS 3339)
FossilOrigin-Name: e705d232324c71738b8b25713a134617dd1fc525
2006-07-26 16:22:14 +00:00
drh
66f4a06259 Fix an overzealous assert() in the UTF-16 to UTF-8 converter. (CVS 3338)
FossilOrigin-Name: 096bd8212fa06c7271fc24280133d1f0864ffb42
2006-07-26 14:57:30 +00:00
drh
aa0fe8070d Add a test case to trigger an assertion fault when running
sqlite3_prepare16() with a predefined string size. (CVS 3337)

FossilOrigin-Name: 93878e6ebf703be022f83fd670c1aaaf7d4f1266
2006-07-26 14:49:19 +00:00
drh
15ca1df1bf More work toward getting sqlite3_interrupt() to work from separate
threads.  Ticket #1897. (CVS 3336)

FossilOrigin-Name: e431131d47481f9fc64c498e8934b10a96b0a931
2006-07-26 13:43:30 +00:00
drh
881feaa043 Initial attempt at making sqlite3_interrupt() work even when called from
a separate thread. (CVS 3335)

FossilOrigin-Name: 35fd67d7a0c55797eb460e3bd02c96afe619f026
2006-07-26 01:39:30 +00:00
danielk1977
5bd270b200 Allow database writes from within virtual table module xSync() callbacks. (CVS 3334)
FossilOrigin-Name: d5a608d0a412e13dfced6a3827574a2cff802f25
2006-07-25 15:14:52 +00:00
drh
916f75fcbd Fix lemon so that it does not crash on a empty reduce action. Ticket #1892. (CVS 3333)
FossilOrigin-Name: 4207ebc4e107df9f9f046be652f061e53263c8dd
2006-07-17 00:19:39 +00:00
drh
f11bded545 Add the "interrupt" method to the TCL interface. Ticket #1889. (CVS 3332)
FossilOrigin-Name: b0d19e575b14778e76ae5d6546fba0d2e9f25e33
2006-07-17 00:02:44 +00:00
drh
050be3294a Reset TCL results when onecolumn or eval methods have no reply.
Ticket #1887. (CVS 3331)

FossilOrigin-Name: 9c6090c609afa9906029ed4ba22375f5bee058c4
2006-07-12 00:18:40 +00:00
drh
76fe8032c1 By default, new databases are now created in the legacy file format - the
format that ignores DESC on indices.  If you want descending indices, you
must either recompile with -DSQLITE_DEFAULT_FILE_FORMAT=4 or issue
"PRAGMA legacy_file_format=OFF" prior to creating the first table in the
database. (CVS 3330)

FossilOrigin-Name: 65b60f05ce49ff127bf5044f96db36caf1fa0106
2006-07-11 14:17:51 +00:00
drh
206f3d96d1 Prevent memory leak and possible NULL pointer deference after malloc
failure.  Ticket #1886. (CVS 3329)

FossilOrigin-Name: b1f326e6959ef3be11f772e80f5ab6dd65b2d065
2006-07-11 13:15:08 +00:00
drh
76f8079623 Fix a NULL pointer deference following malloc failure. Bug discovered
by klocwork. (CVS 3328)

FossilOrigin-Name: eb91612f4646b15c2b8398c5225669419b03b531
2006-07-11 12:40:25 +00:00
drh
f64afeb53f Fix a possible NULL-pointer deference following a malloc failure.
Error discovered by Klocwork. (CVS 3327)

FossilOrigin-Name: 368bcf264456f5506260797497bc8d8dc4897e0f
2006-07-11 10:42:36 +00:00
drh
ad6e1370b5 Back out the changes of ticket #1687 since they broken the ActiveTcl build. (CVS 3326)
FossilOrigin-Name: b10d4220dc12728933eae1fcdcebd88a5f92e3a7
2006-07-10 21:15:51 +00:00
drh
a43fa22771 Better comment to describe the confusing operand reversal for infix
functions. (CVS 3325)

FossilOrigin-Name: 30dfb9bf2131370fe57e000495f5c292d392a010
2006-07-08 18:41:37 +00:00
drh
6a03a1c5f7 For infix functions (LIKE, GLOB, REGEXP, and MATCH) treat the left
operand as the first argument for the purposes of virtual table
function overloading, even though the left operand is really the
the second argument. (CVS 3324)

FossilOrigin-Name: 6e98373ca11c9d476f4c6b1841c6e006b7a49f29
2006-07-08 18:34:59 +00:00
drh
e94b0c3920 Add tests and minor fixes to the xFindFunction method of virtual tables. (CVS 3323)
FossilOrigin-Name: 3c4233e074cb016e2422b2e8f867c99217e9b10e
2006-07-08 18:09:15 +00:00
drh
b7f6f68f3a Allow virtual table implementations to overload function that use
a column of the virtual table as their first argument.  Untested. (CVS 3322)

FossilOrigin-Name: 12cc7af4b6b8b4f1a43d962fbafde8cba683a907
2006-07-08 17:06:43 +00:00
drh
4144905b53 Make the sqlite3_enable_load_extension() interface accessible from the
TCL bindings. (CVS 3321)

FossilOrigin-Name: ce96b890bbf2f2b9686e19bbb1111a70f6404cb5
2006-07-06 17:08:48 +00:00
drh
3086765b6f Change sqlite3_busy_timeout so that it checks for an invalid database
pointer. (CVS 3320)

FossilOrigin-Name: 225a9597b21bde7666451fc2eb7695dc35c438bb
2006-07-06 10:59:57 +00:00
drh
72c4d3e7ed Fix spelling of Perl on the homepage. (CVS 3319)
FossilOrigin-Name: 255c5a99468c47fed0aaffeeeb28d5af9a99ee11
2006-07-02 10:21:35 +00:00
drh
3765df48c3 Changes to get tests to pass with OMIT_VIRTUALTABLE. Ticket #1877. (CVS 3318)
FossilOrigin-Name: 60616496b7d97fdda99262e2bab25e625151e857
2006-06-28 18:18:09 +00:00
drh
2cc55698cd Better handling of NULL column names. (CVS 3317)
FossilOrigin-Name: 9f13972b93a3cac95b4319d3e75343e02a30a38f
2006-06-27 20:39:04 +00:00
drh
f9cb7f58a7 Move the sqlite3_sleep() and sqlite3_clear_bindings() interfaces into the
main library and make this official. (CVS 3316)

FossilOrigin-Name: eb3442c44ef1dbf8895195bb08fbeeea315b44c1
2006-06-27 20:06:44 +00:00
drh
0c07fb9aa1 Off by 1 error in check-in (3314). Note that this change is a likely
fix for ticket #1875.  But I have not tested it for that purpose yet. (CVS 3315)

FossilOrigin-Name: c7477459e92209ad792f0e11e4a4dd8abf0f2f11
2006-06-27 20:05:23 +00:00
drh
94f63ab842 Use the -k option to sort. This allows the build to run on newer unix
systems, but will likely break the build on older ones.  Please address
your complaints to the posix committee members that thought this would
be a good idea. (CVS 3314)

FossilOrigin-Name: 5d7e6bbddb522de2283474eb6d30cc376daf66f0
2006-06-27 18:55:09 +00:00
drh
35364b2b9e When compiling extensions in the load_extension tests, specify a path
for finding include files. (CVS 3313)

FossilOrigin-Name: aee4b669944ccf3888daa9d9e54f16261c64f380
2006-06-27 18:38:51 +00:00
danielk1977
2372c2b165 Prevent databases from being DETACHed while they are in use. Fix for #1873. (CVS 3312)
FossilOrigin-Name: 70a48b250bab99c5d9b4ad17c471663b8628e8d2
2006-06-27 16:34:56 +00:00
drh
c2e87a3e85 The ability to load extensions is turned off by default. It must be
enabled by calling sqlite3_enable_load_extension() before it will work.
This prevents security problems in legacy applications.  Ticket #1863. (CVS 3311)

FossilOrigin-Name: 4692319ccf28b0ebe64d5c5d189f444034fe0cb2
2006-06-27 15:16:14 +00:00
drh
69dab1d33f Changes to build successfully with -DSQLITE_OMIT_LOAD_EXTENSION=1 (CVS 3310)
FossilOrigin-Name: 783369e870df9d189fc75c98fa574fe4fc9843d0
2006-06-27 14:37:20 +00:00
drh
edb193b766 Changes so that it will build with SQLITE_OMIT_VIRTUALTABLE=1. (CVS 3309)
FossilOrigin-Name: 5612b287059c75488f995625d447c4e9521d1637
2006-06-27 13:20:21 +00:00
drh
ff91c45404 All tests pass even if compiled with -DSQLITE_DEFAULT_FILE_FORMAT=1. (CVS 3308)
FossilOrigin-Name: 8a49311d2f50cf2ca24776cabcb8ec7418325cb1
2006-06-27 12:51:12 +00:00
danielk1977
169f8a0c7a Fix up the test tclvar virtual module. (CVS 3307)
FossilOrigin-Name: a20bfa46316b9d8f884f147960620fc8e56a7c7f
2006-06-27 12:24:59 +00:00
drh
baaa7f409d Additional documentation on the 3.3.0 file format change added to
formatchng.html. (CVS 3306)

FossilOrigin-Name: 955551ca2e66a1f21dae21aa0265906887d7138d
2006-06-27 12:24:13 +00:00
danielk1977
3851a65e3a Fix bug in transfer of arguments from WHERE clause to virtual table xFilter() methods. (CVS 3305)
FossilOrigin-Name: cf41f2a33f94c6c94fb39ae6ffcd58bbf9ea88c8
2006-06-27 12:16:56 +00:00
drh
ac743e292d Move older news items
to the oldnews.html page. (CVS 3304)

FossilOrigin-Name: 80163ded7d7a8d6897b59df988286f987b221d08
2006-06-27 11:14:13 +00:00
danielk1977
926aab2274 In test code, always use sqlite3_free() instead of free() to free error messages returned by sqlite3_exec(). (CVS 3303)
FossilOrigin-Name: 6521ee5f320e47f8fbd7d6b23929fab431023483
2006-06-27 07:34:40 +00:00
drh
d2ca60d776 Make sure that MATCH terms that a virtual table says should be omitted
really are omitted. (CVS 3302)

FossilOrigin-Name: 3e1f5567dfd306bdb97275a32afd02ea693eaf58
2006-06-27 02:36:58 +00:00