diff options
author | drh <> | 2022-12-14 23:53:29 +0000 |
---|---|---|
committer | drh <> | 2022-12-14 23:53:29 +0000 |
commit | da69802e92cd4385727faae18fd5ebf1c166a319 (patch) | |
tree | 980126c38b607326140d761bf77dccc7c63e0459 /src/expr.c | |
parent | 70ac36e877637b4554d800163dcd2cefd84db543 (diff) | |
download | sqlite-da69802e92cd4385727faae18fd5ebf1c166a319.tar.gz sqlite-da69802e92cd4385727faae18fd5ebf1c166a319.zip |
Fix minor problems in the new sqlite3ExprDataType() function.
FossilOrigin-Name: c1d5261b222bbf94c20e558089f3d2eae6a88b6d739225ee4f7d0338e0e59994
Diffstat (limited to 'src/expr.c')
-rw-r--r-- | src/expr.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/expr.c b/src/expr.c index 5608128ad..fe316550a 100644 --- a/src/expr.c +++ b/src/expr.c @@ -109,7 +109,8 @@ int sqlite3ExprDataType(const Expr *pExpr){ break; } case TK_NULL: { - return 0x00; + pExpr = 0; + break; } case TK_STRING: { return 0x02; @@ -145,6 +146,9 @@ int sqlite3ExprDataType(const Expr *pExpr){ for(ii=1; ii<pList->nExpr; ii+=2){ res |= sqlite3ExprDataType(pList->a[ii].pExpr); } + if( pList->nExpr % 2 ){ + res |= sqlite3ExprDataType(pList->a[pList->nExpr-1].pExpr); + } return res; } default: { @@ -152,7 +156,7 @@ int sqlite3ExprDataType(const Expr *pExpr){ } } /* End of switch(op) */ } /* End of while(pExpr) */ - return 0; + return 0x00; } /* |