1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-07-29 08:01:23 +03:00

Fix a dropped error code in fts5.

FossilOrigin-Name: df55502e4f412e5b1daccf82f11fa4eb932047d9972dcd16e36be00cf09f78e1
This commit is contained in:
dan
2024-08-28 15:54:46 +00:00
parent 8db3fc5488
commit 50ca8af6f2
4 changed files with 35 additions and 12 deletions

View File

@ -2067,9 +2067,11 @@ static int fts5SyncMethod(sqlite3_vtab *pVtab){
** Implementation of xBegin() method.
*/
static int fts5BeginMethod(sqlite3_vtab *pVtab){
fts5CheckTransactionState((Fts5FullTable*)pVtab, FTS5_BEGIN, 0);
fts5NewTransaction((Fts5FullTable*)pVtab);
return SQLITE_OK;
int rc = fts5NewTransaction((Fts5FullTable*)pVtab);
if( rc==SQLITE_OK ){
fts5CheckTransactionState((Fts5FullTable*)pVtab, FTS5_BEGIN, 0);
}
return rc;
}
/*

View File

@ -256,6 +256,27 @@ do_faultsim_test 10 -faults oom* -prep {
faultsim_test_result {0 hello}
}
#-------------------------------------------------------------------------
reset_db
do_execsql_test 11.0 {
CREATE VIRTUAL TABLE f1 USING fts5(content);
CREATE TABLE g1(id, content);
INSERT INTO g1 VALUES(30000, 'a b c');
INSERT INTO g1 VALUES(40000, 'd e f');
}
faultsim_save_and_close
do_faultsim_test 11 -faults oom* -prep {
faultsim_restore_and_reopen
} -body {
execsql {
INSERT INTO f1(rowid, content) SELECT id, content FROM g1;
}
} -test {
faultsim_test_result {0 {}}
}
finish_test