From deb9a7cfbc78391d044be61e255c24f7b74ad2a0 Mon Sep 17 00:00:00 2001 From: wpan Date: Tue, 27 Jul 2021 11:35:53 +0800 Subject: [PATCH] fix bool in issue --- src/client/src/tscSQLParser.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/client/src/tscSQLParser.c b/src/client/src/tscSQLParser.c index 8037e36a37..4ccfdbaf59 100644 --- a/src/client/src/tscSQLParser.c +++ b/src/client/src/tscSQLParser.c @@ -186,6 +186,9 @@ bool serializeExprListToVariant(SArray* pList, tVariant **dst, int16_t colType, if (var->nType != TSDB_DATA_TYPE_BOOL && !IS_SIGNED_NUMERIC_TYPE(var->nType)) { break; } + if (colType == TSDB_DATA_TYPE_BOOL && (var->i64 > 1 ||var->i64 < 0)) { + break; + } tbufWriteInt64(&bw, var->i64); } else if (IS_UNSIGNED_NUMERIC_TYPE(colType)) { if (IS_SIGNED_NUMERIC_TYPE(var->nType) || IS_UNSIGNED_NUMERIC_TYPE(var->nType)) { -- GitLab