mirror of
https://github.com/sqlite/sqlite.git
synced 2025-07-30 19:03:16 +03:00
Remove the restriction that a transaction cannot be started by one linuxthread
and continued by another. Leave in the documentation the warning about not carrying a database connection across fork() but do not test for it any more. Ticket #130. (CVS 701) FossilOrigin-Name: bdbdb866f2e76abd1f8f545adadc9a900ed0cd1a
This commit is contained in:
@ -25,7 +25,7 @@
|
||||
** ROLLBACK
|
||||
** PRAGMA
|
||||
**
|
||||
** $Id: build.c,v 1.106 2002/07/18 00:34:11 drh Exp $
|
||||
** $Id: build.c,v 1.107 2002/08/02 10:36:09 drh Exp $
|
||||
*/
|
||||
#include "sqliteInt.h"
|
||||
#include <ctype.h>
|
||||
@ -1730,7 +1730,6 @@ void sqliteBeginTransaction(Parse *pParse, int onError){
|
||||
if( db->flags & SQLITE_InTrans ) return;
|
||||
sqliteBeginWriteOperation(pParse, 0);
|
||||
db->flags |= SQLITE_InTrans;
|
||||
db->pid = sqliteOsProcessId();
|
||||
db->onError = onError;
|
||||
}
|
||||
|
||||
|
@ -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.94 2002/07/31 00:32:50 drh Exp $
|
||||
** $Id: main.c,v 1.95 2002/08/02 10:36:10 drh Exp $
|
||||
*/
|
||||
#include "sqliteInt.h"
|
||||
#include "os.h"
|
||||
@ -600,9 +600,6 @@ 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 ){
|
||||
|
14
src/os.c
14
src/os.c
@ -579,20 +579,6 @@ int sqliteOsFileSize(OsFile *id, int *pSize){
|
||||
#endif
|
||||
}
|
||||
|
||||
/*
|
||||
** Return the process ID for the current process. This
|
||||
** only works under Unix. Under windows, a constant is returned.
|
||||
*/
|
||||
int sqliteOsProcessId(void){
|
||||
#if OS_UNIX
|
||||
return getpid();
|
||||
#endif
|
||||
#if OS_WIN
|
||||
return 1;
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
** Change the status of the lock on the file "id" to be a readlock.
|
||||
** If the file was write locked, then this reduces the lock to a read.
|
||||
|
1
src/os.h
1
src/os.h
@ -82,7 +82,6 @@ int sqliteOsWriteLock(OsFile*);
|
||||
int sqliteOsUnlock(OsFile*);
|
||||
int sqliteOsRandomSeed(char*);
|
||||
int sqliteOsSleep(int ms);
|
||||
int sqliteOsProcessId(void);
|
||||
void sqliteOsEnterMutex(void);
|
||||
void sqliteOsLeaveMutex(void);
|
||||
|
||||
|
@ -11,7 +11,7 @@
|
||||
*************************************************************************
|
||||
** Internal interface definitions for SQLite.
|
||||
**
|
||||
** @(#) $Id: sqliteInt.h,v 1.141 2002/07/30 17:20:40 drh Exp $
|
||||
** @(#) $Id: sqliteInt.h,v 1.142 2002/08/02 10:36:10 drh Exp $
|
||||
*/
|
||||
#include "sqlite.h"
|
||||
#include "hash.h"
|
||||
@ -200,7 +200,6 @@ struct sqlite {
|
||||
int next_cookie; /* Value of schema_cookie after commit */
|
||||
int cache_size; /* Number of pages to use in the cache */
|
||||
int nTable; /* Number of tables in the database */
|
||||
int pid; /* Process ID that started the transaction */
|
||||
void *pBusyArg; /* 1st Argument to the busy callback */
|
||||
int (*xBusyCallback)(void *,const char*,int); /* The busy callback */
|
||||
Hash tblHash; /* All tables indexed by name */
|
||||
|
Reference in New Issue
Block a user