mirror of
https://github.com/MariaDB/server.git
synced 2026-05-04 14:15:33 +02:00
Fixed CAST( xxx as CHAR)
sql/item.h: Made some virtual functions non virtual (as they are not used virtually) sql/item_strfunc.cc: Optimizations. sql/item_strfunc.h: Fixed BINARY handling sql/sql_string.h: Indentation cleanups
This commit is contained in:
parent
0985653c1f
commit
1b9becc358
5 changed files with 34 additions and 14 deletions
|
|
@ -534,8 +534,17 @@ public:
|
|||
Item_typecast(Item *a) :Item_str_func(a) {}
|
||||
const char *func_name() const { return "char"; }
|
||||
String *val_str(String *a)
|
||||
{ a=args[0]->val_str(a); null_value=args[0]->null_value; return a; }
|
||||
void fix_length_and_dec() { max_length=args[0]->max_length; }
|
||||
{
|
||||
String *tmp=args[0]->val_str(a);
|
||||
null_value=args[0]->null_value;
|
||||
tmp->set_charset(charset());
|
||||
return tmp;
|
||||
}
|
||||
void fix_length_and_dec()
|
||||
{
|
||||
set_charset(thd_charset());
|
||||
max_length=args[0]->max_length;
|
||||
}
|
||||
void print(String *str);
|
||||
};
|
||||
|
||||
|
|
@ -544,7 +553,11 @@ class Item_char_typecast :public Item_typecast
|
|||
{
|
||||
public:
|
||||
Item_char_typecast(Item *a) :Item_typecast(a) {}
|
||||
void fix_length_and_dec() { binary=0; max_length=args[0]->max_length; }
|
||||
void fix_length_and_dec()
|
||||
{
|
||||
set_charset(thd_charset());
|
||||
max_length=args[0]->max_length;
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue