Compare commits

...

6 Commits

Author SHA1 Message Date
drh 722db051c6 Update the version number to 3.6.23.1.
FossilOrigin-Name: b078b588d617e07886ad156e9f54ade6d823568e
2010-03-26 22:28:06 +00:00
drh 87dd60cd8d Pull in other fixes from the trunk: check-ins [bea9258643],
[f186b6a619], and [bb591802ff].

FossilOrigin-Name: b1f342a6643829020beef542a0700d90822e6467
2010-03-26 21:53:11 +00:00
drh 7244fdc446 Fix to the crash8.test test script.
FossilOrigin-Name: f18a129a7aab09a1e0d34155e82bcbf7479a401d
2010-03-26 21:47:59 +00:00
drh 4f7e8fcded Enhance FTS3 to take advantage of the MAX() optimization.
Cherrypick of [b7e42ae774].

FossilOrigin-Name: 4b65b4805100852a2b6a834aa6efc0bbf25b539f
2010-03-26 17:42:57 +00:00
drh 95063a5774 Correctly handle strings with zero-length tokens in the FTS3 offsets()
function.  This is a cherrypick of [d37034f7fc].

FossilOrigin-Name: ff6ae4f0e461fb5f8d08a0092488b7cd71cffb05
2010-03-26 17:40:32 +00:00
drh ad7c2a87f5 After any rollback that modifies the database file, sync the database
before deleting the rollback journal.  This is a cherry-pick merge
of check-ins [b21b911f23] and [f2326dad4e]

FossilOrigin-Name: ca0bc2a22e893062876f67e0f53cbab44b45665d
2010-03-26 17:37:12 +00:00
14 changed files with 156 additions and 58 deletions
+1 -1
View File
@@ -1 +1 @@
3.6.23
3.6.23.1
Vendored
+9 -9
View File
@@ -1,6 +1,6 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
# Generated by GNU Autoconf 2.62 for sqlite 3.6.23.
# Generated by GNU Autoconf 2.62 for sqlite 3.6.23.1.
#
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
# 2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
@@ -743,8 +743,8 @@ SHELL=${CONFIG_SHELL-/bin/sh}
# Identity of this package.
PACKAGE_NAME='sqlite'
PACKAGE_TARNAME='sqlite'
PACKAGE_VERSION='3.6.23'
PACKAGE_STRING='sqlite 3.6.23'
PACKAGE_VERSION='3.6.23.1'
PACKAGE_STRING='sqlite 3.6.23.1'
PACKAGE_BUGREPORT=''
# Factoring default headers for most tests.
@@ -1487,7 +1487,7 @@ if test "$ac_init_help" = "long"; then
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
\`configure' configures sqlite 3.6.23 to adapt to many kinds of systems.
\`configure' configures sqlite 3.6.23.1 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@@ -1552,7 +1552,7 @@ fi
if test -n "$ac_init_help"; then
case $ac_init_help in
short | recursive ) echo "Configuration of sqlite 3.6.23:";;
short | recursive ) echo "Configuration of sqlite 3.6.23.1:";;
esac
cat <<\_ACEOF
@@ -1670,7 +1670,7 @@ fi
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
sqlite configure 3.6.23
sqlite configure 3.6.23.1
generated by GNU Autoconf 2.62
Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
@@ -1684,7 +1684,7 @@ cat >config.log <<_ACEOF
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
It was created by sqlite $as_me 3.6.23, which was
It was created by sqlite $as_me 3.6.23.1, which was
generated by GNU Autoconf 2.62. Invocation command line was
$ $0 $@
@@ -13972,7 +13972,7 @@ exec 6>&1
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
This file was extended by sqlite $as_me 3.6.23, which was
This file was extended by sqlite $as_me 3.6.23.1, which was
generated by GNU Autoconf 2.62. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
@@ -14025,7 +14025,7 @@ Report bugs to <bug-autoconf@gnu.org>."
_ACEOF
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_version="\\
sqlite config.status 3.6.23
sqlite config.status 3.6.23.1
configured by $0, generated by GNU Autoconf 2.62,
with options \\"`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"
+25 -6
View File
@@ -600,6 +600,14 @@ static int fts3CreateTables(Fts3Table *p){
return rc;
}
/*
** An sqlite3_exec() callback for fts3TableExists.
*/
static int fts3TableExistsCallback(void *pArg, int n, char **pp1, char **pp2){
*(int*)pArg = 1;
return 1;
}
/*
** Determine if a table currently exists in the database.
*/
@@ -612,10 +620,17 @@ static void fts3TableExists(
u8 *pResult /* Write results here */
){
int rc = SQLITE_OK;
int res = 0;
char *zSql;
if( *pRc ) return;
fts3DbExec(&rc, db, "SELECT 1 FROM %Q.'%q%s'", zDb, zName, zSuffix);
*pResult = (rc==SQLITE_OK) ? 1 : 0;
if( rc!=SQLITE_ERROR ) *pRc = rc;
zSql = sqlite3_mprintf(
"SELECT 1 FROM %Q.sqlite_master WHERE name='%q%s'",
zDb, zName, zSuffix
);
rc = sqlite3_exec(db, zSql, fts3TableExistsCallback, &res, 0);
sqlite3_free(zSql);
*pResult = res & 0xff;
if( rc!=SQLITE_ABORT ) *pRc = rc;
}
/*
@@ -2033,7 +2048,13 @@ static int fts3FilterMethod(
rc = sqlite3Fts3ExprParse(p->pTokenizer, p->azColumn, p->nColumn,
iCol, zQuery, -1, &pCsr->pExpr
);
if( rc!=SQLITE_OK ) return rc;
if( rc!=SQLITE_OK ){
if( rc==SQLITE_ERROR ){
p->base.zErrMsg = sqlite3_mprintf("malformed MATCH expression: [%s]",
zQuery);
}
return rc;
}
rc = evalFts3Expr(p, pCsr->pExpr, &pCsr->aDoclist, &pCsr->nDoclist, 0);
pCsr->pNextId = pCsr->aDoclist;
@@ -2553,13 +2574,11 @@ int sqlite3Fts3Init(sqlite3 *db){
rc = sqlite3_create_module_v2(
db, "fts3", &fts3Module, (void *)pHash, hashDestroy
);
#if 0 /* FTS4 is disabled in 3.6.23 since it is not yet ready for publication */
if( rc==SQLITE_OK ){
rc = sqlite3_create_module_v2(
db, "fts4", &fts3Module, (void *)pHash, 0
);
}
#endif /* disable FTS4 */
return rc;
}
+3 -1
View File
@@ -1156,11 +1156,13 @@ void sqlite3Fts3Offsets(
"%d %d %d %d ", iCol, pTerm-sCtx.aTerm, iStart, iEnd-iStart
);
rc = fts3StringAppend(&res, aBuffer, -1);
}else if( rc==SQLITE_DONE ){
rc = SQLITE_CORRUPT;
}
}
}
if( rc==SQLITE_DONE ){
rc = SQLITE_CORRUPT;
rc = SQLITE_OK;
}
pMod->xClose(pC);
+2 -2
View File
@@ -186,9 +186,9 @@ static int fts3SqlStmt(
/* 5 */ "DELETE FROM %Q.'%q_docsize'",
/* 6 */ "DELETE FROM %Q.'%q_stat'",
/* 7 */ "SELECT * FROM %Q.'%q_content' WHERE rowid=?",
/* 8 */ "SELECT coalesce(max(idx)+1, 0) FROM %Q.'%q_segdir' WHERE level=?",
/* 8 */ "SELECT (SELECT max(idx) FROM %Q.'%q_segdir' WHERE level = ?) + 1",
/* 9 */ "INSERT INTO %Q.'%q_segments'(blockid, block) VALUES(?, ?)",
/* 10 */ "SELECT coalesce(max(blockid)+1, 1) FROM %Q.'%q_segments'",
/* 10 */ "SELECT coalesce((SELECT max(blockid) FROM %Q.'%q_segments') + 1, 1)",
/* 11 */ "INSERT INTO %Q.'%q_segdir' VALUES(?,?,?,?,?,?)",
/* Return segments in order from oldest to newest.*/
+20 -20
View File
@@ -1,14 +1,14 @@
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
C Version\s3.6.22
D 2010-03-09T19:31:43
C Update\sthe\sversion\snumber\sto\s3.6.23.1.
D 2010-03-26T22:28:06
F Makefile.arm-wince-mingw32ce-gcc fcd5e9cd67fe88836360bb4f9ef4cb7f8e2fb5a0
F Makefile.in 4f2f967b7e58a35bb74fb7ec8ae90e0f4ca7868b
F Makefile.linux-gcc d53183f4aa6a9192d249731c90dbdffbd2c68654
F Makefile.vxworks ab005d301296c40e021ccd0133ce49ca811e319f
F README cd04a36fbc7ea56932a4052d7d0b7f09f27c33d6
F VERSION 3e18b3dd7290883913c25d66c0ddb409ce318654
F VERSION 09d2dfb6a4a47d07b3b2091e349eedef78fb0f77
F aclocal.m4 a5c22d164aff7ed549d53a90fa56d56955281f50
F addopcodes.awk 17dc593f791f874d2c23a0f9360850ded0286531
F art/2005osaward.gif 0d1851b2a7c1c9d0ccce545f3e14bca42d7fd248
@@ -22,7 +22,7 @@ F art/src_logo.gif 9341ef09f0e53cd44c0c9b6fc3c16f7f3d6c2ad9
F config.guess 226d9a188c6196f3033ffc651cbc9dcee1a42977
F config.h.in 868fdb48c028421a203470e15c69ada15b9ba673
F config.sub 9ebe4c3b3dab6431ece34f16828b594fb420da55
F configure 72c0ad7c8cfabbffeaf8ca61e1d24143cf857eb2
F configure 17dee87ba9b797ea22940dc0fb5b08147bfb246a
F configure.ac 14740970ddb674d92a9f5da89083dff1179014ff
F contrib/sqlitecon.tcl 210a913ad63f9f991070821e599d600bd913e0ad
F doc/lemon.html f0f682f50210928c07e562621c3b7e8ab912a538
@@ -59,7 +59,7 @@ F ext/fts2/mkfts2amal.tcl 974d5d438cb3f7c4a652639262f82418c1e4cff0
F ext/fts3/README.syntax a19711dc5458c20734b8e485e75fb1981ec2427a
F ext/fts3/README.tokenizers 998756696647400de63d5ba60e9655036cb966e9
F ext/fts3/README.txt 8c18f41574404623b76917b9da66fcb0ab38328d
F ext/fts3/fts3.c dea6740e642a71f32cce37935b7bab95fb29f4ac
F ext/fts3/fts3.c 2bb2045d1412184e9eea71eb151b159168be5131
F ext/fts3/fts3.h 3a10a0af180d502cecc50df77b1b22df142817fe
F ext/fts3/fts3Int.h df812ef35f1b47a44ec68a44ec0c2a769c973d85
F ext/fts3/fts3_expr.c f4ff02ebe854e97ac03ff00b38b728a9ab57fd4b
@@ -67,11 +67,11 @@ F ext/fts3/fts3_hash.c 3c8f6387a4a7f5305588b203fa7c887d753e1f1c
F ext/fts3/fts3_hash.h 8331fb2206c609f9fc4c4735b9ab5ad6137c88ec
F ext/fts3/fts3_icu.c ac494aed69835008185299315403044664bda295
F ext/fts3/fts3_porter.c 7546e4503e286a67fd4f2a82159620e3e9c7a1bc
F ext/fts3/fts3_snippet.c 9cb2e78f4d09f30ea7861ee3fc9b7221ae948c8e
F ext/fts3/fts3_snippet.c 538bd27a76e465cb4ef6bfcb5479d897e4d5a536
F ext/fts3/fts3_tokenizer.c 1a49ee3d79cbf0b9386250370d9cbfe4bb89c8ff
F ext/fts3/fts3_tokenizer.h 13ffd9fcb397fec32a05ef5cd9e0fa659bf3dbd3
F ext/fts3/fts3_tokenizer1.c b6d86d1d750787db5c168c73da4e87670ed890a1
F ext/fts3/fts3_write.c bff9bea026d6e627ab8e78e2ade310981128e0bd
F ext/fts3/fts3_write.c 4b21a0c6f2772b261f14e3a2e80e1e3e849268b0
F ext/fts3/mkfts3amal.tcl 252ecb7fe6467854f2aa237bf2c390b74e71f100
F ext/icu/README.txt 3b130aa66e7a681136f6add198b076a2f90d1e33
F ext/icu/icu.c 850e9a36567bbcce6bd85a4b68243cad8e3c2de2
@@ -118,7 +118,7 @@ F src/btreeInt.h 71ed5e7f009caf17b7dc304350b3cb64b5970135
F src/build.c 11100b66fb97638d2d874c1d34d8db90650bb1d7
F src/callback.c 908f3e0172c3d4058f4ca0acd42c637c52e9669f
F src/complete.c dc1d136c0feee03c2f7550bafc0d29075e36deac
F src/ctime.c 675186d89e0e6c028390b6c75d5356beffb669d4
F src/ctime.c ceb247eb31620bba66a94c3f697db489a1652353
F src/date.c 485a4409a384310e6d93fd1104a9d0a8658becd9
F src/delete.c 610dc008e88a9599f905f5cbe9577ac9c36e0581
F src/expr.c 6baed2a0448d494233d9c0a610eea018ab386a32
@@ -155,7 +155,7 @@ F src/os_common.h 240c88b163b02c21a9f21f87d49678a0aa21ff30
F src/os_os2.c 75a8c7b9a00a2cf1a65f9fa4afbc27d46634bb2f
F src/os_unix.c 148d2f625db3727250c0b880481ae7630b6d0eb0
F src/os_win.c 1c7453c2df4dab26d90ff6f91272aea18bcf7053
F src/pager.c 80688c6fee918b7d9aa1c4911a0094d0ebbde31e
F src/pager.c 1915e3ec1a2157d0c29086b7fc0c936a2d97029e
F src/pager.h 1b32faf2e578ac3e7bcf9c9d11217128261c5c54
F src/parse.y ace5c7a125d9f2a410e431ee3209034105045f7e
F src/pcache.c 4956b41d6ba913f7a8a56fbf32be78caed0e45c2
@@ -317,7 +317,7 @@ F test/crash4.test 02ff4f15c149ca1e88a5c299b4896c84d9450c3b
F test/crash5.test 80a2f7073381837fc082435c97df52a830abcd80
F test/crash6.test 9c730cf06335003cb1f5cfceddacd044155336e0
F test/crash7.test e20a7b9ee1d16eaef7c94a4cb7ed2191b4d05970
F test/crash8.test 5b32966fcb58fd616d24ce94303420351d076eb9
F test/crash8.test 3af0fc90c3e593b85e810b8d6c50fc7d0df30008
F test/crashtest1.c 09c1c7d728ccf4feb9e481671e29dda5669bbcc2
F test/createtab.test 199cf68f44e5d9e87a0b8afc7130fdeb4def3272
F test/cse.test 277350a26264495e86b1785f34d2d0c8600e021c
@@ -387,11 +387,11 @@ F test/fts3.test ae0433b09b12def08105640e57693726c4949338
F test/fts3_common.tcl 1d887ded06dac9b993cfb175618df7f70c796de2
F test/fts3aa.test 5327d4c1d9b6c61021696746cc9a6cdc5bf159c0
F test/fts3ab.test 09aeaa162aee6513d9ff336b6932211008b9d1f9
F test/fts3ac.test fc1ac42c33f8a66d48ae41e4728f7ca4b6dfc950
F test/fts3ac.test 636ed7486043055d4f126a0e385f2d5a82ebbf63
F test/fts3ad.test e40570cb6f74f059129ad48bcef3d7cbc20dda49
F test/fts3ae.test ce32a13b34b0260928e4213b4481acf801533bda
F test/fts3af.test d394978c534eabf22dd0837e718b913fd66b499c
F test/fts3ag.test 38d9c7dd4b607929498e8e0b32299af5665da1ab
F test/fts3ag.test 0b7d303f61ae5d620c4efb5e825713ea34ff9441
F test/fts3ah.test ba181d6a3dee0c929f0d69df67cac9c47cda6bff
F test/fts3ai.test d29cee6ed653e30de478066881cec8aa766531b2
F test/fts3aj.test 584facbc9ac4381a7ec624bfde677340ffc2a5a4
@@ -406,7 +406,7 @@ F test/fts3c.test fc723a9cf10b397fdfc2b32e73c53c8b1ec02958
F test/fts3cov.test 3a9d8618a3107166530c447e808f8992372e0415
F test/fts3d.test 95fb3c862cbc4297c93fceb9a635543744e9ef52
F test/fts3e.test 1f6c6ac9cc8b772ca256e6b22aaeed50c9350851
F test/fts3expr.test 05dab77387801e4900009917bb18f556037d82da
F test/fts3expr.test 5e745b2b6348499d9ef8d59015de3182072c564c
F test/fts3expr2.test 18da930352e5693eaa163a3eacf96233b7290d1a
F test/fts3malloc.test 059592c4f37ccd30138bbf8e3e5b7982cb5c8f2e
F test/fts3near.test 2e318ee434d32babd27c167142e2b94ddbab4844
@@ -775,7 +775,7 @@ F tool/lempar.c 01ca97f87610d1dac6d8cd96ab109ab1130e76dc
F tool/mkkeywordhash.c d2e6b4a5965e23afb80fbe74bb54648cd371f309
F tool/mkopts.tcl 66ac10d240cc6e86abd37dc908d50382f84ff46e
F tool/mkspeedsql.tcl a1a334d288f7adfe6e996f2e712becf076745c97
F tool/mksqlite3c.tcl e1245579315f821e83e06934e93732b4c60a0375
F tool/mksqlite3c.tcl 4c6924c7e877defa8f9a12ef1e6867de614acf3f
F tool/mksqlite3h.tcl eb100dce83f24b501b325b340f8b5eb8e5106b3b
F tool/mksqlite3internalh.tcl 7b43894e21bcb1bb39e11547ce7e38a063357e87
F tool/omittest.tcl 27d6f6e3b1e95aeb26a1c140e6eb57771c6d794a
@@ -795,14 +795,14 @@ F tool/speedtest2.tcl ee2149167303ba8e95af97873c575c3e0fab58ff
F tool/speedtest8.c 2902c46588c40b55661e471d7a86e4dd71a18224
F tool/speedtest8inst1.c 293327bc76823f473684d589a8160bde1f52c14e
F tool/vdbe-compress.tcl d70ea6d8a19e3571d7ab8c9b75cba86d1173ff0f
P 20c400e73a9b6586b97de61da0d9f3d9a01dbebc
R bef78c216faef953a6eddc0170e02337
P b1f342a6643829020beef542a0700d90822e6467
R 590a011d9441875bded2c173c371f1c1
U drh
Z 18025c7420056ae41f12ed18eace5eef
Z f7171db765620a4ccff85bc2ced22202
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
iD8DBQFLlqIloxKgR168RlERAk/hAJ9JiCzvEXeRZo3lDNqwPc1gemhEFgCfa5xe
J3yhTIwklJduhaeZmyIPGx8=
=FtXn
iD8DBQFLrTT6oxKgR168RlERArP2AJ0UeA3bKxomgH1prR7M+4tHuMlN7wCfXBZE
Jr7IGDFSJ/vsM6VpeiKkkf4=
=diSA
-----END PGP SIGNATURE-----
+1 -1
View File
@@ -1 +1 @@
4ae453ea7be69018d8c16eb8dabe05617397dc4d
b078b588d617e07886ad156e9f54ade6d823568e
-2
View File
@@ -84,11 +84,9 @@ static const char * const azCompileOpt[] = {
#ifdef SQLITE_ENABLE_FTS3_PARENTHESIS
"ENABLE_FTS3_PARENTHESIS",
#endif
#if 0 /* Disabled because FTS4 is not ready for publication */
#ifdef SQLITE_ENABLE_FTS4
"ENABLE_FTS4",
#endif
#endif
#ifdef SQLITE_ENABLE_ICU
"ENABLE_ICU",
#endif
+3
View File
@@ -2019,6 +2019,9 @@ end_playback:
rc = readMasterJournal(pPager->jfd, zMaster, pPager->pVfs->mxPathname+1);
testcase( rc!=SQLITE_OK );
}
if( rc==SQLITE_OK && pPager->noSync==0 && pPager->state>=PAGER_EXCLUSIVE ){
rc = sqlite3OsSync(pPager->fd, pPager->sync_flags);
}
if( rc==SQLITE_OK ){
rc = pager_end_transaction(pPager, zMaster[0]!='\0');
testcase( rc!=SQLITE_OK );
+58
View File
@@ -340,4 +340,62 @@ ifcapable pragma {
} {jkl}
}
for {set i 1} {$i < 10} {incr i} {
catch { db close }
file delete -force test.db test.db-journal
sqlite3 db test.db
do_test crash8-5.$i.1 {
execsql {
CREATE TABLE t1(x PRIMARY KEY);
INSERT INTO t1 VALUES(randomblob(900));
INSERT INTO t1 SELECT randomblob(900) FROM t1;
INSERT INTO t1 SELECT randomblob(900) FROM t1;
INSERT INTO t1 SELECT randomblob(900) FROM t1;
INSERT INTO t1 SELECT randomblob(900) FROM t1;
INSERT INTO t1 SELECT randomblob(900) FROM t1;
INSERT INTO t1 SELECT randomblob(900) FROM t1; /* 64 rows */
}
crashsql -file test.db -delay [expr ($::i%2) + 1] {
PRAGMA cache_size = 10;
BEGIN;
UPDATE t1 SET x = randomblob(900);
ROLLBACK;
INSERT INTO t1 VALUES(randomblob(900));
}
execsql { PRAGMA integrity_check }
} {ok}
catch { db close }
file delete -force test.db test.db-journal
sqlite3 db test.db
do_test crash8-5.$i.2 {
execsql {
PRAGMA cache_size = 10;
CREATE TABLE t1(x PRIMARY KEY);
INSERT INTO t1 VALUES(randomblob(900));
INSERT INTO t1 SELECT randomblob(900) FROM t1;
INSERT INTO t1 SELECT randomblob(900) FROM t1;
INSERT INTO t1 SELECT randomblob(900) FROM t1;
INSERT INTO t1 SELECT randomblob(900) FROM t1;
INSERT INTO t1 SELECT randomblob(900) FROM t1;
INSERT INTO t1 SELECT randomblob(900) FROM t1; /* 64 rows */
BEGIN;
UPDATE t1 SET x = randomblob(900);
}
file delete -force testX.db testX.db-journal
copy_file test.db testX.db
copy_file test.db-journal testX.db-journal
db close
crashsql -file test.db -delay [expr ($::i%2) + 1] {
SELECT * FROM sqlite_master;
INSERT INTO t1 VALUES(randomblob(900));
}
sqlite3 db2 testX.db
execsql { PRAGMA integrity_check } db2
} {ok}
}
catch {db2 close}
finish_test
+18
View File
@@ -1198,4 +1198,22 @@ do_test fts3ac-5.2 {
15 <b>Questar</b> Pipeline
40 Rockies<b>...</b>}}
#-------------------------------------------------------------------------
# Test a problem reported on the mailing list.
#
do_test fts3ac-6.1 {
execsql {
CREATE VIRTUAL TABLE ft USING fts3(one, two);
INSERT INTO ft VALUES('', 'foo');
INSERT INTO ft VALUES('foo', 'foo');
SELECT offsets(ft) FROM ft WHERE ft MATCH 'foo';
}
} {{1 0 0 3} {0 0 0 3 1 0 0 3}}
do_test fts3ac-6.2 {
execsql {
DELETE FROM ft WHERE one = 'foo';
SELECT offsets(ft) FROM ft WHERE ft MATCH 'foo';
}
} {{1 0 0 3}}
finish_test
+1 -1
View File
@@ -73,7 +73,7 @@ do_test fts3ag-1.9 {
# No support for all-except queries.
do_test fts3ag-1.10 {
catchsql {SELECT rowid FROM t1 WHERE t1 MATCH '-this -something'}
} {1 {SQL logic error or missing database}}
} {1 {malformed MATCH expression: [-this -something]}}
# Test that docListOrMerge() correctly handles reaching the end of one
# doclist before it reaches the end of the other.
+14 -14
View File
@@ -336,53 +336,53 @@ do_test fts3expr-4.1 {
# Mismatched parenthesis:
do_test fts3expr-4.2.1 {
catchsql { SELECT * FROM t1 WHERE t1 MATCH 'example AND (hello OR world))' }
} {1 {SQL logic error or missing database}}
} {1 {malformed MATCH expression: [example AND (hello OR world))]}}
do_test fts3expr-4.2.2 {
catchsql { SELECT * FROM t1 WHERE t1 MATCH 'example AND (hello OR world' }
} {1 {SQL logic error or missing database}}
} {1 {malformed MATCH expression: [example AND (hello OR world]}}
do_test fts3expr-4.2.3 {
catchsql { SELECT * FROM t1 WHERE t1 MATCH '(hello' }
} {1 {SQL logic error or missing database}}
} {1 {malformed MATCH expression: [(hello]}}
do_test fts3expr-4.2.4 {
catchsql { SELECT * FROM t1 WHERE t1 MATCH '(' }
} {1 {SQL logic error or missing database}}
} {1 {malformed MATCH expression: [(]}}
do_test fts3expr-4.2.5 {
catchsql { SELECT * FROM t1 WHERE t1 MATCH ')' }
} {1 {SQL logic error or missing database}}
} {1 {malformed MATCH expression: [)]}}
do_test fts3expr-4.2.6 {
catchsql { SELECT * FROM t1 WHERE t1 MATCH 'example (hello world' }
} {1 {SQL logic error or missing database}}
} {1 {malformed MATCH expression: [example (hello world]}}
# Unterminated quotation marks:
do_test fts3expr-4.3.1 {
catchsql { SELECT * FROM t1 WHERE t1 MATCH 'example OR "hello world' }
} {1 {SQL logic error or missing database}}
} {1 {malformed MATCH expression: [example OR "hello world]}}
do_test fts3expr-4.3.2 {
catchsql { SELECT * FROM t1 WHERE t1 MATCH 'example OR hello world"' }
} {1 {SQL logic error or missing database}}
} {1 {malformed MATCH expression: [example OR hello world"]}}
# Binary operators without the required operands.
do_test fts3expr-4.4.1 {
catchsql { SELECT * FROM t1 WHERE t1 MATCH 'OR hello world' }
} {1 {SQL logic error or missing database}}
} {1 {malformed MATCH expression: [OR hello world]}}
do_test fts3expr-4.4.2 {
catchsql { SELECT * FROM t1 WHERE t1 MATCH 'hello world OR' }
} {1 {SQL logic error or missing database}}
} {1 {malformed MATCH expression: [hello world OR]}}
do_test fts3expr-4.4.3 {
catchsql { SELECT * FROM t1 WHERE t1 MATCH 'one (hello world OR) two' }
} {1 {SQL logic error or missing database}}
} {1 {malformed MATCH expression: [one (hello world OR) two]}}
do_test fts3expr-4.4.4 {
catchsql { SELECT * FROM t1 WHERE t1 MATCH 'one (OR hello world) two' }
} {1 {SQL logic error or missing database}}
} {1 {malformed MATCH expression: [one (OR hello world) two]}}
# NEAR operators with something other than phrases as arguments.
do_test fts3expr-4.5.1 {
catchsql { SELECT * FROM t1 WHERE t1 MATCH '(hello OR world) NEAR one' }
} {1 {SQL logic error or missing database}}
} {1 {malformed MATCH expression: [(hello OR world) NEAR one]}}
do_test fts3expr-4.5.2 {
catchsql { SELECT * FROM t1 WHERE t1 MATCH 'one NEAR (hello OR world)' }
} {1 {SQL logic error or missing database}}
} {1 {malformed MATCH expression: [one NEAR (hello OR world)]}}
#------------------------------------------------------------------------
# The following OOM tests are designed to cover cases in fts3_expr.c.
+1 -1
View File
@@ -211,6 +211,7 @@ foreach file {
sqliteInt.h
global.c
ctime.c
status.c
date.c
os.c
@@ -266,7 +267,6 @@ foreach file {
auth.c
build.c
callback.c
ctime.c
delete.c
func.c
fkey.c