diff options
author | unknown <monty@mysql.com> | 2005-02-22 18:30:40 +0200 |
---|---|---|
committer | unknown <monty@mysql.com> | 2005-02-22 18:30:40 +0200 |
commit | 59a39534b5178a47ef495c3398aec2905bbbf3ab (patch) | |
tree | f56cba53f1fe60be21c519aeca0b9aefff5a81dd /sql/item_sum.h | |
parent | bc2a229324689c615e762a1df7d1b5039763b65e (diff) | |
download | mariadb-git-59a39534b5178a47ef495c3398aec2905bbbf3ab.tar.gz |
After merge fixes
mysql-test/r/strict.result:
Update tests after merge
mysql-test/t/strict.test:
Update tests after merge (We can't handle 2.2E-307) anymore as this is out of range with the new method to calculate double
sql/item_sum.h:
After merge fix
use my_strtoll10 instead of my_strtonll
Diffstat (limited to 'sql/item_sum.h')
-rw-r--r-- | sql/item_sum.h | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/sql/item_sum.h b/sql/item_sum.h index c3eae176b1f..eca2ae188db 100644 --- a/sql/item_sum.h +++ b/sql/item_sum.h @@ -691,7 +691,6 @@ public: { int err_not_used; char *end_not_used; - char *end_not_used; String *res; res=val_str(&str_value); return res ? my_strntod(res->charset(),(char*) res->ptr(),res->length(), @@ -700,9 +699,16 @@ public: longlong val_int() { int err_not_used; - String *res; res=val_str(&str_value); - return res ? my_strntoll(res->charset(),res->ptr(),res->length(),10, - (char**) 0, &err_not_used) : (longlong) 0; + char *end; + String *res; + longlong value; + CHARSET_INFO *cs; + + if (!(res= val_str(&str_value))) + return 0; /* Null value */ + cs= res->charset(); + end= (char*) res->ptr()+res->length(); + return cs->cset->my_strtoll10(cs, res->ptr(), &end, &err_not_used); } my_decimal *val_decimal(my_decimal *dec); enum Item_result result_type () const { return STRING_RESULT; } |