aboutsummaryrefslogtreecommitdiff
path: root/src/main.c
diff options
context:
space:
mode:
authordrh <drh@noemail.net>2008-07-07 19:52:09 +0000
committerdrh <drh@noemail.net>2008-07-07 19:52:09 +0000
commitbd0b1b50f4bb78d79c25bb471ec2b8ed35a4debe (patch)
treefbe22f280a5dff4e40969ea98f73508844d80b99 /src/main.c
parentda8c8f2f8f9b44f18109f985a166e7ee3727f103 (diff)
downloadsqlite-bd0b1b50f4bb78d79c25bb471ec2b8ed35a4debe.tar.gz
sqlite-bd0b1b50f4bb78d79c25bb471ec2b8ed35a4debe.zip
Make check-in (5356) compatible with builds that do not enable memory
management. Remove unnecessary code from main.c. Add out-of-memory tests for sqlite3_complete16(). (CVS 5357) FossilOrigin-Name: 28f8b6bfcc3e169f8a54a6681395f2c85bf99cab
Diffstat (limited to 'src/main.c')
-rw-r--r--src/main.c28
1 files changed, 12 insertions, 16 deletions
diff --git a/src/main.c b/src/main.c
index 5fb9c229d..5796bc35b 100644
--- a/src/main.c
+++ b/src/main.c
@@ -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.468 2008/07/07 17:53:08 drh Exp $
+** $Id: main.c,v 1.469 2008/07/07 19:52:10 drh Exp $
*/
#include "sqliteInt.h"
#include <ctype.h>
@@ -612,19 +612,17 @@ void sqlite3_progress_handler(
int (*xProgress)(void*),
void *pArg
){
- if( sqlite3SafetyCheckOk(db) ){
- sqlite3_mutex_enter(db->mutex);
- if( nOps>0 ){
- db->xProgress = xProgress;
- db->nProgressOps = nOps;
- db->pProgressArg = pArg;
- }else{
- db->xProgress = 0;
- db->nProgressOps = 0;
- db->pProgressArg = 0;
- }
- sqlite3_mutex_leave(db->mutex);
+ sqlite3_mutex_enter(db->mutex);
+ if( nOps>0 ){
+ db->xProgress = xProgress;
+ db->nProgressOps = nOps;
+ db->pProgressArg = pArg;
+ }else{
+ db->xProgress = 0;
+ db->nProgressOps = 0;
+ db->pProgressArg = 0;
}
+ sqlite3_mutex_leave(db->mutex);
}
#endif
@@ -647,9 +645,7 @@ int sqlite3_busy_timeout(sqlite3 *db, int ms){
** Cause any pending operation to stop at its earliest opportunity.
*/
void sqlite3_interrupt(sqlite3 *db){
- if( sqlite3SafetyCheckOk(db) ){
- db->u1.isInterrupted = 1;
- }
+ db->u1.isInterrupted = 1;
}