mirror of
https://github.com/sqlite/sqlite.git
synced 2025-08-08 14:02:16 +03:00
Extra tests for fts3. And fixes for conflict-handling related problems in fts3.
FossilOrigin-Name: fb4a355871d9482ccb28b6ba03b842b3cc87b696
This commit is contained in:
27
src/vtab.c
27
src/vtab.c
@@ -836,7 +836,6 @@ int sqlite3VtabBegin(sqlite3 *db, VTable *pVTab){
|
||||
if( pModule->xBegin ){
|
||||
int i;
|
||||
|
||||
|
||||
/* If pVtab is already in the aVTrans array, return early */
|
||||
for(i=0; i<db->nVTrans; i++){
|
||||
if( db->aVTrans[i]==pVTab ){
|
||||
@@ -853,6 +852,32 @@ int sqlite3VtabBegin(sqlite3 *db, VTable *pVTab){
|
||||
return rc;
|
||||
}
|
||||
|
||||
int sqlite3VtabSavepoint(sqlite3 *db, int op, int iSavepoint){
|
||||
int i;
|
||||
int rc = SQLITE_OK;
|
||||
|
||||
assert( op==SAVEPOINT_RELEASE||op==SAVEPOINT_ROLLBACK||op==SAVEPOINT_BEGIN );
|
||||
|
||||
for(i=0; rc==SQLITE_OK && i<db->nVTrans; i++){
|
||||
sqlite3_vtab *pVtab = db->aVTrans[i]->pVtab;
|
||||
sqlite3_module *pMod = db->aVTrans[i]->pMod->pModule;
|
||||
if( pMod->iVersion>=1 ){
|
||||
switch( op ){
|
||||
case SAVEPOINT_BEGIN:
|
||||
rc = pMod->xSavepoint(pVtab, iSavepoint);
|
||||
break;
|
||||
case SAVEPOINT_ROLLBACK:
|
||||
rc = pMod->xRollbackTo(pVtab, iSavepoint);
|
||||
break;
|
||||
default:
|
||||
rc = pMod->xRelease(pVtab, iSavepoint);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
return rc;
|
||||
}
|
||||
|
||||
/*
|
||||
** The first parameter (pDef) is a function implementation. The
|
||||
** second parameter (pExpr) is the first argument to this function.
|
||||
|
Reference in New Issue
Block a user