diff options
author | drh <drh@noemail.net> | 2008-01-23 03:03:05 +0000 |
---|---|---|
committer | drh <drh@noemail.net> | 2008-01-23 03:03:05 +0000 |
commit | 7e8b848a60a305231cca0b8cfc7f08be5f0429bd (patch) | |
tree | b413adb49b7ddd4166e6a878068fd15e1a25273e /src/where.c | |
parent | 4b2f9368cbbc9a26e8dcbcb87791267c10d14f50 (diff) | |
download | sqlite-7e8b848a60a305231cca0b8cfc7f08be5f0429bd.tar.gz sqlite-7e8b848a60a305231cca0b8cfc7f08be5f0429bd.zip |
Make sqlite3SafetyOn() and sqlite3SafetyOff() macros which disappear when
compiling without -DSQLITE_DEBUG=1. (CVS 4744)
FossilOrigin-Name: 5375ad6b4b652f388469b0ce4e8e78b3f49169bd
Diffstat (limited to 'src/where.c')
-rw-r--r-- | src/where.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/src/where.c b/src/where.c index 1ad296e13..ae8fb4b8c 100644 --- a/src/where.c +++ b/src/where.c @@ -16,7 +16,7 @@ ** so is applicable. Because this module is responsible for selecting ** indices, you might also think of this module as the "query optimizer". ** -** $Id: where.c,v 1.284 2008/01/19 20:11:26 drh Exp $ +** $Id: where.c,v 1.285 2008/01/23 03:03:05 drh Exp $ */ #include "sqliteInt.h" @@ -1381,7 +1381,7 @@ static double bestVirtualIndex( *(int*)&pIdxInfo->nOrderBy = 0; } - sqlite3SafetyOff(pParse->db); + (void)sqlite3SafetyOff(pParse->db); WHERETRACE(("xBestIndex for %s\n", pTab->zName)); TRACE_IDX_INPUTS(pIdxInfo); rc = pTab->pVtab->pModule->xBestIndex(pTab->pVtab, pIdxInfo); @@ -1392,10 +1392,8 @@ static double bestVirtualIndex( }else { sqlite3ErrorMsg(pParse, "%s", sqlite3ErrStr(rc)); } - sqlite3SafetyOn(pParse->db); - }else{ - rc = sqlite3SafetyOn(pParse->db); } + (void)sqlite3SafetyOn(pParse->db); *(int*)&pIdxInfo->nOrderBy = nOrderBy; return pIdxInfo->estimatedCost; |