From 918d39570ba89fa7daf4559746f00460c984dcc0 Mon Sep 17 00:00:00 2001 From: prabatuty Date: Sat, 16 Apr 2011 02:04:18 +0000 Subject: [PATCH] Bug:2448981 update with expression from different types produce wrong results --- src/storage/Expression.cxx | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/storage/Expression.cxx b/src/storage/Expression.cxx index a9a669a4..f586f0c1 100644 --- a/src/storage/Expression.cxx +++ b/src/storage/Expression.cxx @@ -123,7 +123,8 @@ void *Expression::evaluate(DataType type,bool &result) } if(constVal!= NULL && strcmp(fldName,"\0")!=0) { - os::memcpy(calVal,val,table->getFieldLength(fldName)); + AllDataType::convert(table->getFieldType(fldName), val, + type, calVal, table->getFieldLength(fldName)); solve(calVal, constVal, type, arOp); } else if(constVal!= NULL && 0==strcmp(fldName,"\0")) @@ -132,7 +133,8 @@ void *Expression::evaluate(DataType type,bool &result) } else if( NULL==constVal && strcmp(fldName,"\0")!=0) { - os::memcpy(calVal,val,table->getFieldLength(fldName)); + AllDataType::convert(table->getFieldType(fldName), val, + type, calVal, table->getFieldLength(fldName)); } return calVal; } -- 2.11.4.GIT