mirror of
https://github.com/MariaDB/server.git
synced 2026-05-07 07:35:32 +02:00
Merge tnurnberg@bk-internal.mysql.com:/home/bk/mysql-5.0-opt
into mysql.com:/scratch/tnurnberg/31588/50-31588
This commit is contained in:
commit
e763badfe3
5 changed files with 38 additions and 2 deletions
13
sql/item.cc
13
sql/item.cc
|
|
@ -4807,6 +4807,19 @@ warn:
|
|||
}
|
||||
|
||||
|
||||
void Item_hex_string::print(String *str)
|
||||
{
|
||||
char *end= (char*) str_value.ptr() + str_value.length(),
|
||||
*ptr= end - min(str_value.length(), sizeof(longlong));
|
||||
str->append("0x");
|
||||
for (; ptr != end ; ptr++)
|
||||
{
|
||||
str->append(_dig_vec_lower[((uchar) *ptr) >> 4]);
|
||||
str->append(_dig_vec_lower[((uchar) *ptr) & 0x0F]);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
bool Item_hex_string::eq(const Item *arg, bool binary_cmp) const
|
||||
{
|
||||
if (arg->basic_const_item() && arg->type() == type())
|
||||
|
|
|
|||
|
|
@ -1858,6 +1858,7 @@ public:
|
|||
enum_field_types field_type() const { return MYSQL_TYPE_VARCHAR; }
|
||||
// to prevent drop fixed flag (no need parent cleanup call)
|
||||
void cleanup() {}
|
||||
void print(String *str);
|
||||
bool eq(const Item *item, bool binary_cmp) const;
|
||||
virtual Item *safe_charset_converter(CHARSET_INFO *tocs);
|
||||
};
|
||||
|
|
|
|||
|
|
@ -534,7 +534,7 @@ public:
|
|||
String *val_str(String *);
|
||||
void fix_length_and_dec()
|
||||
{
|
||||
max_length= arg_count * collation.collation->mbmaxlen;
|
||||
max_length= arg_count * 4;
|
||||
}
|
||||
const char *func_name() const { return "char"; }
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue