diff options
author | unknown <bar@bar.mysql.r18.ru> | 2003-01-16 17:17:07 +0400 |
---|---|---|
committer | unknown <bar@bar.mysql.r18.ru> | 2003-01-16 17:17:07 +0400 |
commit | 4bd6c3564fa713ffd2ac63f4810b04b8589c042e (patch) | |
tree | 63655aa98b051bb33cac94c520aec58962c9252b /sql/procedure.h | |
parent | df1a1075dd8cb63834f450ad91649eadfbc3e58f (diff) | |
download | mariadb-git-4bd6c3564fa713ffd2ac63f4810b04b8589c042e.tar.gz |
strnto family functions now return error in a new argument
Diffstat (limited to 'sql/procedure.h')
-rw-r--r-- | sql/procedure.h | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/sql/procedure.h b/sql/procedure.h index bc77803230f..03a45488b03 100644 --- a/sql/procedure.h +++ b/sql/procedure.h @@ -59,7 +59,7 @@ public: void set(double nr) { value=nr; } void set(longlong nr) { value=(double) nr; } void set(const char *str,uint length,CHARSET_INFO *cs) - { value=my_strntod(cs,(char*) str,length,(char**)0); } + { 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; } @@ -77,7 +77,7 @@ public: void set(double nr) { value=(longlong) nr; } void set(longlong nr) { value=nr; } void set(const char *str,uint length, CHARSET_INFO *cs) - { value=my_strntoll(cs,str,length,NULL,10); } + { 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; } @@ -98,14 +98,16 @@ public: { str_value.copy(str,length,cs); } double val() { + int err; CHARSET_INFO *cs=str_value.charset(); return my_strntod(cs, (char*) str_value.ptr(), str_value.length(), - (char**) 0); + (char**) 0, &err); } longlong val_int() { + int err; CHARSET_INFO *cs=str_value.charset(); - return my_strntoll(cs,str_value.ptr(),str_value.length(),NULL,10); + return my_strntoll(cs,str_value.ptr(),str_value.length(),10,NULL,&err); } String *val_str(String*) { |