summaryrefslogtreecommitdiff
path: root/sql/item_strfunc.h
diff options
context:
space:
mode:
authorunknown <igor@rurik.mysql.com>2004-02-19 01:09:54 -0800
committerunknown <igor@rurik.mysql.com>2004-02-19 01:09:54 -0800
commitf4353d48ccc39527540daf709a1167462b39738c (patch)
treeaa627335f475f099e0d352b39af4e24d6e1ac189 /sql/item_strfunc.h
parentc88e5213d4f8acbbba33d293a9573042818f0aec (diff)
parent9ce4695da0bfe74e840dcf708da10cac9740e137 (diff)
downloadmariadb-git-f4353d48ccc39527540daf709a1167462b39738c.tar.gz
Manual merge
mysql-test/r/func_test.result: Auto merged mysql-test/r/subselect.result: Auto merged mysql-test/r/user_var.result: Auto merged sql/item_cmpfunc.cc: Auto merged sql/item_cmpfunc.h: Auto merged sql/item_func.cc: Auto merged sql/item_func.h: Auto merged sql/item_row.cc: Auto merged sql/item_row.h: Auto merged sql/item_strfunc.h: Auto merged sql/sql_list.h: Auto merged sql/sql_select.h: Auto merged
Diffstat (limited to 'sql/item_strfunc.h')
-rw-r--r--sql/item_strfunc.h19
1 files changed, 4 insertions, 15 deletions
diff --git a/sql/item_strfunc.h b/sql/item_strfunc.h
index 2bc37de86d8..04009fe10e1 100644
--- a/sql/item_strfunc.h
+++ b/sql/item_strfunc.h
@@ -95,7 +95,6 @@ class Item_func_concat_ws :public Item_str_func
public:
Item_func_concat_ws(Item *a,List<Item> &list)
:Item_str_func(list),separator(a) {}
- ~Item_func_concat_ws() { delete separator; }
String *val_str(String *);
void fix_length_and_dec();
void update_used_tables();
@@ -409,7 +408,6 @@ class Item_func_make_set :public Item_str_func
public:
Item_func_make_set(Item *a,List<Item> &list) :Item_str_func(list),item(a) {}
- ~Item_func_make_set() { delete item; }
String *val_str(String *str);
bool fix_fields(THD *thd, TABLE_LIST *tlist, Item **ref)
{
@@ -528,7 +526,8 @@ public:
void fix_length_and_dec()
{
collation.set(default_charset());
- decimals=0; max_length=args[0]->max_length*2;
+ decimals=0;
+ max_length=args[0]->max_length*2*collation.collation->mbmaxlen;
}
};
@@ -628,16 +627,6 @@ public:
void print(String *str) { print_op(str); }
};
-class Item_func_conv_charset3 :public Item_str_func
-{
-public:
- Item_func_conv_charset3(Item *arg1,Item *arg2,Item *arg3)
- :Item_str_func(arg1,arg2,arg3) {}
- String *val_str(String *);
- void fix_length_and_dec();
- const char *func_name() const { return "convert"; }
-};
-
class Item_func_charset :public Item_str_func
{
public:
@@ -646,8 +635,8 @@ public:
const char *func_name() const { return "charset"; }
void fix_length_and_dec()
{
- max_length=40; // should be enough
collation.set(system_charset_info);
+ max_length= 64 * collation.collation->mbmaxlen; // should be enough
};
};
@@ -659,8 +648,8 @@ public:
const char *func_name() const { return "collation"; }
void fix_length_and_dec()
{
- max_length=40; // should be enough
collation.set(system_charset_info);
+ max_length= 64 * collation.collation->mbmaxlen; // should be enough
};
};