Compare commits
5 Commits
script_command
...
fts5
| Author | SHA1 | Date | |
|---|---|---|---|
| b9502fd869 | |||
| c58edb03a2 | |||
| b69bf94be6 | |||
| a7123920d2 | |||
| db433615a4 |
+4
-3
@@ -346,7 +346,6 @@ struct Fts5IndexIter {
|
||||
*/
|
||||
#define FTS5INDEX_QUERY_PREFIX 0x0001 /* Prefix query */
|
||||
#define FTS5INDEX_QUERY_DESC 0x0002 /* Docs in descending rowid order */
|
||||
#define FTS5INDEX_QUERY_TEST_NOIDX 0x0004 /* Do not use prefix index */
|
||||
#define FTS5INDEX_QUERY_SCAN 0x0008 /* Scan query (fts5vocab) */
|
||||
|
||||
/* The following are used internally by the fts5_index.c module. They are
|
||||
@@ -473,7 +472,7 @@ int sqlite3Fts5IndexIntegrityCheck(Fts5Index*, u64 cksum);
|
||||
*/
|
||||
int sqlite3Fts5IndexInit(sqlite3*);
|
||||
|
||||
int sqlite3Fts5IndexSetCookie(Fts5Index*, int);
|
||||
int sqlite3Fts5IndexIncrCookie(Fts5Index*);
|
||||
|
||||
/*
|
||||
** Return the total number of entries read from the %_data table by
|
||||
@@ -484,10 +483,12 @@ int sqlite3Fts5IndexReads(Fts5Index *p);
|
||||
int sqlite3Fts5IndexReinit(Fts5Index *p);
|
||||
int sqlite3Fts5IndexOptimize(Fts5Index *p);
|
||||
int sqlite3Fts5IndexMerge(Fts5Index *p, int nMerge);
|
||||
int sqlite3Fts5IndexReset(Fts5Index *p);
|
||||
int sqlite3Fts5IndexNewTrans(Fts5Index *p);
|
||||
|
||||
int sqlite3Fts5IndexLoadConfig(Fts5Index *p);
|
||||
|
||||
void sqlite3Fts5IndexCloseReader(Fts5Index*);
|
||||
|
||||
/*
|
||||
** End of interface to code in fts5_index.c.
|
||||
**************************************************************************/
|
||||
|
||||
+486
-436
File diff suppressed because it is too large
Load Diff
+18
-4
@@ -602,7 +602,7 @@ static int fts5NewTransaction(Fts5Table *pTab){
|
||||
for(pCsr=pTab->pGlobal->pCsr; pCsr; pCsr=pCsr->pNext){
|
||||
if( pCsr->base.pVtab==(sqlite3_vtab*)pTab ) return SQLITE_OK;
|
||||
}
|
||||
return sqlite3Fts5StorageReset(pTab->pStorage);
|
||||
return sqlite3Fts5IndexNewTrans(pTab->pIndex);
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -616,6 +616,9 @@ static int fts5OpenMethod(sqlite3_vtab *pVTab, sqlite3_vtab_cursor **ppCsr){
|
||||
int rc; /* Return code */
|
||||
|
||||
rc = fts5NewTransaction(pTab);
|
||||
if( rc==SQLITE_OK ){
|
||||
rc = sqlite3Fts5IndexLoadConfig(pTab->pIndex);
|
||||
}
|
||||
if( rc==SQLITE_OK ){
|
||||
nByte = sizeof(Fts5Cursor) + pConfig->nCol * sizeof(int);
|
||||
pCsr = (Fts5Cursor*)sqlite3_malloc(nByte);
|
||||
@@ -630,6 +633,9 @@ static int fts5OpenMethod(sqlite3_vtab *pVTab, sqlite3_vtab_cursor **ppCsr){
|
||||
rc = SQLITE_NOMEM;
|
||||
}
|
||||
}
|
||||
if( rc!=SQLITE_OK ){
|
||||
sqlite3Fts5IndexCloseReader(pTab->pIndex);
|
||||
}
|
||||
*ppCsr = (sqlite3_vtab_cursor*)pCsr;
|
||||
return rc;
|
||||
}
|
||||
@@ -710,6 +716,7 @@ static int fts5CloseMethod(sqlite3_vtab_cursor *pCursor){
|
||||
*pp = pCsr->pNext;
|
||||
|
||||
sqlite3_free(pCsr);
|
||||
sqlite3Fts5IndexCloseReader(pTab->pIndex);
|
||||
}
|
||||
return SQLITE_OK;
|
||||
}
|
||||
@@ -1589,9 +1596,16 @@ static int fts5SyncMethod(sqlite3_vtab *pVtab){
|
||||
** Implementation of xBegin() method.
|
||||
*/
|
||||
static int fts5BeginMethod(sqlite3_vtab *pVtab){
|
||||
fts5CheckTransactionState((Fts5Table*)pVtab, FTS5_BEGIN, 0);
|
||||
fts5NewTransaction((Fts5Table*)pVtab);
|
||||
return SQLITE_OK;
|
||||
Fts5Table *pTab = (Fts5Table*)pVtab;
|
||||
int rc;
|
||||
rc = fts5NewTransaction(pTab);
|
||||
if( rc!=SQLITE_OK ){
|
||||
sqlite3Fts5IndexCloseReader(pTab->pIndex);
|
||||
}
|
||||
#ifdef SQLITE_DEBUG
|
||||
if( rc==SQLITE_OK ) fts5CheckTransactionState(pTab, FTS5_BEGIN, 0);
|
||||
#endif
|
||||
return rc;
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
@@ -641,10 +641,6 @@ int sqlite3Fts5StorageMerge(Fts5Storage *p, int nMerge){
|
||||
return sqlite3Fts5IndexMerge(p->pIndex, nMerge);
|
||||
}
|
||||
|
||||
int sqlite3Fts5StorageReset(Fts5Storage *p){
|
||||
return sqlite3Fts5IndexReset(p->pIndex);
|
||||
}
|
||||
|
||||
/*
|
||||
** Allocate a new rowid. This is used for "external content" tables when
|
||||
** a NULL value is inserted into the rowid column. The new rowid is allocated
|
||||
@@ -1120,11 +1116,7 @@ int sqlite3Fts5StorageConfigValue(
|
||||
rc = sqlite3_reset(pReplace);
|
||||
}
|
||||
if( rc==SQLITE_OK && pVal ){
|
||||
int iNew = p->pConfig->iCookie + 1;
|
||||
rc = sqlite3Fts5IndexSetCookie(p->pIndex, iNew);
|
||||
if( rc==SQLITE_OK ){
|
||||
p->pConfig->iCookie = iNew;
|
||||
}
|
||||
rc = sqlite3Fts5IndexIncrCookie(p->pIndex);
|
||||
}
|
||||
return rc;
|
||||
}
|
||||
|
||||
@@ -645,3 +645,10 @@ proc fts5_tclnum_register {db} {
|
||||
# End of tokenizer code.
|
||||
#-------------------------------------------------------------------------
|
||||
|
||||
proc fts5_rowid_func {segid pgno} { return [expr ($segid<<37) + $pgno] }
|
||||
proc register_fts5_rowid {db} {
|
||||
$db func fts5_rowid -argcount 2 fts5_rowid_func
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -51,8 +51,66 @@ do_execsql_test 1.1 {
|
||||
do_execsql_test 1.2 {
|
||||
INSERT INTO t1(t1) VALUES('integrity-check');
|
||||
}
|
||||
}
|
||||
|
||||
#-------------------------------------------------------------------------
|
||||
# Test that the in-memory configuration does not become inconsistent with
|
||||
# respect to the on-disk configuration if a savepoint is rolled back.
|
||||
#
|
||||
proc posrowid {cmd} { $cmd xRowid }
|
||||
proc negrowid {cmd} { expr -1 * [$cmd xRowid] }
|
||||
sqlite3_fts5_create_function db posrowid posrowid
|
||||
sqlite3_fts5_create_function db negrowid negrowid
|
||||
|
||||
do_execsql_test 2.1 {
|
||||
INSERT INTO t1(rowid, a) VALUES(1001, 'x y 1');
|
||||
INSERT INTO t1(rowid, a) VALUES(1002, 'x y 2');
|
||||
INSERT INTO t1(rowid, a) VALUES(1003, 'x y 3');
|
||||
BEGIN;
|
||||
INSERT INTO t1(t1, rank) VALUES('rank', 'posrowid()');
|
||||
SELECT a FROM t1('x') ORDER BY rank;
|
||||
} {{x y 1} {x y 2} {x y 3}}
|
||||
|
||||
do_execsql_test 2.2 {
|
||||
SAVEPOINT abc;
|
||||
INSERT INTO t1(t1, rank) VALUES('rank', 'negrowid()');
|
||||
SELECT a FROM t1('x') ORDER BY rank;
|
||||
} {{x y 3} {x y 2} {x y 1}}
|
||||
|
||||
do_execsql_test 2.3 {
|
||||
ROLLBACK TO abc;
|
||||
SELECT a FROM t1('x') ORDER BY rank;
|
||||
COMMIT;
|
||||
} {{x y 1} {x y 2} {x y 3}}
|
||||
|
||||
#-------------------------------------------------------------------------
|
||||
# Test that the in-memory structure does not become inconsistent with
|
||||
# respect to the on-disk configuration if a savepoint is rolled back.
|
||||
#
|
||||
do_execsql_test 3.1 {
|
||||
CREATE VIRTUAL TABLE t2 USING fts5(x, detail=%DETAIL%);
|
||||
INSERT INTO t2 VALUES('a 1');
|
||||
INSERT INTO t2 VALUES('a 2');
|
||||
INSERT INTO t2 VALUES('a 3');
|
||||
SELECT count(*) FROM t2_data;
|
||||
} {5}
|
||||
|
||||
do_execsql_test 3.2 {
|
||||
BEGIN;
|
||||
SAVEPOINT one;
|
||||
INSERT INTO t2(rowid, x) VALUES(8, 'a 8');
|
||||
INSERT INTO t2(rowid, x) VALUES(7, 'a 7');
|
||||
INSERT INTO t2(rowid, x) VALUES(6, 'a 6');
|
||||
SELECT count(*) FROM t2_data;
|
||||
} {7}
|
||||
do_execsql_test 3.3 { INSERT INTO t2(t2) VALUES('integrity-check') } {}
|
||||
|
||||
do_execsql_test 3.4 {
|
||||
ROLLBACK TO one;
|
||||
SELECT count(*) FROM t2_data;
|
||||
} {5}
|
||||
do_execsql_test 3.5 { INSERT INTO t2(t2) VALUES('integrity-check') } {}
|
||||
|
||||
} ;# foreach_detail_mode
|
||||
|
||||
finish_test
|
||||
|
||||
|
||||
@@ -41,18 +41,20 @@ db_save
|
||||
do_execsql_test 1.2 { INSERT INTO t1(t1) VALUES('integrity-check') }
|
||||
set segid [lindex [fts5_level_segids t1] 0]
|
||||
|
||||
register_fts5_rowid db
|
||||
do_test 1.3 {
|
||||
execsql {
|
||||
DELETE FROM t1_data WHERE rowid = fts5_rowid('segment', $segid, 4);
|
||||
DELETE FROM t1_data WHERE rowid = fts5_rowid($segid, 4);
|
||||
}
|
||||
catchsql { INSERT INTO t1(t1) VALUES('integrity-check') }
|
||||
} {1 {database disk image is malformed}}
|
||||
|
||||
do_test 1.4 {
|
||||
db_restore_and_reopen
|
||||
register_fts5_rowid db
|
||||
execsql {
|
||||
UPDATE t1_data set block = X'00000000' || substr(block, 5) WHERE
|
||||
rowid = fts5_rowid('segment', $segid, 4);
|
||||
rowid = fts5_rowid($segid, 4);
|
||||
}
|
||||
catchsql { INSERT INTO t1(t1) VALUES('integrity-check') }
|
||||
} {1 {database disk image is malformed}}
|
||||
|
||||
@@ -86,7 +86,7 @@ set ::res [db eval {SELECT rowid, x1 FROM x1 WHERE x1 MATCH '*reads'}]
|
||||
do_faultsim_test 4 -faults oom-* -body {
|
||||
db eval {SELECT rowid, x, x1 FROM x1 WHERE x1 MATCH '*reads'}
|
||||
} -test {
|
||||
faultsim_test_result {0 {0 {} 3}}
|
||||
faultsim_test_result {0 {0 {} 4}}
|
||||
}
|
||||
|
||||
#-------------------------------------------------------------------------
|
||||
|
||||
@@ -0,0 +1,121 @@
|
||||
# 2016 March 26
|
||||
#
|
||||
# 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.
|
||||
#
|
||||
#*************************************************************************
|
||||
#
|
||||
# This file is focused on OOM errors.
|
||||
#
|
||||
|
||||
source [file join [file dirname [info script]] fts5_common.tcl]
|
||||
source $testdir/malloc_common.tcl
|
||||
set testprefix fts5faultC
|
||||
return_if_no_fts5
|
||||
|
||||
if 1 {
|
||||
|
||||
#--------------------------------------------------------------------------
|
||||
# Test that if an OOM error occurs while trying to set a configuration
|
||||
# option, the in-memory and on-disk configurations are not left in an
|
||||
# inconsistent state.
|
||||
#
|
||||
proc posrowid {cmd} { $cmd xRowid }
|
||||
proc negrowid {cmd} { expr -1 * [$cmd xRowid] }
|
||||
|
||||
sqlite3_fts5_create_function db posrowid posrowid
|
||||
sqlite3_fts5_create_function db negrowid negrowid
|
||||
|
||||
do_execsql_test 1.0.0 {
|
||||
CREATE VIRTUAL TABLE t1 USING fts5(x);
|
||||
INSERT INTO t1 VALUES('a b c');
|
||||
INSERT INTO t1 VALUES('d a d');
|
||||
INSERT INTO t1 VALUES('c b a');
|
||||
}
|
||||
do_execsql_test 1.0.1 {
|
||||
INSERT INTO t1(t1, rank) VALUES('rank', 'posrowid()');
|
||||
SELECT rowid FROM t1('a') ORDER BY rank;
|
||||
} {1 2 3}
|
||||
do_execsql_test 1.0.2 {
|
||||
INSERT INTO t1(t1, rank) VALUES('rank', 'negrowid()');
|
||||
SELECT rowid FROM t1('a') ORDER BY rank;
|
||||
} {3 2 1}
|
||||
|
||||
faultsim_save_and_close
|
||||
do_faultsim_test 1.1 -faults oom-* -prep {
|
||||
faultsim_restore_and_reopen
|
||||
sqlite3_fts5_create_function db posrowid posrowid
|
||||
sqlite3_fts5_create_function db negrowid negrowid
|
||||
execsql { SELECT * FROM t1('*reads') }
|
||||
} -body {
|
||||
execsql { INSERT INTO t1(t1, rank) VALUES('rank', 'posrowid()') }
|
||||
} -test {
|
||||
|
||||
faultsim_test_result [list 0 {}]
|
||||
sqlite3 db2 test.db
|
||||
set ex [db2 one { SELECT v FROM t1_config WHERE k='rank' }]
|
||||
switch -- $ex {
|
||||
"posrowid()" { set ex {1 2 3} }
|
||||
"negrowid()" { set ex {3 2 1} }
|
||||
default { error 1 }
|
||||
}
|
||||
|
||||
set res [db eval { SELECT rowid FROM t1('a') ORDER BY rank }]
|
||||
if {$res != $ex} {
|
||||
error "2: expected {$ex} got {$res}"
|
||||
}
|
||||
db2 close
|
||||
}
|
||||
|
||||
|
||||
#--------------------------------------------------------------------------
|
||||
|
||||
reset_db
|
||||
do_execsql_test 2.0 {
|
||||
CREATE VIRTUAL TABLE t1 USING fts5(y);
|
||||
}
|
||||
do_faultsim_test 2.1 -faults * -prep {
|
||||
sqlite3 db test.db
|
||||
execsql { SELECT * FROM t1('x') }
|
||||
} -body {
|
||||
execsql { SELECT * FROM t1('x') }
|
||||
execsql { SELECT * FROM t1('x') }
|
||||
} -test {
|
||||
faultsim_test_result [list 0 {}]
|
||||
}
|
||||
do_faultsim_test 2.2 -faults * -prep {
|
||||
sqlite3 db test.db
|
||||
execsql { INSERT INTO t1 VALUES('yy') }
|
||||
} -body {
|
||||
execsql { INSERT INTO t1 VALUES('yy') }
|
||||
execsql { INSERT INTO t1 VALUES('yy') }
|
||||
} -test {
|
||||
faultsim_test_result [list 0 {}]
|
||||
}
|
||||
|
||||
#--------------------------------------------------------------------------
|
||||
}
|
||||
reset_db
|
||||
do_execsql_test 3.0 {
|
||||
CREATE VIRTUAL TABLE t1 USING fts5(y);
|
||||
}
|
||||
faultsim_save_and_close
|
||||
do_faultsim_test 3.1 -faults * -prep {
|
||||
faultsim_restore_and_reopen
|
||||
execsql {
|
||||
BEGIN;
|
||||
INSERT INTO t1 VALUES('x y z');
|
||||
INSERT INTO t1 VALUES('a b c');
|
||||
}
|
||||
} -body {
|
||||
execsql { INSERT INTO t1(t1) VALUES('optimize') }
|
||||
} -test {
|
||||
faultsim_test_result [list 0 {}]
|
||||
}
|
||||
|
||||
finish_test
|
||||
|
||||
@@ -15,33 +15,13 @@
|
||||
source [file join [file dirname [info script]] fts5_common.tcl]
|
||||
set testprefix fts5rowid
|
||||
|
||||
# If SQLITE_ENABLE_FTS5 is defined, omit this file.
|
||||
ifcapable !fts5 {
|
||||
finish_test
|
||||
return
|
||||
}
|
||||
|
||||
do_catchsql_test 1.1 {
|
||||
SELECT fts5_rowid()
|
||||
} {1 {should be: fts5_rowid(subject, ....)}}
|
||||
|
||||
do_catchsql_test 1.2 {
|
||||
SELECT fts5_rowid('segment')
|
||||
} {1 {should be: fts5_rowid('segment', segid, pgno))}}
|
||||
|
||||
do_execsql_test 1.3 {
|
||||
SELECT fts5_rowid('segment', 1, 1)
|
||||
} {137438953473}
|
||||
|
||||
do_catchsql_test 1.4 {
|
||||
SELECT fts5_rowid('nosucharg');
|
||||
} {1 {first arg to fts5_rowid() must be 'segment'}}
|
||||
|
||||
return_if_no_fts5
|
||||
|
||||
#-------------------------------------------------------------------------
|
||||
# Tests of the fts5_decode() function.
|
||||
#
|
||||
reset_db
|
||||
register_fts5_rowid db
|
||||
do_execsql_test 2.1 {
|
||||
CREATE VIRTUAL TABLE x1 USING fts5(a, b);
|
||||
INSERT INTO x1(x1, rank) VALUES('pgsz', 32);
|
||||
@@ -92,7 +72,7 @@ do_execsql_test 2.6 {
|
||||
#} $res
|
||||
|
||||
do_execsql_test 2.8 {
|
||||
SELECT fts5_decode(fts5_rowid('segment', 1000, 1), X'AB')
|
||||
SELECT fts5_decode(fts5_rowid(1000, 1), X'AB')
|
||||
} {corrupt}
|
||||
|
||||
#-------------------------------------------------------------------------
|
||||
|
||||
@@ -350,7 +350,7 @@ do_execsql_test 14.3 {
|
||||
|
||||
do_execsql_test 14.4 {
|
||||
SELECT rowid, x, x1 FROM x1 WHERE x1 MATCH '*reads'
|
||||
} {0 {} 3}
|
||||
} {0 {} 4}
|
||||
|
||||
#-------------------------------------------------------------------------
|
||||
reset_db
|
||||
|
||||
@@ -55,11 +55,11 @@ foreach_detail_mode $testprefix {
|
||||
}
|
||||
execsql "CREATE VIRTUAL TABLE t2 USING fts5(detail=%DETAIL%,[join $cols ,])"
|
||||
} {}
|
||||
|
||||
|
||||
do_test 2.2 {
|
||||
execsql "INSERT INTO t2 VALUES([join $vals ,])"
|
||||
} {}
|
||||
|
||||
|
||||
foreach {tn q res} {
|
||||
1 { c1:val1 } 1
|
||||
2 { c300:val300 } 1
|
||||
@@ -81,5 +81,50 @@ do_execsql_test 3.0 {
|
||||
}
|
||||
|
||||
|
||||
#-------------------------------------------------------------------------
|
||||
# Check that if a CREATE VIRTUAL TABLE statement fails within a
|
||||
# transaction, any changes made to the database are reverted before
|
||||
# continuing.
|
||||
#
|
||||
reset_db
|
||||
do_catchsql_test 4.0 {
|
||||
BEGIN;
|
||||
CREATE VIRTUAL TABLE t1 USING fts5;
|
||||
} {1 {vtable constructor failed: t1}}
|
||||
|
||||
do_execsql_test 4.1 { SELECT * FROM sqlite_master } {}
|
||||
do_execsql_test 4.2 { COMMIT }
|
||||
do_execsql_test 4.3 { SELECT * FROM sqlite_master } {}
|
||||
|
||||
#-------------------------------------------------------------------------
|
||||
#
|
||||
reset_db
|
||||
do_execsql_test 5.0 {
|
||||
CREATE VIRTUAL TABLE t1 USING fts5(a);
|
||||
INSERT INTO t1 VALUES('vtable constructor failed');
|
||||
} {}
|
||||
do_execsql_test 5.1 {
|
||||
SELECT quote(block) FROM t1_data WHERE rowid=10;
|
||||
} {
|
||||
X'000000000101010001010101'
|
||||
}
|
||||
do_test 5.3 {
|
||||
sqlite3 db2 test.db
|
||||
register_fts5_rowid db2
|
||||
db2 eval {
|
||||
UPDATE t1_data SET block = X'000000000101010001A7080101' WHERE rowid=10;
|
||||
UPDATE t1_data SET rowid=fts5_rowid(5000, 1) WHERE rowid=fts5_rowid(1,1);
|
||||
UPDATE t1_idx SET segid=5000 WHERE segid=1;
|
||||
}
|
||||
db2 close
|
||||
} {}
|
||||
do_execsql_test 5.4 {
|
||||
SELECT rowid FROM t1('cons*');
|
||||
} {1}
|
||||
breakpoint
|
||||
do_execsql_test 5.5 {
|
||||
INSERT INTO t1 VALUES('hello world');
|
||||
}
|
||||
|
||||
finish_test
|
||||
|
||||
|
||||
@@ -42,13 +42,13 @@ proc fts5_test_bothlist {cmd} {
|
||||
}
|
||||
sqlite3_fts5_create_function db fts5_test_bothlist fts5_test_bothlist
|
||||
|
||||
proc fts5_rowid {cmd} { expr [$cmd xColumnText -1] }
|
||||
sqlite3_fts5_create_function db fts5_rowid fts5_rowid
|
||||
proc rowid_func {cmd} { expr [$cmd xColumnText -1] }
|
||||
sqlite3_fts5_create_function db rowid_func rowid_func
|
||||
|
||||
do_execsql_test 1.$tok.0.1 "
|
||||
CREATE VIRTUAL TABLE ss USING fts5(a, b,
|
||||
tokenize='tclnum $tok', detail=%DETAIL%);
|
||||
INSERT INTO ss(ss, rank) VALUES('rank', 'fts5_rowid()');
|
||||
INSERT INTO ss(ss, rank) VALUES('rank', 'rowid_func()');
|
||||
"
|
||||
|
||||
do_execsql_test 1.$tok.0.2 {
|
||||
|
||||
@@ -59,6 +59,25 @@ do_test 1.7 {
|
||||
catchsql { SELECT * FROM t1 WHERE t1 MATCH 'a' }
|
||||
} {1 {invalid fts5 file format (found 0, expected 4) - run 'rebuild'}}
|
||||
|
||||
#---------------------------------------------------------------------------
|
||||
|
||||
do_execsql_test 2.1 {
|
||||
CREATE VIRTUAL TABLE t2 USING fts5(two);
|
||||
INSERT INTO t2 VALUES('a b c d');
|
||||
}
|
||||
|
||||
do_test 2.2 {
|
||||
sqlite3 db2 test.db
|
||||
execsql {
|
||||
INSERT INTO t2(t2, rank) VALUES('pgsz', 512);
|
||||
UPDATE t2_config SET v=5 WHERE k='version';
|
||||
} db2
|
||||
db2 close
|
||||
} {}
|
||||
|
||||
do_catchsql_test 2.3 {
|
||||
SELECT * FROM t2('b + c');
|
||||
} {1 {SQL logic error or missing database}}
|
||||
|
||||
finish_test
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
C Fix\sthe\smultiplexor\sso\sthat\sit\sdoes\snot\sassume\sthat\sthe\sxGetLastError\smethod\nis\snon-NULL\sin\sthe\schild\sVFS.
|
||||
D 2016-03-28T11:01:54.323
|
||||
C Fix\ssome\scode\sand\stest\scoverage\sissues\sin\sfts5_index.c.
|
||||
D 2016-03-29T21:19:04.017
|
||||
F Makefile.in f53429fb2f313c099283659d0df6f20f932c861f
|
||||
F Makefile.linux-gcc 7bc79876b875010e8c8f9502eb935ca92aa3c434
|
||||
F Makefile.msc df0bf9ff7f8b3f4dd9fb4cc43f92fe58f6ec5c66
|
||||
@@ -98,15 +98,15 @@ F ext/fts3/unicode/mkunicode.tcl 2debed3f582d77b3fdd0b8830880250021571fd8
|
||||
F ext/fts3/unicode/parseunicode.tcl da577d1384810fb4e2b209bf3313074353193e95
|
||||
F ext/fts5/extract_api_docs.tcl a36e54ec777172ddd3f9a88daf593b00848368e0
|
||||
F ext/fts5/fts5.h ff9c2782e8ed890b0de2f697a8d63971939e70c7
|
||||
F ext/fts5/fts5Int.h 3677076aecbf645a7f2a019115c6a4ec3272dd78
|
||||
F ext/fts5/fts5Int.h 31b6cbbd9ff5dfdcafe702ea2eb4a93f66979b72
|
||||
F ext/fts5/fts5_aux.c daa57fb45216491814520bbb587e97bf81ced458
|
||||
F ext/fts5/fts5_buffer.c 4c1502d4c956cd092c89ce4480867f9d8bf325cd
|
||||
F ext/fts5/fts5_config.c 5af9c360e99669d29f06492c370892394aba0857
|
||||
F ext/fts5/fts5_expr.c 5ca4bafe29aa3d27683c90e836192e4aefd20a3f
|
||||
F ext/fts5/fts5_hash.c f3a7217c86eb8f272871be5f6aa1b6798960a337
|
||||
F ext/fts5/fts5_index.c fdd82bb421a5d1e64d004acb43f4dd9970c8d2b3
|
||||
F ext/fts5/fts5_main.c b4a0fc5bf17f2f1f056ee76cdd7d2af08b360f55
|
||||
F ext/fts5/fts5_storage.c 3309c6a8e34b974513016fd1ef47c83f5898f94c
|
||||
F ext/fts5/fts5_index.c 870fa81c7d08dae287f843cddf8809c5665f3f3e
|
||||
F ext/fts5/fts5_main.c 1e1e6e2d6df6b224fe9b2c75bcbe265c73b8712d
|
||||
F ext/fts5/fts5_storage.c e0aa8509e01eb22ae8e198c1de9c3200755c0d94
|
||||
F ext/fts5/fts5_tcl.c f8731e0508299bd43f1a2eff7dbeaac870768966
|
||||
F ext/fts5/fts5_test_mi.c 783b86697ebf773c18fc109992426c0173a055bc
|
||||
F ext/fts5/fts5_test_tok.c db08af63673c3a7d39f053b36fd6e065017706be
|
||||
@@ -116,7 +116,7 @@ F ext/fts5/fts5_varint.c a5aceacda04dafcbae725413d7a16818ecd65738
|
||||
F ext/fts5/fts5_vocab.c dba72ca393d71c2588548b51380387f6b44c77a8
|
||||
F ext/fts5/fts5parse.y fcc5e92e570d38cab38488b2109cbf67468923b2
|
||||
F ext/fts5/mkportersteps.tcl 5acf962d2e0074f701620bb5308155fa1e4a63ba
|
||||
F ext/fts5/test/fts5_common.tcl b01c584144b5064f30e6c648145a2dd6bc440841
|
||||
F ext/fts5/test/fts5_common.tcl 7bae6b2a93bd62be99cc78930c4806afcc152b4b
|
||||
F ext/fts5/test/fts5aa.test bd2d88182b9f7f30d300044048ad14683306b745
|
||||
F ext/fts5/test/fts5ab.test 30325a89453280160106be411bba3acf138e6d1b
|
||||
F ext/fts5/test/fts5ac.test 55cad4275a1f5acabfe14d8442a8046b47e49e5f
|
||||
@@ -125,7 +125,7 @@ F ext/fts5/test/fts5ae.test 612dcb51f4069226791ff14c17dbfb3138c56f20
|
||||
F ext/fts5/test/fts5af.test be858a96b1f5de66ba6d64f0021bd8b2408e126c
|
||||
F ext/fts5/test/fts5ag.test 27180de76c03036be75ee80b93d8c5f540014071
|
||||
F ext/fts5/test/fts5ah.test dfb7897711dbcda1dacb038aec310daca139fcf5
|
||||
F ext/fts5/test/fts5ai.test 3909d0b949b2afcaae4d5795cd79153da75381df
|
||||
F ext/fts5/test/fts5ai.test 962f61ce5d42bace42f70da715e8e7c1c85c5e86
|
||||
F ext/fts5/test/fts5aj.test 05b569f5c16ea3098fb1984eec5cf50dbdaae5d8
|
||||
F ext/fts5/test/fts5ak.test fb26389985407826f6076bb9f382c67d3db6b5d9
|
||||
F ext/fts5/test/fts5al.test 18c277f5986df0a3d9071dfd7128afeb16fe9d5d
|
||||
@@ -139,7 +139,7 @@ F ext/fts5/test/fts5columnsize.test a8cfef21ffa1c264b9f670a7d94eeaccb5341c07
|
||||
F ext/fts5/test/fts5config.test 7788b9c058074d640dfcdd81d97b6a9480000368
|
||||
F ext/fts5/test/fts5conflict.test 26f4e46c4d31e16221794832a990dc4e30e18de5
|
||||
F ext/fts5/test/fts5content.test 9a952c95518a14182dc3b59e3c8fa71cda82a4e1
|
||||
F ext/fts5/test/fts5corrupt.test c2ad090192708150d50d961278df10ae7a4b8b62
|
||||
F ext/fts5/test/fts5corrupt.test 0d0dbfa10a134ab710f14b9a25a3922e93e43ac3
|
||||
F ext/fts5/test/fts5corrupt2.test 26c0a39dd9ff73207e6229f83b50b21d37c7658c
|
||||
F ext/fts5/test/fts5corrupt3.test f77f65e386231daf62902466b40ff998b2c8ce4f
|
||||
F ext/fts5/test/fts5detail.test ef5c690535a797413acaf5ad9b8ab5d49972df69
|
||||
@@ -151,7 +151,7 @@ F ext/fts5/test/fts5eb.test c516ae0c934be6fd29ec95ea8b5f11f461311535
|
||||
F ext/fts5/test/fts5fault1.test e09040d3e17b8c0837101e8c79c8a874c4376fb7
|
||||
F ext/fts5/test/fts5fault2.test d8c6c7f916ccbdfc10b2c69530e9dd3bc8313232
|
||||
F ext/fts5/test/fts5fault3.test d6e9577d4312e331a913c72931bf131704efc8f3
|
||||
F ext/fts5/test/fts5fault4.test dcbe3043c5611edd350191ea03a8daa190f0de5a
|
||||
F ext/fts5/test/fts5fault4.test 532b6dacb963016cbf7003196bd87fb366540277
|
||||
F ext/fts5/test/fts5fault5.test 10c13a783de3f42a21e3e53e123b62ed0c3a1618
|
||||
F ext/fts5/test/fts5fault6.test 9682664d679643ac6736e90c225526cc84073cda
|
||||
F ext/fts5/test/fts5fault7.test cb14ea3c1f42394f06f2284abc58eecee6ff8080
|
||||
@@ -159,6 +159,7 @@ F ext/fts5/test/fts5fault8.test 6785af34bd1760de74e2824ea9c161965af78f85
|
||||
F ext/fts5/test/fts5fault9.test e10e395428a9ea0596ebe752ff7123d16ab78e08
|
||||
F ext/fts5/test/fts5faultA.test fa5d59c0ff62b7125cd14eee38ded1c46e15a7ea
|
||||
F ext/fts5/test/fts5faultB.test 92ae906284062bf081b6c854afa54dcb1aa9ef88
|
||||
F ext/fts5/test/fts5faultC.test c1eaa71dbf832190a797772682ada0c63af88d58
|
||||
F ext/fts5/test/fts5full.test 6f6143af0c6700501d9fd597189dfab1555bb741
|
||||
F ext/fts5/test/fts5fuzz1.test bece4695fc169b61ab236ada7931c6e4942cbef9
|
||||
F ext/fts5/test/fts5hash.test 06f9309ccb4d5050a131594e9e47d0b21456837d
|
||||
@@ -179,12 +180,12 @@ F ext/fts5/test/fts5query.test f5ec25f5f2fbb70033424113cdffc101b1985a40
|
||||
F ext/fts5/test/fts5rank.test 7e9e64eac7245637f6f2033aec4b292aaf611aab
|
||||
F ext/fts5/test/fts5rebuild.test 03935f617ace91ed23a6099c7c74d905227ff29b
|
||||
F ext/fts5/test/fts5restart.test c17728fdea26e7d0f617d22ad5b4b2862b994c17
|
||||
F ext/fts5/test/fts5rowid.test 16908a99d6efc9ba21081b4f2b86b3fc699839a6
|
||||
F ext/fts5/test/fts5simple.test cd23d4072ea095d652c9b6db12284cc642e49c98
|
||||
F ext/fts5/test/fts5rowid.test 4092994f3b4b94c071b1866e6854aa705bbc4c1f
|
||||
F ext/fts5/test/fts5simple.test f157c8b068f5e68473ad86bfe220b07a84e0209f
|
||||
F ext/fts5/test/fts5simple2.test 98377ae1ff7749a42c21fe1a139c1ed312522c46
|
||||
F ext/fts5/test/fts5simple3.test 8e71733b3d1b0e695011d02c68ebc5ca40b6124e
|
||||
F ext/fts5/test/fts5simple3.test 9508bbfce687d521853a33cb9e096783cfd637b3
|
||||
F ext/fts5/test/fts5synonym.test 6475d189c2e20d60795808f83e36bf9318708d48
|
||||
F ext/fts5/test/fts5synonym2.test aa4c43bd3b691ff80f658cb064f5ab40690e834e
|
||||
F ext/fts5/test/fts5synonym2.test 29335811b8bd6113915b711adbd69b943ce9d301
|
||||
F ext/fts5/test/fts5tok1.test beb894c6f3468f10a574302f69ebe4436b0287c7
|
||||
F ext/fts5/test/fts5tok2.test dcacb32d4a2a3f0dd3215d4a3987f78ae4be21a2
|
||||
F ext/fts5/test/fts5tokenizer.test ea4df698b35cc427ebf2ba22829d0e28386d8c89
|
||||
@@ -193,7 +194,7 @@ F ext/fts5/test/fts5unicode2.test c1dd890ba32b7609adba78e420faa847abe43b59
|
||||
F ext/fts5/test/fts5unicode3.test 35c3d02aa7acf7d43d8de3bfe32c15ba96e8928e
|
||||
F ext/fts5/test/fts5unindexed.test e9539d5b78c677315e7ed8ea911d4fd25437c680
|
||||
F ext/fts5/test/fts5update.test 57c7012a7919889048947addae10e0613df45529
|
||||
F ext/fts5/test/fts5version.test 978f59541d8cef7e8591f8be2115ec5ccb863e2e
|
||||
F ext/fts5/test/fts5version.test 64c07b0a3d951db35b7984a051144ac499a01f00
|
||||
F ext/fts5/test/fts5vocab.test 480d780aa6b699816c5066225fbd86f3a0239477
|
||||
F ext/fts5/tool/fts5speed.tcl b0056f91a55b2d1a3684ec05729de92b042e2f85
|
||||
F ext/fts5/tool/fts5txt2db.tcl 526a9979c963f1c54fd50976a05a502e533a4c59
|
||||
@@ -423,12 +424,12 @@ F src/vdbe.c cd990451b504507b455cc649d46dad51f2835a67
|
||||
F src/vdbe.h 6f44193e7be52fd5f7c308175a936555b1e6b101
|
||||
F src/vdbeInt.h f88d3115e9bde33b01d81f0dd26d8dd51f995991
|
||||
F src/vdbeapi.c 95b1f8e527240a18a9aea41a655b013bf07a7009
|
||||
F src/vdbeaux.c c8dd3e4e932bede6363b380519d05c0557ad27ce
|
||||
F src/vdbeaux.c 12936eacddb053711755c0811cdfca54bccec574
|
||||
F src/vdbeblob.c 3b570b730109e8f653d9d2081649f6e7015113db
|
||||
F src/vdbemem.c fe76c1f866de362d9b8332e59d74aa44f6560d69
|
||||
F src/vdbesort.c 307460bfa4de4d1c3901fcd42089159131e34062
|
||||
F src/vdbetrace.c f75c5455d8cf389ef86a8bfdfd3177e0e3692484
|
||||
F src/vtab.c 23b6cdfa996152d43b390504ed4a942c8caf3a00
|
||||
F src/vtab.c 708a9c55986d9ff0266a50ad8841050cbaf38d67
|
||||
F src/vxworks.h d2988f4e5a61a4dfe82c6524dd3d6e4f2ce3cdb9
|
||||
F src/wal.c 10deb6b43887662691e5f53d10b3c171c401169b
|
||||
F src/wal.h 2f7c831cf3b071fa548bf2d5cac640846a7ff19c
|
||||
@@ -1459,7 +1460,7 @@ F vsixtest/vsixtest.tcl 6a9a6ab600c25a91a7acc6293828957a386a8a93
|
||||
F vsixtest/vsixtest.vcxproj.data 2ed517e100c66dc455b492e1a33350c1b20fbcdc
|
||||
F vsixtest/vsixtest.vcxproj.filters 37e51ffedcdb064aad6ff33b6148725226cd608e
|
||||
F vsixtest/vsixtest_TemporaryKey.pfx e5b1b036facdb453873e7084e1cae9102ccc67a0
|
||||
P 8213c2f58167243411d29cc58e303b4be656f756
|
||||
R 345c74a0cb9568a53ff6b8825c4a812b
|
||||
U drh
|
||||
Z 80e7037d98d6e1826970b484373d3274
|
||||
P a805c6f7ea59a74ba3110a058ba6eb9dda8058a7
|
||||
R 74c0771422d93ac3c0fc9105cf2a64de
|
||||
U dan
|
||||
Z fe5545e02974667cb03b9c402c34ddc2
|
||||
|
||||
+1
-1
@@ -1 +1 @@
|
||||
f6a88cccbc0c62a0b453f4711298c9d5e1882b18
|
||||
7635c68018ce1656a1c5d6eebaf8f3a8e8839b59
|
||||
@@ -509,6 +509,9 @@ int sqlite3VdbeAssertMayAbort(Vdbe *v, int mayAbort){
|
||||
break;
|
||||
}
|
||||
if( opcode==OP_CreateTable ) hasCreateTable = 1;
|
||||
#ifndef SQLITE_OMIT_VIRTUALTABLE
|
||||
if( opcode==OP_VCreate ) hasAbort = 1;
|
||||
#endif
|
||||
if( opcode==OP_InitCoroutine ) hasInitCoroutine = 1;
|
||||
#ifndef SQLITE_OMIT_FOREIGN_KEY
|
||||
if( opcode==OP_FkCounter && pOp->p1==0 && pOp->p2==1 ){
|
||||
|
||||
@@ -316,6 +316,7 @@ void sqlite3VtabBeginParse(
|
||||
sqlite3 *db; /* Database connection */
|
||||
|
||||
sqlite3StartTable(pParse, pName1, pName2, 0, 0, 1, ifNotExists);
|
||||
sqlite3MayAbort(pParse);
|
||||
pTable = pParse->pNewTable;
|
||||
if( pTable==0 ) return;
|
||||
assert( 0==pTable->pIndex );
|
||||
|
||||
Reference in New Issue
Block a user