aboutsummaryrefslogtreecommitdiff
path: root/src/select.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/select.c')
-rw-r--r--src/select.c14
1 files changed, 10 insertions, 4 deletions
diff --git a/src/select.c b/src/select.c
index 29b1f9e3a..4998a5352 100644
--- a/src/select.c
+++ b/src/select.c
@@ -12,7 +12,7 @@
** This file contains C code routines that are called by the parser
** to handle SELECT statements in SQLite.
**
-** $Id: select.c,v 1.123 2003/01/19 03:59:47 drh Exp $
+** $Id: select.c,v 1.124 2003/01/29 14:06:09 drh Exp $
*/
#include "sqliteInt.h"
@@ -697,7 +697,9 @@ static void generateColumnTypes(
){
Vdbe *v = pParse->pVdbe;
int i;
- if( (pParse->db->flags & SQLITE_ReportTypes)==0 ) return;
+ if( pParse->useCallback && (pParse->db->flags & SQLITE_ReportTypes)==0 ){
+ return;
+ }
for(i=0; i<pEList->nExpr; i++){
Expr *p = pEList->a[i].pExpr;
char *zType = 0;
@@ -1456,7 +1458,9 @@ static int multiSelect(Parse *pParse, Select *p, int eDest, int iParm){
/* Issue a null callback if that is what the user wants.
*/
- if( (pParse->db->flags & SQLITE_NullCallback)!=0 && eDest==SRT_Callback ){
+ if( eDest==SRT_Callback &&
+ (pParse->useCallback==0 || (pParse->db->flags & SQLITE_NullCallback)!=0)
+ ){
sqliteVdbeAddOp(v, OP_NullCallback, p->pEList->nExpr, 0);
}
return 0;
@@ -2306,7 +2310,9 @@ int sqliteSelect(
/* Issue a null callback if that is what the user wants.
*/
- if( (pParse->db->flags & SQLITE_NullCallback)!=0 && eDest==SRT_Callback ){
+ if( eDest==SRT_Callback &&
+ (pParse->useCallback==0 || (pParse->db->flags & SQLITE_NullCallback)!=0)
+ ){
sqliteVdbeAddOp(v, OP_NullCallback, pEList->nExpr, 0);
}