提交 b4eee354 编写于 作者: G Ganlin Zhao

[TD-6011]<fix>: where clause including 'bool' Keyword causes core dump

上级 4da75f91
...@@ -31,12 +31,12 @@ void tVariantCreate(tVariant *pVar, SStrToken *token) { ...@@ -31,12 +31,12 @@ void tVariantCreate(tVariant *pVar, SStrToken *token) {
switch (token->type) { switch (token->type) {
case TSDB_DATA_TYPE_BOOL: { case TSDB_DATA_TYPE_BOOL: {
int32_t k = strncasecmp(token->z, "true", 4); if (strncasecmp(token->z, "true", 4) == 0) {
if (k == 0) {
pVar->i64 = TSDB_TRUE; pVar->i64 = TSDB_TRUE;
} else { } else if (strncasecmp(token->z, "false", 5) == 0) {
assert(strncasecmp(token->z, "false", 5) == 0);
pVar->i64 = TSDB_FALSE; pVar->i64 = TSDB_FALSE;
} else {
return;
} }
break; break;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册