[TD-6011]<fix>: where clause including 'bool' Keyword causes core dump
This commit is contained in:
parent
fa9f76fc9d
commit
34f4f8ca01
|
@ -38,12 +38,12 @@ void tVariantCreate(tVariant *pVar, SStrToken *token) {
|
|||
|
||||
switch (token->type) {
|
||||
case TSDB_DATA_TYPE_BOOL: {
|
||||
int32_t k = strncasecmp(token->z, "true", 4);
|
||||
if (k == 0) {
|
||||
if (strncasecmp(token->z, "true", 4) == 0) {
|
||||
pVar->i64 = TSDB_TRUE;
|
||||
} else {
|
||||
assert(strncasecmp(token->z, "false", 5) == 0);
|
||||
} else if (strncasecmp(token->z, "false", 5) == 0) {
|
||||
pVar->i64 = TSDB_FALSE;
|
||||
} else {
|
||||
return;
|
||||
}
|
||||
|
||||
break;
|
||||
|
|
Loading…
Reference in New Issue