mirror of
https://github.com/MariaDB/server.git
synced 2025-08-07 00:04:31 +03:00
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
This commit is contained in:
@@ -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++)
|
||||
|
Reference in New Issue
Block a user