diff options
author | unknown <monty@mysql.com> | 2004-05-12 02:38:57 +0300 |
---|---|---|
committer | unknown <monty@mysql.com> | 2004-05-12 02:38:57 +0300 |
commit | ae9d4e3324f46c5f0166b0b1d4f754ce429737b6 (patch) | |
tree | 02e8baaa5fa67d84f1517dd0fe43ee84dd6ef34f /sql/sql_analyse.cc | |
parent | 496fa0f7212eef5417c419976b22fcd2a726700f (diff) | |
download | mariadb-git-ae9d4e3324f46c5f0166b0b1d4f754ce429737b6.tar.gz |
Portability fixes
scripts/mysql_install_db.sh:
Portability fix (! is not portable)
sql/item_func.cc:
Use my_strtoll10() instead of strtoull()
sql/repl_failsafe.cc:
Use my_strtoll10() instead of strtoull()
sql/sql_analyse.cc:
Use my_strtoll10() instead of strtoull()
sql/sql_yacc.yy:
Use my_strtoll10() instead of strtoull()
strings/my_strtoll10.c:
Fix compiler warnings
Diffstat (limited to 'sql/sql_analyse.cc')
-rw-r--r-- | sql/sql_analyse.cc | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/sql/sql_analyse.cc b/sql/sql_analyse.cc index 3c9563165fe..68f7d45e81c 100644 --- a/sql/sql_analyse.cc +++ b/sql/sql_analyse.cc @@ -187,7 +187,9 @@ bool test_if_number(NUM_INFO *info, const char *str, uint str_len) } if (str == end && info->integers) { - info->ullval = (ulonglong) strtoull(begin ,NULL, 10); + char *endpos= (char*) end; + int error; + info->ullval= (ulonglong) my_strtoll10(begin, &endpos, &error); if (info->integers == 1) return 0; // a single number can't be zerofill info->maybe_zerofill = 1; @@ -199,7 +201,9 @@ bool test_if_number(NUM_INFO *info, const char *str, uint str_len) return 0; if ((str + 1) == end) // number was something like '123[.eE]' { - info->ullval = (ulonglong) strtoull(begin, NULL, 10); + char *endpos= (char*) str; + int error; + info->ullval= (ulonglong) my_strtoll10(begin, &endpos, &error); return 1; } if (*str == 'e' || *str == 'E') // number may be something like '1e+50' @@ -218,7 +222,9 @@ bool test_if_number(NUM_INFO *info, const char *str, uint str_len) for (str++; *(end - 1) == '0'; end--); // jump over zeros at the end if (str == end) // number was something like '123.000' { - info->ullval = (ulonglong) strtoull(begin, NULL, 10); + char *endpos= (char*) str; + int error; + info->ullval= (ulonglong) my_strtoll10(begin, &endpos, &error); return 1; } for (; str != end && my_isdigit(system_charset_info,*str); str++) |