mirror of
https://github.com/sqlite/sqlite.git
synced 2025-11-08 03:22:21 +03:00
When comparing two expressions do not apply affinity to either operand.
Ticket #805. (CVS 1810) FossilOrigin-Name: 88a4e400f916d7af088b39a9653d6452b3666577
This commit is contained in:
@@ -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.150 2004/06/28 01:11:47 danielk1977 Exp $
|
||||
** $Id: expr.c,v 1.151 2004/07/19 00:39:45 drh Exp $
|
||||
*/
|
||||
#include "sqliteInt.h"
|
||||
#include <ctype.h>
|
||||
@@ -93,10 +93,11 @@ char sqlite3CompareAffinity(Expr *pExpr, char aff2){
|
||||
return SQLITE_AFF_NONE;
|
||||
}
|
||||
}else if( !aff1 && !aff2 ){
|
||||
/* Neither side of the comparison is a column. Use numeric affinity
|
||||
** for the comparison.
|
||||
/* Neither side of the comparison is a column. Compare the
|
||||
** results directly.
|
||||
*/
|
||||
return SQLITE_AFF_NUMERIC;
|
||||
/* return SQLITE_AFF_NUMERIC; // Ticket #805 */
|
||||
return SQLITE_AFF_NONE;
|
||||
}else{
|
||||
/* One side is a column, the other is not. Use the columns affinity. */
|
||||
return (aff1 + aff2);
|
||||
|
||||
Reference in New Issue
Block a user