Merge polly.(none):/home/kaa/src/opt/bug28550/my50-bug28550

into  polly.(none):/home/kaa/src/opt/bug28550/my51-bug28550


mysql-test/t/func_str.test:
  Auto merged
sql/item.cc:
  Auto merged
sql/item.h:
  Auto merged
sql/item_strfunc.h:
  Auto merged
mysql-test/r/func_str.result:
  Manual merge.
This commit is contained in:
unknown 2007-10-21 21:49:30 +04:00
commit e259d46103
5 changed files with 38 additions and 2 deletions

View file

@ -4903,6 +4903,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

@ -2024,6 +2024,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);
bool check_partition_func_processor(uchar *int_arg) {return FALSE;}

View file

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