Add comments to sqlite3ExprCompare() to clarify its operation. Ticket #2216. (CVS 3663)

FossilOrigin-Name: fba0a1e50820677081bc7cf01f97bf953065f7c4
This commit is contained in:
drh 2007-02-24 15:29:03 +00:00
parent fb658dedce
commit d40aab0ea8
3 changed files with 18 additions and 8 deletions

View File

@ -1,5 +1,5 @@
C Additional\stest\scases\sadded.\s\sImprovements\sto\sthe\sINSERT\stransfer\noptimization.\s(CVS\s3662)
D 2007-02-24T15:18:50
C Add\scomments\sto\ssqlite3ExprCompare()\sto\sclarify\sits\soperation.\sTicket\s#2216.\s(CVS\s3663)
D 2007-02-24T15:29:04
F Makefile.in 1fe3d0b46e40fd684e1e61f8e8056cefed16de9f
F Makefile.linux-gcc 2d8574d1ba75f129aba2019f0b959db380a90935
F README 9c4e2d6706bdcc3efdd773ce752a8cdab4f90028
@ -65,7 +65,7 @@ F src/complete.c 7d1a44be8f37de125fcafd3d3a018690b3799675
F src/date.c 393c73fc027597e008dcd81454544659e978b05c
F src/delete.c 151d08386bf9c9e7f92f6b9106c71efec2def184
F src/experimental.c 1b2d1a6cd62ecc39610e97670332ca073c50792b
F src/expr.c 3fc187bc438f5637332b2a01b1bf6f728cf2830c
F src/expr.c 824f026e74d1287212bad75c8a2858c349229e03
F src/func.c b7e1e220a6795ecae7649815145ea5f8644dfa5f
F src/hash.c 449f3d6620193aa557f5d86cbc5cc6b87702b185
F src/hash.h 1b3f7e2609141fd571f62199fc38687d262e9564
@ -434,7 +434,7 @@ F www/tclsqlite.tcl bb0d1357328a42b1993d78573e587c6dcbc964b9
F www/vdbe.tcl 87a31ace769f20d3627a64fa1fade7fed47b90d0
F www/version3.tcl 890248cf7b70e60c383b0e84d77d5132b3ead42b
F www/whentouse.tcl 97e2b5cd296f7d8057e11f44427dea8a4c2db513
P 830985814345f71ba2def3c206e36aabe9e1ee7c
R 05e26f17eb8b96bb85b027f957e8b674
P 2bf5475bde763f73f7f4dd9cac7d13a631a7d2aa
R bf7e89dd91722385f525c6269433be59
U drh
Z 43981f64256c87de6c82c0452ce773e2
Z 359d2bb09f0008f8bf6cf7c87fededb5

View File

@ -1 +1 @@
2bf5475bde763f73f7f4dd9cac7d13a631a7d2aa
fba0a1e50820677081bc7cf01f97bf953065f7c4

View File

@ -12,7 +12,7 @@
** This file contains routines used for analyzing expressions and
** for generating VDBE code that evaluates expressions in SQLite.
**
** $Id: expr.c,v 1.279 2007/02/24 13:53:05 drh Exp $
** $Id: expr.c,v 1.280 2007/02/24 15:29:04 drh Exp $
*/
#include "sqliteInt.h"
#include <ctype.h>
@ -2187,6 +2187,16 @@ void sqlite3ExprIfFalse(Parse *pParse, Expr *pExpr, int dest, int jumpIfNull){
/*
** 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;