From 7f4be80441d3fb281cc124a732b83f84ca46704b Mon Sep 17 00:00:00 2001 From: Ganlin Zhao Date: Thu, 11 Nov 2021 15:16:55 +0800 Subject: [PATCH] [TD-10965]:schemaless: some record can't write into TDengine by schemaless --- src/client/src/tscSQLParser.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/client/src/tscSQLParser.c b/src/client/src/tscSQLParser.c index dd2470bd2e..af4cd08edb 100644 --- a/src/client/src/tscSQLParser.c +++ b/src/client/src/tscSQLParser.c @@ -6071,7 +6071,8 @@ int32_t setAlterTableInfo(SSqlObj* pSql, struct SSqlInfo* pInfo) { bool dbIncluded = false; SStrToken tmpToken = pAlterSQL->name; - char tmpTokenBuf[pAlterSQL->name.n]; + const int32_t bufLen = pAlterSQL->name.n; + char tmpTokenBuf[bufLen]; tmpToken.z = tmpTokenBuf; memcpy(tmpTokenBuf, pAlterSQL->name.z, pAlterSQL->name.n); if (tscValidateName(&tmpToken, true, &dbIncluded) != TSDB_CODE_SUCCESS) { -- GitLab