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.2042 05/12/02 11:57:26 ramil@stripped +4 -0
Merge rkalimullin@stripped:/home/bk/mysql-5.0
into mysql.com:/usr/home/ram/work/5.0.b12956
sql/item_func.cc
1.271 05/12/02 11:57:17 ramil@stripped +0 -0
Auto merged
sql/item.h
1.184 05/12/02 11:57:17 ramil@stripped +0 -0
Auto merged
sql/item.cc
1.205 05/12/02 11:57:17 ramil@stripped +0 -0
Auto merged
mysql-test/r/ps.result
1.56 05/12/02 11:57:17 ramil@stripped +0 -0
Auto merged
# 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: myoffice.izhnet.ru
# Root: /usr/home/ram/work/5.0.b12956/RESYNC
--- 1.204/sql/item.cc 2005-11-30 03:24:02 +04:00
+++ 1.205/sql/item.cc 2005-12-02 11:57:17 +04:00
@@ -2459,7 +2459,7 @@ longlong Item_param::val_int()
{
switch (state) {
case REAL_VALUE:
- return (longlong) (value.real + (value.real > 0 ? 0.5 : -0.5));
+ return (longlong) rint(value.real);
case INT_VALUE:
return value.integer;
case DECIMAL_VALUE:
@@ -5441,7 +5441,7 @@ void Item_cache_real::store(Item *item)
longlong Item_cache_real::val_int()
{
DBUG_ASSERT(fixed == 1);
- return (longlong) (value+(value > 0 ? 0.5 : -0.5));
+ return (longlong) rint(value);
}
--- 1.183/sql/item.h 2005-11-28 12:48:42 +04:00
+++ 1.184/sql/item.h 2005-12-02 11:57:17 +04:00
@@ -159,7 +159,7 @@ struct Hybrid_type_traits
{ val->real/= ulonglong2double(u); }
virtual longlong val_int(Hybrid_type *val, bool unsigned_flag) const
- { return (longlong) val->real; }
+ { return (longlong) rint(val->real); }
virtual double val_real(Hybrid_type *val) const { return val->real; }
virtual my_decimal *val_decimal(Hybrid_type *val, my_decimal *buf) const;
virtual String *val_str(Hybrid_type *val, String *buf, uint8 decimals) const;
@@ -1354,7 +1354,7 @@ public:
{
return LONGLONG_MAX;
}
- return (longlong) (value+(value > 0 ? 0.5 : -0.5));
+ return (longlong) rint(value);
}
String *val_str(String*);
my_decimal *val_decimal(my_decimal *);
--- 1.270/sql/item_func.cc 2005-11-23 03:12:34 +04:00
+++ 1.271/sql/item_func.cc 2005-12-02 11:57:17 +04:00
@@ -735,7 +735,7 @@ longlong Item_func_numhybrid::val_int()
case INT_RESULT:
return int_op();
case REAL_RESULT:
- return (longlong)real_op();
+ return (longlong) rint(real_op());
case STRING_RESULT:
{
int err_not_used;
--- 1.55/mysql-test/r/ps.result 2005-11-28 22:51:52 +04:00
+++ 1.56/mysql-test/r/ps.result 2005-12-02 11:57:17 +04:00
@@ -337,7 +337,7 @@ set @precision=10000000000;
select rand(),
cast(rand(10)*@precision as unsigned integer) from t1;
rand() cast(rand(10)*@precision as unsigned integer)
-- 6570515219
+- 6570515220
- 1282061302
- 6698761160
- 9647622201
@@ -348,23 +348,23 @@ prepare stmt from
set @var=1;
execute stmt using @var;
rand() cast(rand(10)*@precision as unsigned integer) cast(rand(?)*@precision as unsigned
integer)
-- 6570515219 -
+- 6570515220 -
- 1282061302 -
- 6698761160 -
- 9647622201 -
set @var=2;
execute stmt using @var;
rand() cast(rand(10)*@precision as unsigned integer) cast(rand(?)*@precision as unsigned
integer)
-- 6570515219 6555866465
-- 1282061302 1223466192
-- 6698761160 6449731873
+- 6570515220 6555866465
+- 1282061302 1223466193
+- 6698761160 6449731874
- 9647622201 8578261098
set @var=3;
execute stmt using @var;
rand() cast(rand(10)*@precision as unsigned integer) cast(rand(?)*@precision as unsigned
integer)
-- 6570515219 9057697559
+- 6570515220 9057697560
- 1282061302 3730790581
-- 6698761160 1480860534
+- 6698761160 1480860535
- 9647622201 6211931236
drop table t1;
deallocate prepare stmt;
| Thread |
|---|
| • bk commit into 5.0 tree (ramil:1.2042) | ramil | 2 Dec |