When possible, have FTS use 32-bit operations to read varints from the database.

FossilOrigin-Name: aa7ba302ed13aedde89b5bcbe9119799c0da8a42
This commit is contained in:
dan 2013-11-12 17:46:44 +00:00
parent 5c7917e4b4
commit 85963f5474
9 changed files with 246 additions and 48 deletions

View File

@ -330,21 +330,35 @@ int sqlite3Fts3PutVarint(char *p, sqlite_int64 v){
return (int) (q - (unsigned char *)p);
}
#define GETVARINT_STEP(v, ptr, shift, mask1, mask2, var, ret) \
v = (v & mask1) | ( (*ptr++) << shift ); \
if( (v & mask2)==0 ){ var = v; return ret; }
/*
** Read a 64-bit variable-length integer from memory starting at p[0].
** Return the number of bytes read, or 0 on error.
** The value is stored in *v.
*/
int sqlite3Fts3GetVarint(const char *p, sqlite_int64 *v){
const unsigned char *q = (const unsigned char *) p;
sqlite_uint64 x = 0, y = 1;
while( (*q&0x80)==0x80 && q-(unsigned char *)p<FTS3_VARINT_MAX ){
x += y * (*q++ & 0x7f);
y <<= 7;
const char *pStart = p;
u32 a;
u64 b;
int ret;
int shift;
GETVARINT_STEP(a, p, 0, 0x00, 0x80, *v, 1);
GETVARINT_STEP(a, p, 7, 0x7F, 0x4000, *v, 2);
GETVARINT_STEP(a, p, 14, 0x3FFF, 0x200000, *v, 3);
GETVARINT_STEP(a, p, 21, 0x1FFFFF, 0x10000000, *v, 4);
b = (a & 0x0FFFFFFF );
for(shift=28; shift<=63; shift+=7){
u64 c = *p++;
b += (c&0x7F) << shift;
if( (c & 0x80)==0 ) break;
}
x += y * (*q++);
*v = (sqlite_int64) x;
return (int) (q - (unsigned char *)p);
*v = b;
return p - pStart;
}
/*
@ -352,10 +366,21 @@ int sqlite3Fts3GetVarint(const char *p, sqlite_int64 *v){
** 32-bit integer before it is returned.
*/
int sqlite3Fts3GetVarint32(const char *p, int *pi){
sqlite_int64 i;
int ret = sqlite3Fts3GetVarint(p, &i);
*pi = (int) i;
return ret;
u32 a;
#ifndef fts3GetVarint32
GETVARINT_STEP(a, p, 0, 0x00, 0x80, *pi, 1);
#else
a = (*p++);
assert( a & 0x80 );
#endif
GETVARINT_STEP(a, p, 7, 0x7F, 0x4000, *pi, 2);
GETVARINT_STEP(a, p, 14, 0x3FFF, 0x200000, *pi, 3);
GETVARINT_STEP(a, p, 21, 0x1FFFFF, 0x10000000, *pi, 4);
a = (a & 0x0FFFFFFF );
*pi = (int)(a | ((u32)(*p & 0x0F) << 28));
return 5;
}
/*
@ -1715,10 +1740,10 @@ static int fts3ScanInteriorNode(
/* Load the next term on the node into zBuffer. Use realloc() to expand
** the size of zBuffer if required. */
if( !isFirstTerm ){
zCsr += sqlite3Fts3GetVarint32(zCsr, &nPrefix);
zCsr += fts3GetVarint32(zCsr, &nPrefix);
}
isFirstTerm = 0;
zCsr += sqlite3Fts3GetVarint32(zCsr, &nSuffix);
zCsr += fts3GetVarint32(zCsr, &nSuffix);
if( nPrefix<0 || nSuffix<0 || &zCsr[nSuffix]>zEnd ){
rc = FTS_CORRUPT_VTAB;
@ -1806,7 +1831,7 @@ static int fts3SelectLeaf(
assert( piLeaf || piLeaf2 );
sqlite3Fts3GetVarint32(zNode, &iHeight);
fts3GetVarint32(zNode, &iHeight);
rc = fts3ScanInteriorNode(zTerm, nTerm, zNode, nNode, piLeaf, piLeaf2);
assert( !piLeaf2 || !piLeaf || rc!=SQLITE_OK || (*piLeaf<=*piLeaf2) );
@ -2008,11 +2033,11 @@ static void fts3PoslistMerge(
int iCol1; /* The current column index in pp1 */
int iCol2; /* The current column index in pp2 */
if( *p1==POS_COLUMN ) sqlite3Fts3GetVarint32(&p1[1], &iCol1);
if( *p1==POS_COLUMN ) fts3GetVarint32(&p1[1], &iCol1);
else if( *p1==POS_END ) iCol1 = POSITION_LIST_END;
else iCol1 = 0;
if( *p2==POS_COLUMN ) sqlite3Fts3GetVarint32(&p2[1], &iCol2);
if( *p2==POS_COLUMN ) fts3GetVarint32(&p2[1], &iCol2);
else if( *p2==POS_END ) iCol2 = POSITION_LIST_END;
else iCol2 = 0;
@ -2105,11 +2130,11 @@ static int fts3PoslistPhraseMerge(
assert( p!=0 && *p1!=0 && *p2!=0 );
if( *p1==POS_COLUMN ){
p1++;
p1 += sqlite3Fts3GetVarint32(p1, &iCol1);
p1 += fts3GetVarint32(p1, &iCol1);
}
if( *p2==POS_COLUMN ){
p2++;
p2 += sqlite3Fts3GetVarint32(p2, &iCol2);
p2 += fts3GetVarint32(p2, &iCol2);
}
while( 1 ){
@ -2159,9 +2184,9 @@ static int fts3PoslistPhraseMerge(
if( 0==*p1 || 0==*p2 ) break;
p1++;
p1 += sqlite3Fts3GetVarint32(p1, &iCol1);
p1 += fts3GetVarint32(p1, &iCol1);
p2++;
p2 += sqlite3Fts3GetVarint32(p2, &iCol2);
p2 += fts3GetVarint32(p2, &iCol2);
}
/* Advance pointer p1 or p2 (whichever corresponds to the smaller of
@ -2173,12 +2198,12 @@ static int fts3PoslistPhraseMerge(
fts3ColumnlistCopy(0, &p1);
if( 0==*p1 ) break;
p1++;
p1 += sqlite3Fts3GetVarint32(p1, &iCol1);
p1 += fts3GetVarint32(p1, &iCol1);
}else{
fts3ColumnlistCopy(0, &p2);
if( 0==*p2 ) break;
p2++;
p2 += sqlite3Fts3GetVarint32(p2, &iCol2);
p2 += fts3GetVarint32(p2, &iCol2);
}
}
@ -5345,7 +5370,7 @@ static void fts3EvalUpdateCounts(Fts3Expr *pExpr){
pExpr->aMI[iCol*3 + 2] += (iCnt>0);
if( *p==0x00 ) break;
p++;
p += sqlite3Fts3GetVarint32(p, &iCol);
p += fts3GetVarint32(p, &iCol);
}
}
@ -5646,7 +5671,7 @@ int sqlite3Fts3EvalPhrasePoslist(
if( *pIter==0x01 ){
pIter++;
pIter += sqlite3Fts3GetVarint32(pIter, &iThis);
pIter += fts3GetVarint32(pIter, &iThis);
}else{
iThis = 0;
}
@ -5654,7 +5679,7 @@ int sqlite3Fts3EvalPhrasePoslist(
fts3ColumnlistCopy(0, &pIter);
if( *pIter==0x00 ) return 0;
pIter++;
pIter += sqlite3Fts3GetVarint32(pIter, &iThis);
pIter += fts3GetVarint32(pIter, &iThis);
}
*ppOut = ((iCol==iThis)?pIter:0);

View File

@ -524,6 +524,10 @@ struct Fts3MultiSegReader {
int sqlite3Fts3Incrmerge(Fts3Table*,int,int);
#define fts3GetVarint32(p, piVal) ( \
(*(u8*)(p)&0x80) ? sqlite3Fts3GetVarint32(p, piVal) : (*piVal=*(u8*)(p), 1) \
)
/* fts3.c */
int sqlite3Fts3PutVarint(char *, sqlite3_int64);
int sqlite3Fts3GetVarint(const char *, sqlite_int64 *);

View File

@ -128,7 +128,7 @@ struct StrBuffer {
*/
static void fts3GetDeltaPosition(char **pp, int *piPos){
int iVal;
*pp += sqlite3Fts3GetVarint32(*pp, &iVal);
*pp += fts3GetVarint32(*pp, &iVal);
*piPos += (iVal-2);
}

View File

@ -517,6 +517,51 @@ static int fts3_test_tokenizer_cmd(
return TCL_OK;
}
static int fts3_test_varint_cmd(
ClientData clientData,
Tcl_Interp *interp,
int objc,
Tcl_Obj *CONST objv[]
){
#ifdef SQLITE_ENABLE_FTS3
char aBuf[24];
int rc;
Tcl_WideInt w, w2;
int nByte, nByte2;
if( objc!=2 ){
Tcl_WrongNumArgs(interp, 1, objv, "INTEGER");
return TCL_ERROR;
}
rc = Tcl_GetWideIntFromObj(interp, objv[1], &w);
if( rc!=TCL_OK ) return rc;
nByte = sqlite3Fts3PutVarint(aBuf, w);
nByte2 = sqlite3Fts3GetVarint(aBuf, &w2);
if( w!=w2 || nByte!=nByte2 ){
char *zErr = sqlite3_mprintf("error testing %lld", w);
Tcl_ResetResult(interp);
Tcl_AppendResult(interp, zErr, 0);
return TCL_ERROR;
}
if( w<=2147483647 && w>=0 ){
int i;
nByte2 = fts3GetVarint32(aBuf, &i);
if( (int)w!=i || nByte!=nByte2 ){
char *zErr = sqlite3_mprintf("error testing %lld (32-bit)", w);
Tcl_ResetResult(interp);
Tcl_AppendResult(interp, zErr, 0);
return TCL_ERROR;
}
}
#endif
UNUSED_PARAMETER(clientData);
return TCL_OK;
}
/*
** End of tokenizer code.
**************************************************************************/
@ -529,6 +574,10 @@ int Sqlitetestfts3_Init(Tcl_Interp *interp){
Tcl_CreateObjCommand(
interp, "fts3_test_tokenizer", fts3_test_tokenizer_cmd, 0, 0
);
Tcl_CreateObjCommand(
interp, "fts3_test_varint", fts3_test_varint_cmd, 0, 0
);
return TCL_OK;
}
#endif /* SQLITE_ENABLE_FTS3 || SQLITE_ENABLE_FTS4 */

View File

@ -1344,8 +1344,8 @@ static int fts3SegReaderNext(
/* Because of the FTS3_NODE_PADDING bytes of padding, the following is
** safe (no risk of overread) even if the node data is corrupted. */
pNext += sqlite3Fts3GetVarint32(pNext, &nPrefix);
pNext += sqlite3Fts3GetVarint32(pNext, &nSuffix);
pNext += fts3GetVarint32(pNext, &nPrefix);
pNext += fts3GetVarint32(pNext, &nSuffix);
if( nPrefix<0 || nSuffix<=0
|| &pNext[nSuffix]>&pReader->aNode[pReader->nNode]
){
@ -1368,7 +1368,7 @@ static int fts3SegReaderNext(
memcpy(&pReader->zTerm[nPrefix], pNext, nSuffix);
pReader->nTerm = nPrefix+nSuffix;
pNext += nSuffix;
pNext += sqlite3Fts3GetVarint32(pNext, &pReader->nDoclist);
pNext += fts3GetVarint32(pNext, &pReader->nDoclist);
pReader->aDoclist = pNext;
pReader->pOffsetList = 0;
@ -2529,7 +2529,7 @@ static void fts3ColumnFilter(
break;
}
p = &pList[1];
p += sqlite3Fts3GetVarint32(p, &iCurrent);
p += fts3GetVarint32(p, &iCurrent);
}
if( bZero && &pList[nList]!=pEnd ){
@ -3494,9 +3494,9 @@ static int nodeReaderNext(NodeReader *p){
p->aNode = 0;
}else{
if( bFirst==0 ){
p->iOff += sqlite3Fts3GetVarint32(&p->aNode[p->iOff], &nPrefix);
p->iOff += fts3GetVarint32(&p->aNode[p->iOff], &nPrefix);
}
p->iOff += sqlite3Fts3GetVarint32(&p->aNode[p->iOff], &nSuffix);
p->iOff += fts3GetVarint32(&p->aNode[p->iOff], &nSuffix);
blobGrowBuffer(&p->term, nPrefix+nSuffix, &rc);
if( rc==SQLITE_OK ){
@ -3504,7 +3504,7 @@ static int nodeReaderNext(NodeReader *p){
p->term.n = nPrefix+nSuffix;
p->iOff += nSuffix;
if( p->iChild==0 ){
p->iOff += sqlite3Fts3GetVarint32(&p->aNode[p->iOff], &p->nDoclist);
p->iOff += fts3GetVarint32(&p->aNode[p->iOff], &p->nDoclist);
p->aDoclist = &p->aNode[p->iOff];
p->iOff += p->nDoclist;
}
@ -4556,7 +4556,7 @@ static int fts3IncrmergeHintPop(Blob *pHint, i64 *piAbsLevel, int *pnInput){
pHint->n = i;
i += sqlite3Fts3GetVarint(&pHint->a[i], piAbsLevel);
i += sqlite3Fts3GetVarint32(&pHint->a[i], pnInput);
i += fts3GetVarint32(&pHint->a[i], pnInput);
if( i!=nHint ) return SQLITE_CORRUPT_VTAB;
return SQLITE_OK;

View File

@ -1,5 +1,5 @@
C A\sbetter\s(simpler)\sfix\sto\sthe\scount(*)\sproblem\saddressed\sin\sthe\sprevious\ncheck-in.
D 2013-11-12T15:33:40.954
C When\spossible,\shave\sFTS\suse\s32-bit\soperations\sto\sread\svarints\sfrom\sthe\sdatabase.
D 2013-11-12T17:46:44.081
F Makefile.arm-wince-mingw32ce-gcc d6df77f1f48d690bd73162294bbba7f59507c72f
F Makefile.in d12e4455cf7a36e42d3949876c1c3b88ff70867a
F Makefile.linux-gcc 91d710bdc4998cb015f39edf3cb314ec4f4d7e23
@ -78,25 +78,25 @@ F ext/fts3/README.content fdc666a70d5257a64fee209f97cf89e0e6e32b51
F ext/fts3/README.syntax a19711dc5458c20734b8e485e75fb1981ec2427a
F ext/fts3/README.tokenizers e0a8b81383ea60d0334d274fadf305ea14a8c314
F ext/fts3/README.txt 8c18f41574404623b76917b9da66fcb0ab38328d
F ext/fts3/fts3.c f25ae5729d40cc4e661c0a552685038f27e72bc9
F ext/fts3/fts3.c 7eb3b2935f0bd5dca23c2215b296606bdd7760f6
F ext/fts3/fts3.h 3a10a0af180d502cecc50df77b1b22df142817fe
F ext/fts3/fts3Int.h 8689f7cf85020e7f88d1e761eeac480c3b0ea7ad
F ext/fts3/fts3Int.h eb5f8029589f3d8f1dc7fd50c773326a640388b1
F ext/fts3/fts3_aux.c 5c211e17a64885faeb16b9ba7772f9d5445c2365
F ext/fts3/fts3_expr.c 5165c365cb5a035f5be8bb296f7aa3211d43e4ac
F ext/fts3/fts3_hash.c 8dd2d06b66c72c628c2732555a32bc0943114914
F ext/fts3/fts3_hash.h 39cf6874dc239d6b4e30479b1975fe5b22a3caaf
F ext/fts3/fts3_icu.c e319e108661147bcca8dd511cd562f33a1ba81b5
F ext/fts3/fts3_porter.c a465b49fcb8249a755792f87516eff182efa42b3
F ext/fts3/fts3_snippet.c e8ee8c101dd9cfbc9568d134e869d2bd2f7f6d4d
F ext/fts3/fts3_snippet.c 51beb5c1498176fd9caccaf1c75b55cb803a985a
F ext/fts3/fts3_term.c a521f75132f9a495bdca1bdd45949b3191c52763
F ext/fts3/fts3_test.c f9a1a1702db1bfad3e2d0064746eeb808f125489
F ext/fts3/fts3_test.c 8a3a78c4458b2d7c631fcf4b152a5cd656fa7038
F ext/fts3/fts3_tokenize_vtab.c 011170fe9eba5ff062f1a31d3188e00267716706
F ext/fts3/fts3_tokenizer.c bbdc731bc91338050675c6d1da9ab82147391e16
F ext/fts3/fts3_tokenizer.h 64c6ef6c5272c51ebe60fc607a896e84288fcbc3
F ext/fts3/fts3_tokenizer1.c 5c98225a53705e5ee34824087478cf477bdb7004
F ext/fts3/fts3_unicode.c 92391b4b4fb043564c6539ea9b8661e3bcba47b9
F ext/fts3/fts3_unicode2.c 0113d3acf13429e6dc38e0647d1bc71211c31a4d
F ext/fts3/fts3_write.c 17817f0cb6c8555e1be5e073fbddf676c60f4ea9
F ext/fts3/fts3_write.c cdebe72171a217b1465032dec103f8d17f7dad4d
F ext/fts3/fts3speed.tcl b54caf6a18d38174f1a6e84219950d85e98bb1e9
F ext/fts3/mkfts3amal.tcl 252ecb7fe6467854f2aa237bf2c390b74e71f100
F ext/fts3/tool/fts3view.c 6cfc5b67a5f0e09c0d698f9fd012c784bfaa9197
@ -558,6 +558,7 @@ F test/fts3snippet.test d524af6bcef4714e059ef559113dbdc924cd33d1
F test/fts3sort.test ed34c716a11cc2009a35210e84ad5f9c102362ca
F test/fts3tok1.test b10d0a12a0ab5f905cea1200b745de233f37443f
F test/fts3tok_err.test 52273cd193b9036282f7bacb43da78c6be87418d
F test/fts3varint.test 23e79002ebebd6fbb1235504f7acb087b0fea741
F test/fts4aa.test 0c3152322c7f0b548cc942ad763eaba0da87ccca
F test/fts4check.test 66fa274cab2b615f2fb338b257713aba8fad88a8
F test/fts4content.test 2e7252557d6d24afa101d9ba1de710d6140e6d06
@ -731,7 +732,7 @@ F test/pagesize.test 1dd51367e752e742f58e861e65ed7390603827a0
F test/pcache.test b09104b03160aca0d968d99e8cd2c5b1921a993d
F test/pcache2.test a83efe2dec0d392f814bfc998def1d1833942025
F test/percentile.test b98fc868d71eb5619d42a1702e9ab91718cbed54
F test/permutations.test e154f5ed66d4d4913a99a110e870c9407f75b055
F test/permutations.test af3278cbea3a19e025d5169be8193ff48dc3f862
F test/pragma.test e882183ecd21d064cec5c7aaea174fbd36293429
F test/pragma2.test aea7b3d82c76034a2df2b38a13745172ddc0bc13
F test/printf.test ec9870c4dce8686a37818e0bf1aba6e6a1863552
@ -1136,7 +1137,7 @@ F tool/vdbe-compress.tcl f12c884766bd14277f4fcedcae07078011717381
F tool/warnings-clang.sh f6aa929dc20ef1f856af04a730772f59283631d4
F tool/warnings.sh d1a6de74685f360ab718efda6265994b99bbea01
F tool/win/sqlite.vsix 030f3eeaf2cb811a3692ab9c14d021a75ce41fff
P 91174779786be07d63f3c4a5277602ddc5f0ba26
R a014858d7aea6c178ec71eb38d26a678
U drh
Z 90958247e5f1aff2cac4a81cce729911
P 0f924c6ef6cf2ac5a61aafa8dd8e3309b3970499
R 5351cba7d5954e18211d3eb00255913e
U dan
Z 8f4bd276a0e96490eb3d64253721bcb5

View File

@ -1 +1 @@
0f924c6ef6cf2ac5a61aafa8dd8e3309b3970499
aa7ba302ed13aedde89b5bcbe9119799c0da8a42

118
test/fts3varint.test Normal file
View File

@ -0,0 +1,118 @@
# 2007 November 23
#
# 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.
#
#***********************************************************************
# This file runs all tests.
#
# $Id: fts3.test,v 1.2 2008/07/23 18:17:32 drh Exp $
set testdir [file dirname $argv0]
source $testdir/permutations.test
set testprefix fts3varint
ifcapable !fts3 {
finish_test
return
}
proc test_list {list} {
foreach n $list { fts3_test_varint $n }
}
proc do_fts3_varint_test {tn list} {
uplevel [list do_test $tn [list test_list $list] {}]
}
do_fts3_varint_test 1.0 {
1 10 100 1000 10000 100000 1000000
10000000 100000000 1000000000 10000000000
100000000000 1000000000000 10000000000000
}
do_fts3_varint_test 1.1 {
-1 -10 -100 -1000 -10000 -100000 -1000000
-10000000 -100000000 -1000000000 -10000000000
-100000000000 -1000000000000 -10000000000000
}
do_fts3_varint_test 2.0 { 0 1 2 }
do_fts3_varint_test 2.1 { 1 2 3 }
do_fts3_varint_test 2.2 { 3 4 5 }
do_fts3_varint_test 2.3 { 7 8 9 }
do_fts3_varint_test 2.4 { 15 16 17 }
do_fts3_varint_test 2.5 { 31 32 33 }
do_fts3_varint_test 2.6 { 63 64 65 }
do_fts3_varint_test 2.7 { 127 128 129 }
do_fts3_varint_test 2.8 { 255 256 257 }
do_fts3_varint_test 2.9 { 511 512 513 }
do_fts3_varint_test 2.10 { 1023 1024 1025 }
do_fts3_varint_test 2.11 { 2047 2048 2049 }
do_fts3_varint_test 2.12 { 4095 4096 4097 }
do_fts3_varint_test 2.13 { 8191 8192 8193 }
do_fts3_varint_test 2.14 { 16383 16384 16385 }
do_fts3_varint_test 2.15 { 32767 32768 32769 }
do_fts3_varint_test 2.16 { 65535 65536 65537 }
do_fts3_varint_test 2.17 { 131071 131072 131073 }
do_fts3_varint_test 2.18 { 262143 262144 262145 }
do_fts3_varint_test 2.19 { 524287 524288 524289 }
do_fts3_varint_test 2.20 { 1048575 1048576 1048577 }
do_fts3_varint_test 2.21 { 2097151 2097152 2097153 }
do_fts3_varint_test 2.22 { 4194303 4194304 4194305 }
do_fts3_varint_test 2.23 { 8388607 8388608 8388609 }
do_fts3_varint_test 2.24 { 16777215 16777216 16777217 }
do_fts3_varint_test 2.25 { 33554431 33554432 33554433 }
do_fts3_varint_test 2.26 { 67108863 67108864 67108865 }
do_fts3_varint_test 2.27 { 134217727 134217728 134217729 }
do_fts3_varint_test 2.28 { 268435455 268435456 268435457 }
do_fts3_varint_test 2.29 { 536870911 536870912 536870913 }
do_fts3_varint_test 2.30 { 1073741823 1073741824 1073741825 }
do_fts3_varint_test 2.31 { 2147483647 2147483648 2147483649 }
do_fts3_varint_test 2.32 { 4294967295 4294967296 4294967297 }
do_fts3_varint_test 2.33 { 8589934591 8589934592 8589934593 }
do_fts3_varint_test 2.34 { 17179869183 17179869184 17179869185 }
do_fts3_varint_test 2.35 { 34359738367 34359738368 34359738369 }
do_fts3_varint_test 2.36 { 68719476735 68719476736 68719476737 }
do_fts3_varint_test 2.37 { 137438953471 137438953472 137438953473 }
do_fts3_varint_test 2.38 { 274877906943 274877906944 274877906945 }
do_fts3_varint_test 2.39 { 549755813887 549755813888 549755813889 }
do_fts3_varint_test 2.40 { 1099511627775 1099511627776 1099511627777 }
do_fts3_varint_test 2.41 { 2199023255551 2199023255552 2199023255553 }
do_fts3_varint_test 2.42 { 4398046511103 4398046511104 4398046511105 }
do_fts3_varint_test 2.43 { 8796093022207 8796093022208 8796093022209 }
do_fts3_varint_test 2.44 { 17592186044415 17592186044416 17592186044417 }
do_fts3_varint_test 2.45 { 35184372088831 35184372088832 35184372088833 }
do_fts3_varint_test 2.46 { 70368744177663 70368744177664 70368744177665 }
do_fts3_varint_test 2.47 { 140737488355327 140737488355328 140737488355329 }
do_fts3_varint_test 2.48 { 281474976710655 281474976710656 281474976710657 }
do_fts3_varint_test 2.49 { 562949953421311 562949953421312 562949953421313 }
do_fts3_varint_test 2.50 { 1125899906842623 1125899906842624 1125899906842625 }
do_fts3_varint_test 2.51 { 2251799813685247 2251799813685248 2251799813685249 }
do_fts3_varint_test 2.52 { 4503599627370495 4503599627370496 4503599627370497 }
do_fts3_varint_test 2.53 { 9007199254740991 9007199254740992 9007199254740993 }
do_fts3_varint_test 2.54 {
18014398509481983 18014398509481984 18014398509481985 }
do_fts3_varint_test 2.55 {
36028797018963967 36028797018963968 36028797018963969 }
do_fts3_varint_test 2.56 {
72057594037927935 72057594037927936 72057594037927937 }
do_fts3_varint_test 2.57 {
144115188075855871 144115188075855872 144115188075855873 }
do_fts3_varint_test 2.58 {
288230376151711743 288230376151711744 288230376151711745 }
do_fts3_varint_test 2.59 {
576460752303423487 576460752303423488 576460752303423489 }
do_fts3_varint_test 2.60 {
1152921504606846975 1152921504606846976 1152921504606846977 }
do_fts3_varint_test 2.61 {
2305843009213693951 2305843009213693952 2305843009213693953 }
do_fts3_varint_test 2.62 {
4611686018427387903 4611686018427387904 4611686018427387905 }
do_fts3_varint_test 2.63 {
9223372036854775807 9223372036854775808 9223372036854775809 }
do_fts3_varint_test 3.0 { 18446744073709551615 -18446744073709551615 }
finish_test

View File

@ -195,6 +195,7 @@ test_suite "fts3" -prefix "" -description {
fts3conf.test fts3prefix.test fts3fault2.test fts3corrupt.test
fts3corrupt2.test fts3first.test fts4langid.test fts4merge.test
fts4check.test fts4unicode.test fts4noti.test
fts3varint.test
}
test_suite "nofaultsim" -prefix "" -description {