1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-08-08 14:02:16 +03:00

Avoid committing a transaction from within the xSync() method of a virtual table. Fix for #3497. (CVS 5902)

FossilOrigin-Name: eabb8b7591eab164c637d78ca4df00fcb5bd3c5b
This commit is contained in:
danielk1977
2008-11-13 18:00:14 +00:00
parent ac8d7b35fa
commit 093e0f6ffe
5 changed files with 19 additions and 14 deletions

View File

@@ -11,7 +11,7 @@
*************************************************************************
** This file contains code used to help implement virtual tables.
**
** $Id: vtab.c,v 1.76 2008/08/20 16:35:10 drh Exp $
** $Id: vtab.c,v 1.77 2008/11/13 18:00:15 danielk1977 Exp $
*/
#ifndef SQLITE_OMIT_VIRTUALTABLE
#include "sqliteInt.h"
@@ -710,7 +710,7 @@ int sqlite3VtabBegin(sqlite3 *db, sqlite3_vtab *pVtab){
** virtual module xSync() callback. It is illegal to write to
** virtual module tables in this case, so return SQLITE_LOCKED.
*/
if( 0==db->aVTrans && db->nVTrans>0 ){
if( sqlite3VtabInSync(db) ){
return SQLITE_LOCKED;
}
if( !pVtab ){