summaryrefslogtreecommitdiff
path: root/sql/item_timefunc.h
diff options
context:
space:
mode:
authorunknown <bar@mysql.com>2006-04-13 10:55:48 +0500
committerunknown <bar@mysql.com>2006-04-13 10:55:48 +0500
commit5c0c1dcc3d7f46f30d144e80fc88a3ef1a4bcd1e (patch)
tree2596bd117b4d81214901623dafb27a22faafeec2 /sql/item_timefunc.h
parent6ef02da5d0c16954aaefed05a514f1a26d73ef26 (diff)
downloadmariadb-git-5c0c1dcc3d7f46f30d144e80fc88a3ef1a4bcd1e.tar.gz
Bug#18691: Converting number to UNICODE string returns invalid result.
Conversion from int and real numbers to UCS2 didn't work fine: CONVERT(100, CHAR(50) UNICODE) CONVERT(103.9, CHAR(50) UNICODE) The problem appeared because numbers have binary charset, so, simple charset recast binary->ucs2 was performed instead of real conversion. Fixed to make numbers pretend to be non-binary. mysql-test/r/ctype_ucs.result: Adding test case mysql-test/t/ctype_ucs.test: Adding test case sql/item_timefunc.cc: Adding new member from_cs, to replace my_charset_bin to a non-binary charset when converting from numbers to UCS2 sql/item_timefunc.h: Adding new member from_cs, to replace my_charset_bin to a non-binary charset when converting from numbers to UCS2
Diffstat (limited to 'sql/item_timefunc.h')
-rw-r--r--sql/item_timefunc.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/sql/item_timefunc.h b/sql/item_timefunc.h
index ce9d6b0a7aa..163b1591e52 100644
--- a/sql/item_timefunc.h
+++ b/sql/item_timefunc.h
@@ -681,7 +681,7 @@ public:
class Item_char_typecast :public Item_typecast
{
int cast_length;
- CHARSET_INFO *cast_cs;
+ CHARSET_INFO *cast_cs, *from_cs;
bool charset_conversion;
String tmp_value;
public: