Below is the list of changes that have just been committed into a local
5.0 repository of ram. When ram 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/installing-source-tree.html
ChangeSet
1.1945 05/05/13 19:16:58 ramil@stripped +1 -0
New decimal code clean-up:
1. trivial optimization - get rid of an extra jump for common situations.
2. fixed Item_func_neg::decimal_op() return value if NULL.
sql/item_func.cc
1.194 05/05/13 19:16:51 ramil@stripped +20 -19
New decimal code clean-up:
1. trivial optimization - get rid of an extra jump for common situations.
2. fixed Item_func_neg::decimal_op() return value if NULL.
# 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: ramil
# Host: gw.mysql.r18.ru
# Root: /usr/home/ram/work/mysql-5.0
--- 1.193/sql/item_func.cc 2005-05-13 19:01:01 +05:00
+++ 1.194/sql/item_func.cc 2005-05-13 19:16:51 +05:00
@@ -1063,11 +1063,11 @@
if ((null_value= args[0]->null_value))
return 0;
val2= args[1]->val_decimal(&value2);
- if ((null_value= (args[1]->null_value ||
+ if (!(null_value= (args[1]->null_value ||
my_decimal_add(E_DEC_FATAL_ERROR, decimal_value, val1,
val2) > 1)))
- return 0;
- return decimal_value;
+ return decimal_value;
+ return 0;
}
/*
@@ -1136,11 +1136,11 @@
if ((null_value= args[0]->null_value))
return 0;
val2= args[1]->val_decimal(&value2);
- if ((null_value= (args[1]->null_value ||
+ if (!(null_value= (args[1]->null_value ||
my_decimal_sub(E_DEC_FATAL_ERROR, decimal_value, val1,
val2) > 1)))
- return 0;
- return decimal_value;
+ return decimal_value;
+ return 0;
}
@@ -1174,11 +1174,11 @@
if ((null_value= args[0]->null_value))
return 0;
val2= args[1]->val_decimal(&value2);
- if ((null_value= (args[1]->null_value ||
+ if (!(null_value= (args[1]->null_value ||
my_decimal_mul(E_DEC_FATAL_ERROR, decimal_value, val1,
val2) > 1)))
- return 0;
- return decimal_value;
+ return decimal_value;
+ return 0;
}
@@ -1396,8 +1396,9 @@
{
my_decimal2decimal(value, decimal_value);
my_decimal_neg(decimal_value);
+ return decimal_value;
}
- return decimal_value;
+ return 0;
}
@@ -1762,11 +1763,11 @@
my_decimal *Item_func_ceiling::decimal_op(my_decimal *decimal_value)
{
my_decimal val, *value= args[0]->val_decimal(&val);
- if ((null_value= (args[0]->null_value ||
+ if (!(null_value= (args[0]->null_value ||
my_decimal_ceiling(E_DEC_FATAL_ERROR, value,
decimal_value) > 1)))
- return 0;
- return decimal_value;
+ return decimal_value;
+ return 0;
}
@@ -1809,11 +1810,11 @@
my_decimal *Item_func_floor::decimal_op(my_decimal *decimal_value)
{
my_decimal val, *value= args[0]->val_decimal(&val);
- if ((null_value= (args[0]->null_value ||
+ if (!(null_value= (args[0]->null_value ||
my_decimal_floor(E_DEC_FATAL_ERROR, value,
decimal_value) > 1)))
- return 0;
- return decimal_value;
+ return decimal_value;
+ return 0;
}
@@ -1956,11 +1957,11 @@
{
decimals= min(dec, DECIMAL_MAX_SCALE); // to get correct output
}
- if ((null_value= (args[0]->null_value || args[1]->null_value ||
+ if (!(null_value= (args[0]->null_value || args[1]->null_value ||
my_decimal_round(E_DEC_FATAL_ERROR, value, dec, truncate,
decimal_value) > 1)))
- return 0;
- return decimal_value;
+ return decimal_value;
+ return 0;
}
| Thread |
|---|
| • bk commit into 5.0 tree (ramil:1.1945) | ramil | 13 May |