bk commit into 5.0 tree (hf:1.1854) -
02-16-2005
, 12:29 AM
Below is the list of changes that have just been committed into a local
5.0 repository of hf. When hf does a push these changes will
be propagated to the main repository and, within 24 hours after the
push, to the public repository.
For information on how to access the public repository
see http://dev.mysql.com/doc/mysql/en/in...urce-tree.html
ChangeSet
1.1854 05/02/16 11:19:47 hf (AT) deer (DOT) (none) +1 -0
Fix - to not to call val_xxx in Item_func_interval twice
sql/item_cmpfunc.cc
1.141 05/02/16 11:18:49 hf (AT) deer (DOT) (none) +12 -3
code fixed not to call val_x twice
# This is a BitKeeper patch. What follows are the unified diffs for the
# set of deltas contained in the patch. The rest of the patch, the part
# that BitKeeper cares about, is below these diffs.
# User: hf
# Host: deer.(none)
# Root: /home/hf/work/mysql-5.0.clean
--- 1.140/sql/item_cmpfunc.cc Tue Feb 15 21:35:25 2005
+++ 1.141/sql/item_cmpfunc.cc Wed Feb 16 11:18:49 2005
@@ -895,15 +895,24 @@
longlong Item_func_interval::val_int()
{
DBUG_ASSERT(fixed == 1);
- double value= row->el(0)->val_real();
+ double value;
my_decimal dec_buf, *dec= NULL;
uint i;
if (use_decimal_comparison)
+ {
dec= row->el(0)->val_decimal(&dec_buf);
+ if (row->el(0)->null_value)
+ return -1;
+ my_decimal2double(E_DEC_FATAL_ERROR, dec, &value);
+ }
+ else
+ {
+ value= row->el(0)->val_real();
+ if (row->el(0)->null_value)
+ return -1;
+ }
- if (row->el(0)->null_value)
- return -1; // -1 if null
if (intervals)
{ // Use binary search to find interval
uint start,end;
--
MySQL Internals Mailing List
For list archives: http://lists.mysql.com/internals
To unsubscribe: http://lists.mysql.com/internals?uns...ie.nctu.edu.tw |