diff options
author | unknown <bar@bar.mysql.r18.ru> | 2002-08-22 18:12:45 +0500 |
---|---|---|
committer | unknown <bar@bar.mysql.r18.ru> | 2002-08-22 18:12:45 +0500 |
commit | 56e866ae05fda040fb04edf172c5651f577a3d46 (patch) | |
tree | 365e0d1f5734b8487f86b90852d63beaf62dd8d0 /sql/item_strfunc.h | |
parent | 08a32ab1b12ec34bdf8f0e5da3bdffb6423884a2 (diff) | |
download | mariadb-git-56e866ae05fda040fb04edf172c5651f577a3d46.tar.gz |
Stupid bug fixes in sql_yacc.cc
New class Item_func_set_collation()
Fixed that "SELECT CONVERT(expr USING charset) GROUP BY 1" was not working
New COLLATION syntax: <expr> COLLATE latin1
mysql-test/r/ctype_many.result:
New test slot has been added
mysql-test/t/ctype_many.test:
New test slot has been added
sql/item_strfunc.cc:
"SELECT CONVERT(expr USING another_charset) GROUP BY 1" was not working as expected
New Item_func_set_collation class
sql/item_strfunc.h:
"SELECT CONVERT(expr USING another_charset) GROUP BY 1" was not working as expected
New Item_func_set_collation class
sql/lex.h:
New keyword
sql/sql_yacc.yy:
Stupid bug fixes
COLLATION syntax
Diffstat (limited to 'sql/item_strfunc.h')
-rw-r--r-- | sql/item_strfunc.h | 22 |
1 files changed, 18 insertions, 4 deletions
diff --git a/sql/item_strfunc.h b/sql/item_strfunc.h index 7b5bd7ae90b..7f82cd3b5de 100644 --- a/sql/item_strfunc.h +++ b/sql/item_strfunc.h @@ -472,7 +472,7 @@ class Item_func_export_set: public Item_str_func const char *func_name() const { return "export_set"; } }; - class Item_func_inet_ntoa : public Item_str_func +class Item_func_inet_ntoa : public Item_str_func { public: Item_func_inet_ntoa(Item *a) :Item_str_func(a) @@ -488,15 +488,29 @@ class Item_func_conv_charset :public Item_str_func CHARSET_INFO *conv_charset; public: Item_func_conv_charset(Item *a, CHARSET_INFO *cs) :Item_str_func(a) - { - conv_charset=cs; - } + { conv_charset=cs; } bool fix_fields(THD *thd,struct st_table_list *tables); String *val_str(String *); void fix_length_and_dec(); const char *func_name() const { return "conv_charset"; } }; +class Item_func_set_collation :public Item_str_func +{ + CHARSET_INFO *set_collation; +public: + Item_func_set_collation(Item *a, CHARSET_INFO *cs) :Item_str_func(a) + { set_collation=cs; } + bool fix_fields(THD *thd,struct st_table_list *tables); + String *val_str(String *); + void fix_length_and_dec() + { + max_length = args[0]->max_length; + str_value.set_charset(set_collation); + } + const char *func_name() const { return "set_collation"; } +}; + class Item_func_conv_charset3 :public Item_str_func { public: |