1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-11-09 14:21:03 +03:00

Rollback any open write-transaction when a shared-cache connection is closed. (CVS 2947)

FossilOrigin-Name: 1944d92b530d3bbcd31561063660de03d668af23
This commit is contained in:
danielk1977
2006-01-15 11:39:18 +00:00
parent 3832230e25
commit b597f74af5
5 changed files with 101 additions and 17 deletions

View File

@@ -14,7 +14,7 @@
** This file contains functions for allocating memory, comparing
** strings, and stuff like that.
**
** $Id: util.c,v 1.170 2006/01/13 06:33:24 danielk1977 Exp $
** $Id: util.c,v 1.171 2006/01/15 11:39:18 danielk1977 Exp $
*/
#include "sqliteInt.h"
#include "os.h"
@@ -1355,8 +1355,8 @@ void sqlite3MallocClearFailed(){
** cause an assert to fail if sqliteMalloc() or sqliteRealloc() is called.
*/
void sqlite3MallocDisallow(){
assert(!sqlite3ThreadData()->mallocDisallowed);
sqlite3ThreadData()->mallocDisallowed = 1;
assert( sqlite3ThreadData()->mallocDisallowed>=0 );
sqlite3ThreadData()->mallocDisallowed++;
}
/*
@@ -1364,7 +1364,7 @@ void sqlite3MallocDisallow(){
** by sqlite3MallocDisallow().
*/
void sqlite3MallocAllow(){
assert(sqlite3ThreadData()->mallocDisallowed);
sqlite3ThreadData()->mallocDisallowed = 0;
assert( sqlite3ThreadData()->mallocDisallowed>0 );
sqlite3ThreadData()->mallocDisallowed--;
}
#endif