未验证 提交 160f6f75 编写于 作者: M Minglei Jin 提交者: GitHub

Merge pull request #10677 from taosdata/fix/TS-1304-2.4

[TS-1304]<fix>: fixed incorrect results due to a parsing error
......@@ -528,6 +528,8 @@ uint32_t tGetToken(char* z, uint32_t* tokenId) {
for (i = 1; isdigit(z[i]); i++) {
}
uint32_t j = i;
/* here is the 1u/1a/2s/3m/9y */
if ((z[i] == 'b' || z[i] == 'u' || z[i] == 'a' || z[i] == 's' || z[i] == 'm' || z[i] == 'h' || z[i] == 'd' || z[i] == 'n' ||
z[i] == 'y' || z[i] == 'w' ||
......@@ -562,6 +564,15 @@ uint32_t tGetToken(char* z, uint32_t* tokenId) {
}
*tokenId = TK_FLOAT;
}
if (*tokenId == TK_INTEGER && z[j] != '\0') {
char c = z[j] | 0x20;
if (c >= 'a' && c <= 'z') {
// ascii
*tokenId = TK_ID;
}
}
return i;
}
case '[': {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册