1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-08 11:22:35 +03:00

USER(), DATABASE() and CHARSET() functions are now UCS2 compatible

Bug fix in ctype-utf8.c


sql/item_strfunc.cc:
  USER(), DATABASE() and CHARSET() functions are now UCS2 compatible
sql/item_strfunc.h:
  USER(), DATABASE() and CHARSET() functions are now UCS2 compatible
sql/procedure.h:
  USER(), DATABASE() and CHARSET() functions are now UCS2 compatible
strings/ctype-utf8.c:
  Bug fix
This commit is contained in:
unknown
2002-11-11 18:43:33 +04:00
parent 50b32edc76
commit 84b95682cf
4 changed files with 33 additions and 16 deletions

View File

@@ -62,7 +62,7 @@ public:
{ value=atof(str); }
double val() { return value; }
longlong val_int() { return (longlong) value; }
String *val_str(String *s) { s->set(value,decimals,my_thd_charset); return s; }
String *val_str(String *s) { s->set(value,decimals,thd_charset()); return s; }
unsigned int size_of() { return sizeof(*this);}
};
@@ -80,7 +80,7 @@ public:
{ value=strtoll(str,NULL,10); }
double val() { return (double) value; }
longlong val_int() { return value; }
String *val_str(String *s) { s->set(value, my_thd_charset); return s; }
String *val_str(String *s) { s->set(value, thd_charset()); return s; }
unsigned int size_of() { return sizeof(*this);}
};
@@ -92,9 +92,9 @@ public:
{ this->max_length=length; }
enum Item_result result_type () const { return STRING_RESULT; }
enum_field_types field_type() const { return FIELD_TYPE_STRING; }
void set(double nr) { str_value.set(nr, 2, my_thd_charset); }
void set(longlong nr) { str_value.set(nr, my_thd_charset); }
void set(const char *str, uint length) { str_value.copy(str,length, my_thd_charset); }
void set(double nr) { str_value.set(nr, 2, thd_charset()); }
void set(longlong nr) { str_value.set(nr, thd_charset()); }
void set(const char *str, uint length) { str_value.copy(str,length, thd_charset()); }
double val() { return atof(str_value.ptr()); }
longlong val_int() { return strtoll(str_value.ptr(),NULL,10); }
String *val_str(String*)