fix CHARSET(UUID())

This commit is contained in:
unknown 2004-02-27 23:59:09 +01:00
parent b2674f76c1
commit 30a8a65238
2 changed files with 5 additions and 1 deletions

View file

@ -2730,6 +2730,7 @@ String *Item_func_uuid::val_str(String *str)
str->realloc(UUID_LENGTH+1);
str->length(UUID_LENGTH);
str->set_charset(system_charset_info);
s=(char *) str->ptr();
s[8]=s[13]='-';
tohex(s, time_low, 8);

View file

@ -696,7 +696,10 @@ class Item_func_uuid: public Item_str_func
{
public:
Item_func_uuid(): Item_str_func() {}
void fix_length_and_dec() {max_length= UUID_LENGTH; }
void fix_length_and_dec() {
collation.set(system_charset_info);
max_length= UUID_LENGTH;
}
const char *func_name() const{ return "uuid"; }
String *val_str(String *);
};