Below is the list of changes that have just been committed into a local
5.0 repository of bar. When bar 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.2121 06/03/30 13:04:58 bar@stripped +1 -0
Merge abarkov@stripped:/home/bk/mysql-5.0
into mysql.com:/usr/home/bar/mysql-5.0
sql/field.cc
1.303 06/03/30 13:04:49 bar@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: bar
# Host: bar.intranet.mysql.r18.ru
# Root: /usr/home/bar/mysql-5.0/RESYNC
--- 1.302/sql/field.cc 2006-03-29 18:03:32 +05:00
+++ 1.303/sql/field.cc 2006-03-30 13:04:49 +05:00
@@ -4232,6 +4232,7 @@ double Field_double::val_real(void)
longlong Field_double::val_int(void)
{
double j;
+ longlong res;
#ifdef WORDS_BIGENDIAN
if (table->s->db_low_byte_first)
{
@@ -4242,10 +4243,28 @@ longlong Field_double::val_int(void)
doubleget(j,ptr);
/* Check whether we fit into longlong range */
if (j <= (double) LONGLONG_MIN)
- return (longlong) LONGLONG_MIN;
+ {
+ res= (longlong) LONGLONG_MIN;
+ goto warn;
+ }
if (j >= (double) (ulonglong) LONGLONG_MAX)
- return (longlong) LONGLONG_MAX;
+ {
+ res= (longlong) LONGLONG_MAX;
+ goto warn;
+ }
return (longlong) rint(j);
+
+warn:
+ {
+ char buf[DOUBLE_TO_STRING_CONVERSION_BUFFER_SIZE];
+ String tmp(buf, sizeof(buf), &my_charset_latin1), *str;
+ str= val_str(&tmp, 0);
+ push_warning_printf(current_thd, MYSQL_ERROR::WARN_LEVEL_WARN,
+ ER_TRUNCATED_WRONG_VALUE,
+ ER(ER_TRUNCATED_WRONG_VALUE), "INTEGER",
+ str->c_ptr());
+ }
+ return res;
}
| Thread |
|---|
| • bk commit into 5.0 tree (bar:1.2121) | bar | 30 Mar |