mirror of
https://github.com/sqlite/sqlite.git
synced 2025-11-08 03:22:21 +03:00
Fix a bug in the CAST operator associated with the column cache. (CVS 5866)
FossilOrigin-Name: 1b6a5140446da896f69fddc8d1ea076815bb45e3
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.400 2008/10/25 15:03:21 drh Exp $
|
||||
** $Id: expr.c,v 1.401 2008/11/06 15:33:04 drh Exp $
|
||||
*/
|
||||
#include "sqliteInt.h"
|
||||
#include <ctype.h>
|
||||
@@ -1864,6 +1864,10 @@ int sqlite3ExprCodeTarget(Parse *pParse, Expr *pExpr, int target){
|
||||
testcase( to_op==OP_ToNumeric );
|
||||
testcase( to_op==OP_ToInt );
|
||||
testcase( to_op==OP_ToReal );
|
||||
if( inReg!=target ){
|
||||
sqlite3VdbeAddOp2(v, OP_SCopy, inReg, target);
|
||||
inReg = target;
|
||||
}
|
||||
sqlite3VdbeAddOp1(v, to_op, inReg);
|
||||
testcase( usedAsColumnCache(pParse, inReg, inReg) );
|
||||
sqlite3ExprCacheAffinityChange(pParse, inReg, 1);
|
||||
|
||||
Reference in New Issue
Block a user