diff options
author | unknown <bar@mysql.com> | 2005-10-13 19:24:47 +0500 |
---|---|---|
committer | unknown <bar@mysql.com> | 2005-10-13 19:24:47 +0500 |
commit | 15a9ba6a8229678e1d4d587064be30c63aac7d3b (patch) | |
tree | 7154826a1c55c5f624f5fe3e1e8c453474fa51c8 /sql/item_strfunc.h | |
parent | d4f64e84ccb4fd407a482fcbf6c4db39999e8c3e (diff) | |
download | mariadb-git-15a9ba6a8229678e1d4d587064be30c63aac7d3b.tar.gz |
ctype_utf8.result, ctype_utf8.test:
New syntax: CHAR(x USING charset)
Adding test case.
sql_yacc.yy:
New syntax: CHAR(x USING charset)
Adding new parser rule.
item_strfunc.h:
New syntax: CHAR(x USING charset)
Adding a new constructor.
sql/item_strfunc.h:
New syntax: CHAR(x USING charset)
Adding a new constructor.
sql/sql_yacc.yy:
New syntax: CHAR(x USING charset)
Adding new parser rule.
mysql-test/t/ctype_utf8.test:
New syntax: CHAR(x USING charset)
Adding test case.
mysql-test/r/ctype_utf8.result:
New syntax: CHAR(x USING charset)
Adding test case.
Diffstat (limited to 'sql/item_strfunc.h')
-rw-r--r-- | sql/item_strfunc.h | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/sql/item_strfunc.h b/sql/item_strfunc.h index ec470bb242b..5889821293d 100644 --- a/sql/item_strfunc.h +++ b/sql/item_strfunc.h @@ -480,12 +480,15 @@ public: class Item_func_char :public Item_str_func { public: - Item_func_char(List<Item> &list) :Item_str_func(list) {} + Item_func_char(List<Item> &list) :Item_str_func(list) + { collation.set(&my_charset_bin); } + Item_func_char(List<Item> &list, CHARSET_INFO *cs) :Item_str_func(list) + { collation.set(cs); } String *val_str(String *); void fix_length_and_dec() { - collation.set(&my_charset_bin); - maybe_null=0; max_length=arg_count; + maybe_null=0; + max_length=arg_count * collation.collation->mbmaxlen; } const char *func_name() const { return "char"; } }; |