mirror of
https://github.com/sqlite/sqlite.git
synced 2025-08-05 15:55:57 +03:00
Partial fix for ticket #96: Return SQLITE_MISUSE from sqlite_exec() if called
from a child process with an active transaction that was started in the parent. (CVS 675) FossilOrigin-Name: 72a609ec6492e7d740b6e6184fa14a5e6b04a5dc
This commit is contained in:
@@ -14,7 +14,7 @@
|
||||
** other files are for internal use by SQLite and should not be
|
||||
** accessed by users of the library.
|
||||
**
|
||||
** $Id: main.c,v 1.85 2002/06/25 19:31:18 drh Exp $
|
||||
** $Id: main.c,v 1.86 2002/07/13 17:23:21 drh Exp $
|
||||
*/
|
||||
#include "sqliteInt.h"
|
||||
#include "os.h"
|
||||
@@ -491,6 +491,9 @@ int sqlite_exec(
|
||||
|
||||
if( pzErrMsg ) *pzErrMsg = 0;
|
||||
if( sqliteSafetyOn(db) ) goto exec_misuse;
|
||||
if( (db->flags & SQLITE_InTrans)!=0 && db->pid!=sqliteOsProcessId() ){
|
||||
goto exec_misuse;
|
||||
}
|
||||
if( (db->flags & SQLITE_Initialized)==0 ){
|
||||
int rc = sqliteInit(db, pzErrMsg);
|
||||
if( rc!=SQLITE_OK ){
|
||||
|
Reference in New Issue
Block a user