summaryrefslogtreecommitdiff
path: root/sql/item_timefunc.cc
diff options
context:
space:
mode:
authorunknown <bar@mysql.com>2005-11-21 21:11:28 +0400
committerunknown <bar@mysql.com>2005-11-21 21:11:28 +0400
commit8b497b04f34831aae3c619190d554adf98e94e7b (patch)
tree6ec3db8014b7c43d84f766b853751f99012653e8 /sql/item_timefunc.cc
parentf75197201df51f2a79d7dc58757681714dcbe6ac (diff)
downloadmariadb-git-8b497b04f34831aae3c619190d554adf98e94e7b.tar.gz
cast.result:
Fixing test results accordingly. item_timefunc.cc: Displaying BINARY or CHAR in error messages, depending on the character set. sql/item_timefunc.cc: Displaying BINARY or CHAR in error messages, depending on the character set. mysql-test/r/cast.result: Fixing test results accordingly.
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 54513d93636..5efabbff726 100644
--- a/sql/item_timefunc.cc
+++ b/sql/item_timefunc.cc
@@ -2357,7 +2357,8 @@ String *Item_char_typecast::val_str(String *str)
if (res->length() > (length= (uint32) res->charpos(cast_length)))
{ // Safe even if const arg
char char_type[40];
- my_snprintf(char_type, sizeof(char_type), "CHAR(%lu)", length);
+ my_snprintf(char_type, sizeof(char_type), "%s(%lu)",
+ cast_cs == &my_charset_bin ? "BINARY" : "CHAR", length);
if (!res->alloced_length())
{ // Don't change const str