diff options
author | danielk1977 <danielk1977@noemail.net> | 2007-08-29 12:31:25 +0000 |
---|---|---|
committer | danielk1977 <danielk1977@noemail.net> | 2007-08-29 12:31:25 +0000 |
commit | a1644fd86384de5f37fc42a7fb871a8c9a12dab5 (patch) | |
tree | ccd22487d7d42e8de86c109311e9d8aef043154a /src/legacy.c | |
parent | 1fee73e74acab48412a3c596d4cd68deecadeef6 (diff) | |
download | sqlite-a1644fd86384de5f37fc42a7fb871a8c9a12dab5.tar.gz sqlite-a1644fd86384de5f37fc42a7fb871a8c9a12dab5.zip |
Modifications to the malloc failure tests to test transient and persistent failures. (CVS 4321)
FossilOrigin-Name: e38ef81b85feb5bff2ad8448f3438ff0ab36571e
Diffstat (limited to 'src/legacy.c')
-rw-r--r-- | src/legacy.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/legacy.c b/src/legacy.c index 72637b268..c004b89e1 100644 --- a/src/legacy.c +++ b/src/legacy.c @@ -14,7 +14,7 @@ ** other files are for internal use by SQLite and should not be ** accessed by users of the library. ** -** $Id: legacy.c,v 1.21 2007/08/22 20:18:22 drh Exp $ +** $Id: legacy.c,v 1.22 2007/08/29 12:31:26 danielk1977 Exp $ */ #include "sqliteInt.h" @@ -46,6 +46,8 @@ int sqlite3_exec( int nCallback; if( zSql==0 ) return SQLITE_OK; + + sqlite3_mutex_enter(db->mutex); while( (rc==SQLITE_OK || (rc==SQLITE_SCHEMA && (++nRetry)<2)) && zSql[0] ){ int nCol; char **azVals = 0; @@ -127,5 +129,6 @@ exec_out: } assert( (rc&db->errMask)==rc ); + sqlite3_mutex_leave(db->mutex); return rc; } |