summaryrefslogtreecommitdiff
path: root/sql/item_timefunc.cc
diff options
context:
space:
mode:
authorSergey Glukhov <Sergey.Glukhov@sun.com>2009-10-15 17:23:43 +0500
committerSergey Glukhov <Sergey.Glukhov@sun.com>2009-10-15 17:23:43 +0500
commit7741d9b50df4fabebea41c16183ce0b4584f718a (patch)
treee38788d80d85437efb1819550af226f7b2e2c195 /sql/item_timefunc.cc
parentf8a54c72ff3dc33a5dec9257f05d0f284f244292 (diff)
downloadmariadb-git-7741d9b50df4fabebea41c16183ce0b4584f718a.tar.gz
WL#751 Error message construction, backport
Diffstat (limited to 'sql/item_timefunc.cc')
-rw-r--r--sql/item_timefunc.cc3
1 files changed, 2 insertions, 1 deletions
diff --git a/sql/item_timefunc.cc b/sql/item_timefunc.cc
index 6eb733f00d7..3bd35d55f6d 100644
--- a/sql/item_timefunc.cc
+++ b/sql/item_timefunc.cc
@@ -2502,10 +2502,11 @@ String *Item_char_typecast::val_str(String *str)
str_value= *res; // Not malloced string
res= &str_value;
}
+ ErrConvString err(res);
push_warning_printf(current_thd, MYSQL_ERROR::WARN_LEVEL_WARN,
ER_TRUNCATED_WRONG_VALUE,
ER(ER_TRUNCATED_WRONG_VALUE), char_type,
- res->c_ptr_safe());
+ err.ptr());
res->length((uint) length);
}
else if (cast_cs == &my_charset_bin && res->length() < (uint) cast_length)