diff --git a/source/client/src/clientImpl.c b/source/client/src/clientImpl.c index da401ebcc6d952c8e63088aff3019cf081d9310b..a50896232570f3d5bdb827f423a0466739573781 100644 --- a/source/client/src/clientImpl.c +++ b/source/client/src/clientImpl.c @@ -240,7 +240,7 @@ TAOS_RES *taos_query_l(TAOS *taos, const char *sql, int sqlLen) { _return: qDestoryQuery(pQuery); qDestroyQueryDag(pDag); - if (NULL != pRequest) { + if (NULL != pRequest && TSDB_CODE_SUCCESS != terrno) { pRequest->code = terrno; } return pRequest;