diff options
author | unknown <serg@serg.mylan> | 2006-06-16 12:17:20 +0200 |
---|---|---|
committer | unknown <serg@serg.mylan> | 2006-06-16 12:17:20 +0200 |
commit | 0237d9b0af6c9ddc182fe9389d788a094608ec43 (patch) | |
tree | 5306a4b107a18f253dc8ea414ab57aff0800f12c /sql/procedure.h | |
parent | 2996b49af72ab0ceef02c13ef5279e59ae9e4eeb (diff) | |
download | mariadb-git-0237d9b0af6c9ddc182fe9389d788a094608ec43.tar.gz |
String::set(double) and set(longlong) -> set_real() and set_int()
fix Field::store(double) being used instead of store(longlong)
NB: overloading functions is evil
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 aceadd10883..5c8a3387eec 100644 --- a/sql/procedure.h +++ b/sql/procedure.h @@ -68,11 +68,11 @@ public: longlong val_int() { return (longlong) value; } String *val_str(String *s) { - s->set(value,decimals,default_charset()); + s->set_real(value,decimals,default_charset()); return s; } my_decimal *val_decimal(my_decimal *); - unsigned int size_of() { return sizeof(*this);} + unsigned int size_of() { return sizeof(*this);} }; class Item_proc_int :public Item_proc @@ -91,7 +91,7 @@ public: longlong val_int() { return value; } String *val_str(String *s) { s->set(value, default_charset()); return s; } my_decimal *val_decimal(my_decimal *); - unsigned int size_of() { return sizeof(*this);} + unsigned int size_of() { return sizeof(*this);} }; @@ -102,12 +102,12 @@ public: { this->max_length=length; } enum Item_result result_type () const { return STRING_RESULT; } enum_field_types field_type() const { return MYSQL_TYPE_VARCHAR; } - void set(double nr) { str_value.set(nr, 2, default_charset()); } + void set(double nr) { str_value.set_real(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_real() - { + { int err_not_used; char *end_not_used; CHARSET_INFO *cs= str_value.charset(); |