Below is the list of changes that have just been committed into a local
5.0 repository of kent. When kent 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.2036 05/10/13 12:23:50 kent@stripped +3 -0
Merge
mysql-test/r/cast.result
1.34 05/10/13 12:23:44 kent@stripped +3 -3
sql/item.h
1.174 05/10/13 12:21:06 kent@stripped +0 -0
Auto merged
mysql-test/t/cast.test
1.26 05/10/13 12:21:06 kent@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: kent
# Host: c-4f4072d5.010-2112-6f72651.cust.bredbandsbolaget.se
# Root: /Users/kent/mysql/bk/mysql-5.0/RESYNC
--- 1.173/sql/item.h 2005-10-11 23:58:18 +02:00
+++ 1.174/sql/item.h 2005-10-13 12:21:06 +02:00
@@ -1331,6 +1331,14 @@
longlong val_int()
{
DBUG_ASSERT(fixed == 1);
+ if (value <= (double) LONGLONG_MIN)
+ {
+ return LONGLONG_MIN;
+ }
+ else if (value >= (double) (ulonglong) LONGLONG_MAX)
+ {
+ return LONGLONG_MAX;
+ }
return (longlong) (value+(value > 0 ? 0.5 : -0.5));
}
String *val_str(String*);
--- 1.33/mysql-test/r/cast.result 2005-09-28 13:29:09 +02:00
+++ 1.34/mysql-test/r/cast.result 2005-10-13 12:23:44 +02:00
@@ -367,3 +367,6 @@
select cast(NULL as decimal(6)) as t1;
t1
NULL
+select cast(1.0e+300 as signed int);
+cast(1.0e+300 as signed int)
+9223372036854775807
--- 1.25/mysql-test/t/cast.test 2005-09-28 11:34:49 +02:00
+++ 1.26/mysql-test/t/cast.test 2005-10-13 12:21:06 +02:00
@@ -160,6 +160,11 @@
select cast(repeat('1',20) as unsigned);
select cast(repeat('1',20) as signed);
+#
+# Bug #13344: cast of large decimal to signed int not handled correctly
+#
+select cast(1.0e+300 as signed int);
+
# End of 4.1 tests
| Thread |
|---|
| • bk commit into 5.0 tree (kent:1.2036) | kent | 13 Oct |