From 2b0d202f8dd144cc87fc6f8077fa381895d8027e Mon Sep 17 00:00:00 2001 From: hjxilinx Date: Sat, 4 Apr 2020 11:42:29 +0800 Subject: [PATCH] [td-99] --- src/client/src/tscSql.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/client/src/tscSql.c b/src/client/src/tscSql.c index 896f7e294f..614d9a5151 100644 --- a/src/client/src/tscSql.c +++ b/src/client/src/tscSql.c @@ -271,7 +271,11 @@ static void waitForQueryRsp(void *param, TAOS_RES *tres, int code) { assert(param != NULL); SSqlObj *pSql = ((STscObj *)param)->pSql; - pSql->res.code = code; + // valid error code is less than 0 + if (code < 0) { + pSql->res.code = code; + } + sem_post(&pSql->rspSem); } -- GitLab