From 86319faf6dad76c04359b2a198578cb33ca5df6b Mon Sep 17 00:00:00 2001 From: shenglian zhou Date: Sun, 29 Aug 2021 19:46:08 +0800 Subject: [PATCH] restore tscprepare.c to master version before schemaless modification --- src/client/src/tscPrepare.c | 17 ++--------------- 1 file changed, 2 insertions(+), 15 deletions(-) diff --git a/src/client/src/tscPrepare.c b/src/client/src/tscPrepare.c index ff95b61fd8..6fb5b3c8d1 100644 --- a/src/client/src/tscPrepare.c +++ b/src/client/src/tscPrepare.c @@ -1814,12 +1814,7 @@ int taos_stmt_close(TAOS_STMT* stmt) { } } - if (RID_VALID(pStmt->pSql->self)) { - taos_free_result(pStmt->pSql); - } else { - tscFreeSqlObj(pStmt->pSql); - } - + taos_free_result(pStmt->pSql); tfree(pStmt); STMT_RET(TSDB_CODE_SUCCESS); } @@ -1967,15 +1962,7 @@ int taos_stmt_execute(TAOS_STMT* stmt) { if (sql == NULL) { ret = TSDB_CODE_TSC_OUT_OF_MEMORY; } else { - if (pStmt->pSql != NULL) { - if (RID_VALID(pStmt->pSql->self)) { - taosReleaseRef(tscObjRef, pStmt->pSql->self); - } else { - tscFreeSqlObj(pStmt->pSql); - } - pStmt->pSql = NULL; - } - + taosReleaseRef(tscObjRef, pStmt->pSql->self); pStmt->pSql = taos_query((TAOS*)pStmt->taos, sql); ret = taos_errno(pStmt->pSql); free(sql); -- GitLab