Below is the list of changes that have just been committed into a local
5.0 repository of uchum. When uchum 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@stripped, 2007-06-16 13:49:26+05:00, gshchepa@stripped +1 -0
Merge gleb.loc:/home/uchum/work/bk/5.0-opt
into gleb.loc:/home/uchum/work/bk/5.0-opt-28625
MERGE: 1.2493.31.1
sql/item_func.cc@stripped, 2007-06-16 13:49:23+05:00, gshchepa@stripped +0 -0
Auto merged
MERGE: 1.344.1.1
# 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: gshchepa
# Host: gleb.loc
# Root: /home/uchum/work/bk/5.0-opt-28625/RESYNC
--- 1.350/sql/item_func.cc 2007-06-15 06:55:05 +05:00
+++ 1.351/sql/item_func.cc 2007-06-16 13:49:23 +05:00
@@ -1523,16 +1523,20 @@ void Item_func_neg::fix_length_and_dec()
Use val() to get value as arg_type doesn't mean that item is
Item_int or Item_real due to existence of Item_param.
*/
- if (hybrid_type == INT_RESULT &&
- args[0]->type() == INT_ITEM &&
- ((ulonglong) args[0]->val_int() >= (ulonglong) LONGLONG_MIN))
+ if (hybrid_type == INT_RESULT && args[0]->const_item())
{
- /*
- Ensure that result is converted to DECIMAL, as longlong can't hold
- the negated number
- */
- hybrid_type= DECIMAL_RESULT;
- DBUG_PRINT("info", ("Type changed: DECIMAL_RESULT"));
+ longlong val= args[0]->val_int();
+ if ((ulonglong) val >= (ulonglong) LONGLONG_MIN &&
+ ((ulonglong) val != (ulonglong) LONGLONG_MIN ||
+ args[0]->type() != INT_ITEM))
+ {
+ /*
+ Ensure that result is converted to DECIMAL, as longlong can't hold
+ the negated number
+ */
+ hybrid_type= DECIMAL_RESULT;
+ DBUG_PRINT("info", ("Type changed: DECIMAL_RESULT"));
+ }
}
unsigned_flag= 0;
DBUG_VOID_RETURN;
| Thread |
|---|
| • bk commit into 5.0 tree (gshchepa:1.2523) | gshchepa | 16 Jun |