Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Overview
Comment: | Add comments to sqlite3ExprCompare() to clarify its operation. Ticket #2216. (CVS 3663) |
---|---|
Downloads: | Tarball | ZIP archive |
Timelines: | family | ancestors | descendants | both | trunk |
Files: | files | file ages | folders |
SHA1: |
fba0a1e50820677081bc7cf01f97bf95 |
User & Date: | drh 2007-02-24 15:29:04.000 |
Context
2007-02-27
| ||
02:01 | Improvements to OS layer tracing on the unix backend. (CVS 3664) (check-in: 3ad96dbe09 user: drh tags: trunk) | |
2007-02-24
| ||
15:29 | Add comments to sqlite3ExprCompare() to clarify its operation. Ticket #2216. (CVS 3663) (check-in: fba0a1e508 user: drh tags: trunk) | |
15:18 | Additional test cases added. Improvements to the INSERT transfer optimization. (CVS 3662) (check-in: 2bf5475bde user: drh tags: trunk) | |
Changes
Changes to src/expr.c.
︙ | ︙ | |||
8 9 10 11 12 13 14 | ** May you find forgiveness for yourself and forgive others. ** May you share freely, never taking more than you give. ** ************************************************************************* ** This file contains routines used for analyzing expressions and ** for generating VDBE code that evaluates expressions in SQLite. ** | | | 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 | ** May you find forgiveness for yourself and forgive others. ** May you share freely, never taking more than you give. ** ************************************************************************* ** This file contains routines used for analyzing expressions and ** for generating VDBE code that evaluates expressions in SQLite. ** ** $Id: expr.c,v 1.280 2007/02/24 15:29:04 drh Exp $ */ #include "sqliteInt.h" #include <ctype.h> /* ** Return the 'affinity' of the expression pExpr if any. ** |
︙ | ︙ | |||
2183 2184 2185 2186 2187 2188 2189 2190 2191 2192 2193 2194 2195 2196 | } pParse->ckOffset = ckOffset; } /* ** Do a deep comparison of two expression trees. Return TRUE (non-zero) ** if they are identical and return FALSE if they differ in any way. */ int sqlite3ExprCompare(Expr *pA, Expr *pB){ int i; if( pA==0||pB==0 ){ return pB==pA; } if( pA->op!=pB->op ) return 0; | > > > > > > > > > > | 2183 2184 2185 2186 2187 2188 2189 2190 2191 2192 2193 2194 2195 2196 2197 2198 2199 2200 2201 2202 2203 2204 2205 2206 | } pParse->ckOffset = ckOffset; } /* ** Do a deep comparison of two expression trees. Return TRUE (non-zero) ** if they are identical and return FALSE if they differ in any way. ** ** Sometimes this routine will return FALSE even if the two expressions ** really are equivalent. If we cannot prove that the expressions are ** identical, we return FALSE just to be safe. So if this routine ** returns false, then you do not really know for certain if the two ** expressions are the same. But if you get a TRUE return, then you ** can be sure the expressions are the same. In the places where ** this routine is used, it does not hurt to get an extra FALSE - that ** just might result in some slightly slower code. But returning ** an incorrect TRUE could lead to a malfunction. */ int sqlite3ExprCompare(Expr *pA, Expr *pB){ int i; if( pA==0||pB==0 ){ return pB==pA; } if( pA->op!=pB->op ) return 0; |
︙ | ︙ |