diff --git a/src/client/src/tscSQLParser.c b/src/client/src/tscSQLParser.c index 8037e36a371436324e73c3287b4a5527f61eaa82..4ccfdbaf595205a90f332029fe7315768d802037 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)) {