diff --git a/deps/jemalloc b/deps/jemalloc index ea6b3e973b477b8061e0076bb257dbd7f3faa756..9015e129bd7de389afa4196495451669700904d0 160000 --- a/deps/jemalloc +++ b/deps/jemalloc @@ -1 +1 @@ -Subproject commit ea6b3e973b477b8061e0076bb257dbd7f3faa756 +Subproject commit 9015e129bd7de389afa4196495451669700904d0 diff --git a/src/client/src/tscPrepare.c b/src/client/src/tscPrepare.c index b8447d7160b50d500675fb9fa2e62274cd9e9dfd..ea0a3124b234d24db1411c4453ce7bd9d3e73e2d 100644 --- a/src/client/src/tscPrepare.c +++ b/src/client/src/tscPrepare.c @@ -1725,7 +1725,7 @@ int taos_stmt_set_tbname_tags(TAOS_STMT* stmt, const char* name, TAOS_BIND* tags pStmt->last = STMT_SETTBNAME; SStrToken tname = {0}; - tname.type = TK_ID; + tname.type = TK_STRING; tname.z = (char *)strdup(name); if (!tname.z) { tscError("0x%" PRIx64 " out of memory", pSql->self); @@ -1829,8 +1829,7 @@ int taos_stmt_set_tbname_tags(TAOS_STMT* stmt, const char* name, TAOS_BIND* tags STMT_RET(invalidOperationMsg(tscGetErrorMsgPayload(&pStmt->pSql->cmd), "no tags set")); } - // N.B. Use 'name' while not 'tname.z' as tscValidateName is invoked in tsParseSql. - int32_t ret = stmtGenInsertStatement(pSql, pStmt, name, tags); + int32_t ret = stmtGenInsertStatement(pSql, pStmt, tname.z, tags); if (ret != TSDB_CODE_SUCCESS) { free(tname.z); STMT_RET(ret); diff --git a/src/client/src/tscUtil.c b/src/client/src/tscUtil.c index 5cf1be8b7f37e3ae0b1a15fe6851db8fc95322dd..96a896c2b2ccd1211b98ab7c97168f1cc82bca00 100644 --- a/src/client/src/tscUtil.c +++ b/src/client/src/tscUtil.c @@ -132,7 +132,7 @@ int32_t converToStr(char *str, int type, void *buf, int32_t bufSize, int32_t *le return TSDB_CODE_SUCCESS; } -static void tscStrToLower(char* str, int32_t n) { +UNUSED_FUNC static void tscStrToLower(char* str, int32_t n) { if (str == NULL || n <= 0) { return;} for (int32_t i = 0; i < n; i++) { if (str[i] >= 'A' && str[i] <= 'Z') { @@ -3028,7 +3028,8 @@ int32_t tscValidateName(SStrToken* pToken, bool escapeEnabled, bool *dbIncluded) if (pToken->type == TK_STRING) { tscDequoteAndTrimToken(pToken); - tscStrToLower(pToken->z, pToken->n); + // tscStrToLower(pToken->z, pToken->n); + strntolower(pToken->z, pToken->z, pToken->n); //pToken->n = (uint32_t)strtrim(pToken->z); int len = tGetToken(pToken->z, &pToken->type); @@ -3046,7 +3047,6 @@ int32_t tscValidateName(SStrToken* pToken, bool escapeEnabled, bool *dbIncluded) return tscValidateName(pToken, escapeEnabled, NULL); } } else if (pToken->type == TK_ID) { - strntolower(pToken->z, pToken->z, pToken->n); tscRmEscapeAndTrimToken(pToken); if (pToken->n == 0) {