mirror of
https://github.com/sqlite/sqlite.git
synced 2025-08-07 02:42:48 +03:00
Fix some cases where executing SQL from within a user-function callback could cause problems related to statement-transactions. (CVS 6355)
FossilOrigin-Name: a60f4191791dd7bb49d5c95b350a9924845b59a8
This commit is contained in:
11
src/test3.c
11
src/test3.c
@@ -13,7 +13,7 @@
|
||||
** is not included in the SQLite library. It is used for automated
|
||||
** testing of the SQLite library.
|
||||
**
|
||||
** $Id: test3.c,v 1.102 2008/10/27 13:59:34 danielk1977 Exp $
|
||||
** $Id: test3.c,v 1.103 2009/03/18 10:33:02 danielk1977 Exp $
|
||||
*/
|
||||
#include "sqliteInt.h"
|
||||
#include "btreeInt.h"
|
||||
@@ -235,7 +235,7 @@ static int btree_begin_statement(
|
||||
}
|
||||
pBt = sqlite3TestTextToPtr(argv[1]);
|
||||
sqlite3BtreeEnter(pBt);
|
||||
rc = sqlite3BtreeBeginStmt(pBt);
|
||||
rc = sqlite3BtreeBeginStmt(pBt, 1);
|
||||
sqlite3BtreeLeave(pBt);
|
||||
if( rc!=SQLITE_OK ){
|
||||
Tcl_AppendResult(interp, errorName(rc), 0);
|
||||
@@ -264,7 +264,10 @@ static int btree_rollback_statement(
|
||||
}
|
||||
pBt = sqlite3TestTextToPtr(argv[1]);
|
||||
sqlite3BtreeEnter(pBt);
|
||||
rc = sqlite3BtreeRollbackStmt(pBt);
|
||||
rc = sqlite3BtreeSavepoint(pBt, SAVEPOINT_ROLLBACK, 0);
|
||||
if( rc==SQLITE_OK ){
|
||||
rc = sqlite3BtreeSavepoint(pBt, SAVEPOINT_RELEASE, 0);
|
||||
}
|
||||
sqlite3BtreeLeave(pBt);
|
||||
if( rc!=SQLITE_OK ){
|
||||
Tcl_AppendResult(interp, errorName(rc), 0);
|
||||
@@ -293,7 +296,7 @@ static int btree_commit_statement(
|
||||
}
|
||||
pBt = sqlite3TestTextToPtr(argv[1]);
|
||||
sqlite3BtreeEnter(pBt);
|
||||
rc = sqlite3BtreeCommitStmt(pBt);
|
||||
rc = sqlite3BtreeSavepoint(pBt, SAVEPOINT_RELEASE, 0);
|
||||
sqlite3BtreeLeave(pBt);
|
||||
if( rc!=SQLITE_OK ){
|
||||
Tcl_AppendResult(interp, errorName(rc), 0);
|
||||
|
Reference in New Issue
Block a user