Compare commits

...

12 Commits

Author SHA1 Message Date
drh 8ef0909dba Fix the amalgamation builder so that it works with the rtree updates of
the prior check-in.

FossilOrigin-Name: 265b0b29b83fde813c63f401b979e619f2b12d5d
2010-10-02 01:00:02 +00:00
drh c7173b6953 Backport the RTree implementation from the trunk into the 3.6.23 branch.
The code for the application-defined query boxes is still present but
is disabled.  The reason for this backport is to take advantage of recent
enhancements to robustness to database corruption.

FossilOrigin-Name: 854b23c117c973fcf63f31bda189b7492595c3f9
2010-10-01 20:45:09 +00:00
drh b57f9c675c Pull the incremental_vacuum bug fix ([255f1eefa373153942c67b18b]) and the
R-tree segfault bug fix ([7f2f71cc9e3c39093f09231f44]) into the 3.6.23
branch.  Increase the version number to 3.6.23.3.

FossilOrigin-Name: bcbdecd854d8430831fbcdf17f55ba6f55ba745b
2010-08-24 12:05:18 +00:00
drh c4098a3d9f Cherry-pick the SQLITE_FCNTL_SIZE_HINT patch (check-in [2b7e3b4a30d6a7c4a8]
and bump the version number to 3.6.23.2.

FossilOrigin-Name: 776679af588625f13307369770979bccae7cf03a
2010-05-19 22:09:19 +00:00
drh 21ce77989a Disable the corruptE test which SQLITE_OVERSIZE_CELL_CHECK is enabled.
This is a cherrypick merge from check-in [1dc4f9fe9b83467ba].

FossilOrigin-Name: a40d080ca3c5f152f3296caf48f20728f61317de
2010-05-19 20:30:15 +00:00
drh 91973abb4b Include shell.c and sqlite3.def in the amalgamation ZIP archive.
Ticket [e063139eb3f8]

FossilOrigin-Name: b51fcac9fb4207810ee8d33ead47886e9c46d224
2010-03-31 11:56:47 +00:00
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
25 changed files with 949 additions and 300 deletions
+1 -1
View File
@@ -1 +1 @@
3.6.23
3.6.23.3
Vendored Regular → Executable
+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.*/
+581 -195
View File
File diff suppressed because it is too large Load Diff
+56
View File
@@ -0,0 +1,56 @@
/*
** 2010 August 30
**
** The author disclaims copyright to this source code. In place of
** a legal notice, here is a blessing:
**
** May you do good and not evil.
** May you find forgiveness for yourself and forgive others.
** May you share freely, never taking more than you give.
**
*************************************************************************
*/
#ifndef _SQLITE3RTREE_H_
#define _SQLITE3RTREE_H_
#include <sqlite3.h>
#ifdef __cplusplus
extern "C" {
#endif
typedef struct sqlite3_rtree_geometry sqlite3_rtree_geometry;
/*
** Register a geometry callback named zGeom that can be used as part of an
** R-Tree geometry query as follows:
**
** SELECT ... FROM <rtree> WHERE <rtree col> MATCH $zGeom(... params ...)
*/
int sqlite3_rtree_geometry_callback(
sqlite3 *db,
const char *zGeom,
int (*xGeom)(sqlite3_rtree_geometry *, int nCoord, double *aCoord, int *pRes),
void *pContext
);
/*
** A pointer to a structure of the following type is passed as the first
** argument to callbacks registered using rtree_geometry_callback().
*/
struct sqlite3_rtree_geometry {
void *pContext; /* Copy of pContext passed to s_r_g_c() */
int nParam; /* Size of array aParam[] */
double *aParam; /* Parameters passed to SQL geom function */
void *pUser; /* Callback implementation user data */
void (*xDelUser)(void *); /* Called by SQLite to clean up pUser */
};
#ifdef __cplusplus
} /* end of the 'extern "C"' block */
#endif
#endif /* ifndef _SQLITE3RTREE_H_ */
Regular → Executable
View File
+31 -29
View File
@@ -1,14 +1,14 @@
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
C Version\s3.6.22
D 2010-03-09T19:31:43
C Fix\sthe\samalgamation\sbuilder\sso\sthat\sit\sworks\swith\sthe\srtree\supdates\sof\nthe\sprior\scheck-in.
D 2010-10-02T01:00:02
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 f97759f87917ee09d6f39d6faf3909d084d366b7
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 x
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,17 +67,17 @@ 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
F ext/icu/sqliteicu.h 728867a802baa5a96de7495e9689a8e01715ef37
F ext/rtree/README 6315c0d73ebf0ec40dedb5aa0e942bc8b54e3761
F ext/rtree/rtree.c a354f6be11a91706680936fdf77b4588f0b34dbe
F ext/rtree/rtree.c f9acfe69c3abcd5ac124f1678515424fd9c45a41
F ext/rtree/rtree.h 834dbcb82dc85b2481cde6a07cdadfddc99e9b9e
F ext/rtree/rtree1.test f72885ed80a329d6bd7991043016d74b51edf2c5
F ext/rtree/rtree2.test 7b665c44d25e51b3098068d983a39902b2e2d7a1
@@ -88,9 +88,10 @@ F ext/rtree/rtree6.test 11aade5311789068ca659be24a47cc0d852b1971
F ext/rtree/rtree7.test 6fd29fb8e13795c822f4ceeea92ab5d61c96976d
F ext/rtree/rtree_perf.tcl 6c18c1f23cd48e0f948930c98dfdd37dfccb5195
F ext/rtree/rtree_util.tcl 06aab2ed5b826545bf215fff90ecb9255a8647ea
F ext/rtree/sqlite3rtree.h 1af0899c63a688e272d69d8e746f24e76f10a3f0
F ext/rtree/tkt3363.test 2bf324f7908084a5f463de3109db9c6e607feb1b
F ext/rtree/viewrtree.tcl eea6224b3553599ae665b239bd827e182b466024
F install-sh 9d4de14ab9fb0facae2f48780b874848cbf2f895
F install-sh 9d4de14ab9fb0facae2f48780b874848cbf2f895 x
F ltmain.sh 3ff0879076df340d2e23ae905484d8c15d5fdea8
F main.mk a36a05a481afcc00388c4d6d4db0e12cacb546e3
F mkdll.sh 7d09b23c05d56532e9d44a50868eb4b12ff4f74a
@@ -99,7 +100,7 @@ F mkextw.sh 4123480947681d9b434a5e7b1ee08135abe409ac
F mkopcodec.awk 3fb9bf077053c968451f4dd03d11661ac373f9d1
F mkopcodeh.awk 29b84656502eee5f444c3147f331ee686956ab0e
F mkso.sh fd21c06b063bb16a5d25deea1752c2da6ac3ed83
F publish.sh c74b6c2b6b63435aa1b4b43b1396dfebfae84095
F publish.sh 313c5b2425f2cf5e547db7549a9796acc4508f22
F publish_osx.sh 2ad2ee7d50632dff99949edc9c162dbb052f7534
F spec.template 86a4a43b99ebb3e75e6b9a735d5fd293a24e90ca
F sqlite.pc.in 42b7bf0d02e08b9e77734a47798d1a55a9e0716b
@@ -112,13 +113,13 @@ F src/auth.c 523da7fb4979469955d822ff9298352d6b31de34
F src/backup.c b293534bc2df23c57668a585b17ee7faaaef0939
F src/bitvec.c 06ad2c36a9c3819c0b9cbffec7b15f58d5d834e0
F src/btmutex.c 96a12f50f7a17475155971a241d85ec5171573ff
F src/btree.c 0d6e44d664b1775b269ea7e6f66fdffcfc32ceb3
F src/btree.c d66fc956658bedbf92857c2e34a0cad59e11f5a8
F src/btree.h 0e193b7e90f1d78b79c79474040e3d66a553a4fa
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
@@ -153,9 +154,9 @@ F src/os.c 8bc63cf91e9802e2b807198e54e50227fa889306
F src/os.h 534b082c3cb349ad05fa6fa0b06087e022af282c
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/os_unix.c fdeb37c703243141470396acf32331674b905e55
F src/os_win.c bc65553f911439a6b1aa3cf22f34e5ea1c4aa394
F src/pager.c e39ac887694a6644135f5e4151fe293b5397dd64
F src/pager.h 1b32faf2e578ac3e7bcf9c9d11217128261c5c54
F src/parse.y ace5c7a125d9f2a410e431ee3209034105045f7e
F src/pcache.c 4956b41d6ba913f7a8a56fbf32be78caed0e45c2
@@ -169,7 +170,7 @@ F src/resolve.c a1648d98e869937b29f4f697461fe4d60f220a7b
F src/rowset.c 69afa95a97c524ba6faf3805e717b5b7ae85a697
F src/select.c 4113ef360430ed4e7533690ef46d06c20204adce
F src/shell.c c40427c7245535a04a9cb4a417b6cc05c022e6a4
F src/sqlite.h.in 08a2d9a278ff0dfd65055a7ec9c599f7ae1a3c18
F src/sqlite.h.in f9a9be1bce911669a259f7c747bf05635cb360b5
F src/sqlite3ext.h 69dfb8116af51b84a029cddb3b35062354270c89
F src/sqliteInt.h 6873f7f4c24fcdceece8777f2a1cbec049df77a0
F src/sqliteLimit.h 3afab2291762b5d09ae20c18feb8e9fa935a60a6
@@ -308,7 +309,7 @@ F test/corruptA.test 99e95620b980161cb3e79f06a884a4bb8ae265ff
F test/corruptB.test 66b4544104dd03d0f33ea69ddac3fa4a682cd3c2
F test/corruptC.test 691ed070baef5e1345939caadf270a52837a5064
F test/corruptD.test 3ae6e2dc6e2226c6935a8a40d4b5ee3eba75f8c0
F test/corruptE.test dbf66cae4c0e977ca9625a9114cdd01df8967bef
F test/corruptE.test 34de490791060d749c933aef3970839df3f63ea9
F test/count.test 454e1ce985c94d13efeac405ce54439f49336163
F test/crash.test 1b6ac8410689ff78028887f445062dc897c9ac89
F test/crash2.test 5b14d4eb58b880e231361d3b609b216acda86651
@@ -317,7 +318,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 +388,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 +407,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
@@ -615,6 +616,7 @@ F test/tkt-2ea2425d34.test 1cf13e6f75d149b3209a0cb32927a82d3d79fb28
F test/tkt-31338dca7e.test 5741cd48de500347a437ba1be58c8335e83c5a5e
F test/tkt-3fe897352e.test 10de1a67bd5c66b238a4c96abe55531b37bb4f00
F test/tkt-4a03edc4c8.test 2865e4edbc075b954daa82f8da7cc973033ec76e
F test/tkt-5e10420e8d.test a182c11ac3fba3aa4ef939df1198beb6c9e65a01
F test/tkt-5ee23731f.test 3581260f2a71e51db94e1506ba6b0f7311d002a9
F test/tkt-78e04e52ea.test fb5430c675e708f5cbafdf3e7e5593da5145a527
F test/tkt-94c04eaadb.test be5ea61cb04dfdc047d19b5c5a9e75fa3da67a7f
@@ -775,8 +777,8 @@ 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/mksqlite3h.tcl eb100dce83f24b501b325b340f8b5eb8e5106b3b
F tool/mksqlite3c.tcl 4c6924c7e877defa8f9a12ef1e6867de614acf3f
F tool/mksqlite3h.tcl 03b6ca938c833814923674d8a160e91fcedb4571
F tool/mksqlite3internalh.tcl 7b43894e21bcb1bb39e11547ce7e38a063357e87
F tool/omittest.tcl 27d6f6e3b1e95aeb26a1c140e6eb57771c6d794a
F tool/opcodeDoc.awk b3a2a3d5d3075b8bd90b7afe24283efdd586659c
@@ -795,14 +797,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 854b23c117c973fcf63f31bda189b7492595c3f9
R 44ce2c8db78990178170a00bb13c2135
U drh
Z 18025c7420056ae41f12ed18eace5eef
Z d5d5118c96e9b45f879181547395d273
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
iD8DBQFLlqIloxKgR168RlERAk/hAJ9JiCzvEXeRZo3lDNqwPc1gemhEFgCfa5xe
J3yhTIwklJduhaeZmyIPGx8=
=FtXn
iD8DBQFMpoQVoxKgR168RlERAlXzAJ4j7kbq+jS8F3BG5yE4X+/sy7ytuQCfRQ88
PtOzqfzm+39Njura333YmpA=
=lHk9
-----END PGP SIGNATURE-----
+1 -1
View File
@@ -1 +1 @@
4ae453ea7be69018d8c16eb8dabe05617397dc4d
265b0b29b83fde813c63f401b979e619f2b12d5d
+14 -13
View File
@@ -34,19 +34,6 @@ gzip sqlite3-$VERS.bin
chmod 644 sqlite3-$VERS.bin.gz
mv sqlite3-$VERS.bin.gz doc
# Build a source archive useful for windows.
#
make target_source
cd tsrc
echo '***** BUILDING preprocessed source archives'
rm fts[12]* icu*
rm -f ../doc/sqlite-source-$VERSW.zip
zip ../doc/sqlite-source-$VERSW.zip *
cd ..
cp tsrc/sqlite3.h tsrc/sqlite3ext.h .
pwd
zip doc/sqlite-amalgamation-$VERSW.zip sqlite3.c sqlite3.h sqlite3ext.h
# Build the sqlite.so and tclsqlite.so shared libraries
# under Linux
#
@@ -87,6 +74,20 @@ i386-mingw32msvc-gcc -Os $OPTS -Itsrc -I$TCLDIR sqlite3.c tsrc/shell.c \
-o sqlite3.exe
zip doc/sqlite-$VERSW.zip sqlite3.exe
# Build a source archive useful for windows.
#
make target_source
cd tsrc
echo '***** BUILDING preprocessed source archives'
rm fts[12]* icu*
rm -f ../doc/sqlite-source-$VERSW.zip
zip ../doc/sqlite-source-$VERSW.zip *
cd ..
cp tsrc/sqlite3.h tsrc/sqlite3ext.h .
cp tsrc/shell.c .
pwd
zip doc/sqlite-amalgamation-$VERSW.zip sqlite3.c sqlite3.h sqlite3ext.h shell.c sqlite3.def
# Construct a tarball of the source tree
#
echo '***** BUILDING source archive'
+4
View File
@@ -4730,6 +4730,10 @@ static int allocateBtreePage(
if( !pPrevTrunk ){
memcpy(&pPage1->aData[32], &pTrunk->aData[0], 4);
}else{
rc = sqlite3PagerWrite(pPrevTrunk->pDbPage);
if( rc!=SQLITE_OK ){
goto end_allocate_page;
}
memcpy(&pPrevTrunk->aData[0], &pTrunk->aData[0], 4);
}
}else{
-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
+6
View File
@@ -3349,6 +3349,12 @@ static int unixFileControl(sqlite3_file *id, int op, void *pArg){
*(int*)pArg = ((unixFile*)id)->lastErrno;
return SQLITE_OK;
}
case SQLITE_FCNTL_SIZE_HINT: {
sqlite3_int64 szFile = *(sqlite3_int64*)pArg;
unixFile *pFile = (unixFile*)id;
ftruncate(pFile->h, szFile);
return SQLITE_OK;
}
#ifndef NDEBUG
/* The pager calls this method to signal that it has done
** a rollback and that the database is therefore unchanged and
+5
View File
@@ -1112,6 +1112,11 @@ static int winFileControl(sqlite3_file *id, int op, void *pArg){
*(int*)pArg = (int)((winFile*)id)->lastErrno;
return SQLITE_OK;
}
case SQLITE_FCNTL_SIZE_HINT: {
sqlite3_int64 sz = *(sqlite3_int64*)pArg;
winTruncate(id, sz);
return SQLITE_OK;
}
}
return SQLITE_ERROR;
}
+15 -1
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 );
@@ -2866,6 +2869,17 @@ static int pager_write_pagelist(PgHdr *pList){
rc = pagerOpentemp(pPager, pPager->fd, pPager->vfsFlags);
}
/* Before the first write, give the VFS a hint of what the final
** file size will be.
*/
if( rc==SQLITE_OK
&& pPager->dbSize>(pPager->dbFileSize+1)
&& isOpen(pPager->fd)
){
sqlite3_int64 szFile = pPager->pageSize * (sqlite3_int64)pPager->dbSize;
sqlite3OsFileControl(pPager->fd, SQLITE_FCNTL_SIZE_HINT, &szFile);
}
while( rc==SQLITE_OK && pList ){
Pgno pgno = pList->pgno;
@@ -4657,7 +4671,7 @@ int sqlite3PagerCommitPhaseOne(
sqlite3PagerUnref(pPage);
if( rc!=SQLITE_OK ) goto commit_phase_one_exit;
}
}
}
pPager->dbSize = dbSize;
}
#endif
+8
View File
@@ -670,11 +670,19 @@ struct sqlite3_io_methods {
** into an integer that the pArg argument points to. This capability
** is used during testing and only needs to be supported when SQLITE_TEST
** is defined.
**
** The [SQLITE_FCNTL_SIZE_HINT] opcode is used by SQLite to give the VFS
** layer a hint of how large the database file will grow to be during the
** current transaction. This hint is not guaranteed to be accurate but it
** is often close. The underlying VFS might choose to preallocate database
** file space based on this hint in order to help writes to the database
** file run faster.
*/
#define SQLITE_FCNTL_LOCKSTATE 1
#define SQLITE_GET_LOCKPROXYFILE 2
#define SQLITE_SET_LOCKPROXYFILE 3
#define SQLITE_LAST_ERRNO 4
#define SQLITE_FCNTL_SIZE_HINT 5
/*
** CAPI3REF: Mutex Handle
+7
View File
@@ -21,6 +21,13 @@ catch {file delete -force test.db test.db-journal test.bu}
set testdir [file dirname $argv0]
source $testdir/tester.tcl
# Do not run the tests in this file if ENABLE_OVERSIZE_CELL_CHECK is on.
#
ifcapable oversize_cell_check {
finish_test
return
}
# Construct a compact, dense database for testing.
#
do_test corruptE-1.1 {
+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.
+58
View File
@@ -0,0 +1,58 @@
# 2010 August 23
#
# The author disclaims copyright to this source code. In place of
# a legal notice, here is a blessing:
#
# May you do good and not evil.
# May you find forgiveness for yourself and forgive others.
# May you share freely, never taking more than you give.
#
#***********************************************************************
#
set testdir [file dirname $argv0]
source $testdir/tester.tcl
do_test tkt-5e10420e8d.1 {
db eval {
PRAGMA page_size = 1024;
PRAGMA auto_vacuum = incremental;
CREATE TABLE t1(x);
CREATE TABLE t2(x);
CREATE TABLE t3(x);
}
} {}
do_test tkt-5e10420e8d.2 {
db eval {
INSERT INTO t3 VALUES(randomblob(500 + 1024*248));
INSERT INTO t1 VALUES(randomblob(1500));
INSERT INTO t2 VALUES(randomblob(500 + 1024*248));
DELETE FROM t3;
DELETE FROM t2;
DELETE FROM t1;
}
} {}
do_test tkt-5e10420e8d.3 {
db eval {
PRAGMA incremental_vacuum(248)
}
} {}
do_test tkt-5e10420e8d.4 {
db eval {
PRAGMA incremental_vacuum(1)
}
} {}
db close
sqlite3 db test.db
do_test tkt-5e10420e8d.5 {
db eval {PRAGMA integrity_check;}
} {ok}
finish_test
+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
+31 -24
View File
@@ -65,32 +65,39 @@ close $in
set varpattern {^[a-zA-Z][a-zA-Z_0-9 *]+sqlite3_[_a-zA-Z0-9]+(\[|;| =)}
set declpattern {^ *[a-zA-Z][a-zA-Z_0-9 ]+ \**sqlite3_[_a-zA-Z0-9]+\(}
# Process the src/sqlite.h.in file.
# Process the src/sqlite.h.in ext/rtree/sqlite3rtree.h files.
#
set in [open $TOP/src/sqlite.h.in]
while {![eof $in]} {
foreach file [list $TOP/src/sqlite.h.in $TOP/ext/rtree/sqlite3rtree.h] {
set in [open $file]
while {![eof $in]} {
set line [gets $in]
set line [gets $in]
regsub -- --VERS-- $line $zVersion line
regsub -- --VERSION-NUMBER-- $line $nVersion line
regsub -- --SOURCE-ID-- $line "$zDate $zUuid" line
if {[regexp {define SQLITE_EXTERN extern} $line]} {
# File sqlite3rtree.h contains a line "#include <sqlite3.h>". Omit this
# line when copying sqlite3rtree.h into sqlite3.h.
#
if {[string match {*#include*<sqlite3.h>*} $line]} continue
regsub -- --VERS-- $line $zVersion line
regsub -- --VERSION-NUMBER-- $line $nVersion line
regsub -- --SOURCE-ID-- $line "$zDate $zUuid" line
if {[regexp {define SQLITE_EXTERN extern} $line]} {
puts $line
puts [gets $in]
puts ""
puts "#ifndef SQLITE_API"
puts "# define SQLITE_API"
puts "#endif"
set line ""
}
if {([regexp $varpattern $line] && ![regexp {^ *typedef} $line])
|| ([regexp $declpattern $line])
} {
set line "SQLITE_API $line"
}
puts $line
puts [gets $in]
puts ""
puts "#ifndef SQLITE_API"
puts "# define SQLITE_API"
puts "#endif"
set line ""
}
if {([regexp $varpattern $line] && ![regexp {^ *typedef} $line])
|| ([regexp $declpattern $line])
} {
set line "SQLITE_API $line"
}
puts $line
close $in
}
close $in