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:
unknown 2007-10-22 01:57:49 +02:00
commit e763badfe3
5 changed files with 38 additions and 2 deletions

View file

@ -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())

View file

@ -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);
};

View file

@ -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"; }
};