Commit 43786fee authored by bar@bar.mysql.r18.ru's avatar bar@bar.mysql.r18.ru

More use of new str->number routines

parent 241f4143
...@@ -370,8 +370,14 @@ public: ...@@ -370,8 +370,14 @@ public:
} }
~Item_string() {} ~Item_string() {}
enum Type type() const { return STRING_ITEM; } enum Type type() const { return STRING_ITEM; }
double val() { return atof(str_value.ptr()); } double val()
longlong val_int() { return strtoll(str_value.ptr(),(char**) 0,10); } {
return my_strntod(str_value.charset(),str_value.ptr(),str_value.length(),(char**)NULL);
}
longlong val_int()
{
return my_strntoll(str_value.charset(),str_value.ptr(),str_value.length(),(char**) 0,10);
}
String *val_str(String*) { return (String*) &str_value; } String *val_str(String*) { return (String*) &str_value; }
int save_in_field(Field *field, bool no_conversions); int save_in_field(Field *field, bool no_conversions);
void make_field(Send_field *field); void make_field(Send_field *field);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment