提交 43e2b37b 编写于 作者: Y yihaoDeng

[TD-4740]<fix>

上级 402762bd
......@@ -632,7 +632,15 @@ int32_t tStrToInteger(const char* z, int16_t type, int32_t n, int64_t* value, bo
}
// the string may be overflow according to errno
*value = issigned? strtoll(z, &endPtr, radix):strtoull(z, &endPtr, radix);
if (!issigned) {
const char *p = z;
while(*p != 0 && *p == ' ') p++;
if (*p != 0 && *p == '-') { return -1;}
*value = strtoull(z, &endPtr, radix);
} else {
*value = strtoll(z, &endPtr, radix);
}
// not a valid integer number, return error
if (endPtr - z != n || errno == ERANGE) {
......
......@@ -32,6 +32,9 @@ while $i < 5
$ms = $x . m
sql insert into $tb values (now + $ms , 0 )
$x = $x + 1
sql_error insert into $tb values (now + $ms , -10)
sql_error insert into $tb values (now + $ms , -1000)
sql_error insert into $tb values (now + $ms , -10000000)
endw
$i = $i + 1
endw
......@@ -159,4 +162,4 @@ if $rows != 0 then
return -1
endi
system sh/exec.sh -n dnode1 -s stop -x SIGINT
\ No newline at end of file
system sh/exec.sh -n dnode1 -s stop -x SIGINT
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册