1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-08-10 01:02:56 +03:00

Make the internal sqlite3PExpr() interface responsive to the

TKFLG_DONTFOLD flag on the operator parameter.

FossilOrigin-Name: b10ab59fb8a696d11a269f3904e799c687246aea
This commit is contained in:
drh
2015-10-28 20:01:45 +00:00
parent 9109b7f8e1
commit 1167d32716
5 changed files with 24 additions and 12 deletions

View File

@@ -548,11 +548,11 @@ Expr *sqlite3PExpr(
const Token *pToken /* Argument token */
){
Expr *p;
if( op==TK_AND && pLeft && pRight && pParse->nErr==0 ){
if( op==TK_AND && pParse->nErr==0 ){
/* Take advantage of short-circuit false optimization for AND */
p = sqlite3ExprAnd(pParse->db, pLeft, pRight);
}else{
p = sqlite3ExprAlloc(pParse->db, op, pToken, 1);
p = sqlite3ExprAlloc(pParse->db, op & TKFLG_MASK, pToken, 1);
sqlite3ExprAttachSubtrees(pParse->db, p, pLeft, pRight);
}
if( p ) {