1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-11-08 03:22:21 +03:00

Fix a bug introduced with recent optimizations: The unary minus operator

is TK_UMINUS, not TK_MINUS.

FossilOrigin-Name: 4bd43307090258f8652c995b056101c51b81274a
This commit is contained in:
drh
2009-11-19 14:48:40 +00:00
parent f25a5071a6
commit cd7f457e6d
3 changed files with 12 additions and 12 deletions

View File

@@ -1274,7 +1274,7 @@ int sqlite3ExprIsInteger(Expr *p, int *pValue){
*/
int sqlite3ExprCanBeNull(const Expr *p){
u8 op;
while( p->op==TK_UPLUS || p->op==TK_MINUS ){ p = p->pLeft; }
while( p->op==TK_UPLUS || p->op==TK_UMINUS ){ p = p->pLeft; }
op = p->op;
if( op==TK_REGISTER ) op = p->op2;
switch( op ){
@@ -1319,7 +1319,7 @@ void sqlite3ExprCodeIsNullJump(
int sqlite3ExprNeedsNoAffinityChange(const Expr *p, char aff){
u8 op;
if( aff==SQLITE_AFF_NONE ) return 1;
while( p->op==TK_UPLUS || p->op==TK_MINUS ){ p = p->pLeft; }
while( p->op==TK_UPLUS || p->op==TK_UMINUS ){ p = p->pLeft; }
op = p->op;
if( op==TK_REGISTER ) op = p->op2;
switch( op ){