summaryrefslogtreecommitdiff
path: root/sql/item_timefunc.cc
diff options
context:
space:
mode:
authorAlexander Barkov <bar@mysql.com>2009-10-21 15:48:22 +0500
committerAlexander Barkov <bar@mysql.com>2009-10-21 15:48:22 +0500
commit344ddc85faa7b6936f0f2d9b925af112cbaa1d79 (patch)
treed2522e7182d47f0be16e18e95d3830f7ff496ce0 /sql/item_timefunc.cc
parent479b602fd6453e9e5907d7a2554f9682bac6a1b8 (diff)
parentac2a0348a24f501fdd2ffb1dcf3bde5d3ce101db (diff)
downloadmariadb-git-344ddc85faa7b6936f0f2d9b925af112cbaa1d79.tar.gz
Merging mysql-next-mr-merge to mysql-next-mr.
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 26f6b9f9522..eefc8429f5e 100644
--- a/sql/item_timefunc.cc
+++ b/sql/item_timefunc.cc
@@ -2493,10 +2493,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)