diff options
author | unknown <bar@bar.mysql.r18.ru> | 2003-03-03 10:53:08 +0400 |
---|---|---|
committer | unknown <bar@bar.mysql.r18.ru> | 2003-03-03 10:53:08 +0400 |
commit | 310545adf0de5e933cfa346499991beace33f24c (patch) | |
tree | 27481e0ef5b2631746b621bdd86787e7f9b5afef /sql/procedure.h | |
parent | 16cdf759a14c34b87c8d1b6924e65e55a3765d4c (diff) | |
download | mariadb-git-310545adf0de5e933cfa346499991beace33f24c.tar.gz |
Strings which appear without charset context,
like number-to-string-convertion-result, now
takes current database character set, instead of
thread character set. This makes it easy to be
SQL99 conformant and 4.0 compatible.
Item->thd_charset() is renamed to Item->default_charset()
as old name doesn't describe its nature anymore.
Diffstat (limited to 'sql/procedure.h')
-rw-r--r-- | sql/procedure.h | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/sql/procedure.h b/sql/procedure.h index 03a45488b03..5365b2e1102 100644 --- a/sql/procedure.h +++ b/sql/procedure.h @@ -38,7 +38,7 @@ public: virtual void set(const char *str,uint length,CHARSET_INFO *cs)=0; virtual void set(longlong nr)=0; virtual enum_field_types field_type() const=0; - void set(const char *str) { set(str,(uint) strlen(str), thd_charset()); } + void set(const char *str) { set(str,(uint) strlen(str), default_charset()); } void make_field(Send_field *tmp_field) { init_make_field(tmp_field,field_type()); @@ -62,7 +62,7 @@ public: { int err; value=my_strntod(cs,(char*) str,length,(char**)0,&err); } double val() { return value; } longlong val_int() { return (longlong) value; } - String *val_str(String *s) { s->set(value,decimals,thd_charset()); return s; } + String *val_str(String *s) { s->set(value,decimals,default_charset()); return s; } unsigned int size_of() { return sizeof(*this);} }; @@ -80,7 +80,7 @@ public: { int err; value=my_strntoll(cs,str,length,10,NULL,&err); } double val() { return (double) value; } longlong val_int() { return value; } - String *val_str(String *s) { s->set(value, thd_charset()); return s; } + String *val_str(String *s) { s->set(value, default_charset()); return s; } unsigned int size_of() { return sizeof(*this);} }; @@ -92,8 +92,8 @@ public: { this->max_length=length; } enum Item_result result_type () const { return STRING_RESULT; } enum_field_types field_type() const { return MYSQL_TYPE_STRING; } - void set(double nr) { str_value.set(nr, 2, thd_charset()); } - void set(longlong nr) { str_value.set(nr, thd_charset()); } + void set(double nr) { str_value.set(nr, 2, default_charset()); } + void set(longlong nr) { str_value.set(nr, default_charset()); } void set(const char *str, uint length, CHARSET_INFO *cs) { str_value.copy(str,length,cs); } double val() |