diff --git a/src/client/src/tscPrepare.c b/src/client/src/tscPrepare.c index e8cd9a257a7a946bb26da45376ff8b7d3f092d0b..ff95b61fd82b6b4b7a74ba5696aa0b06adf16206 100644 --- a/src/client/src/tscPrepare.c +++ b/src/client/src/tscPrepare.c @@ -1567,8 +1567,6 @@ int taos_stmt_prepare(TAOS_STMT* stmt, const char* sql, unsigned long length) { pRes->qId = 0; pRes->numOfRows = 1; - registerSqlObj(pSql); - strtolower(pSql->sqlstr, sql); tscDebugL("0x%"PRIx64" SQL: %s", pSql->self, pSql->sqlstr); @@ -1817,7 +1815,7 @@ int taos_stmt_close(TAOS_STMT* stmt) { } if (RID_VALID(pStmt->pSql->self)) { - taosReleaseRef(tscObjRef, pStmt->pSql->self); + taos_free_result(pStmt->pSql); } else { tscFreeSqlObj(pStmt->pSql); }