From 51dc09dbf2218ab4e6b858ba44926e24e17e3bf0 Mon Sep 17 00:00:00 2001 From: yihaoDeng Date: Thu, 21 Jan 2021 16:35:48 +0000 Subject: [PATCH] TD-2453 --- src/client/src/tscParseInsert.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/client/src/tscParseInsert.c b/src/client/src/tscParseInsert.c index 0b419a3305..a5906f5539 100644 --- a/src/client/src/tscParseInsert.c +++ b/src/client/src/tscParseInsert.c @@ -905,6 +905,13 @@ static int32_t tscCheckIfCreateTable(char **sqlstr, SSqlObj *pSql) { return tscInvalidSQLErrMsg(pCmd->payload, "keyword TAGS expected", sToken.z); } + index = 0; + sToken = tStrGetToken(sql, &index, false, 0, NULL); + sql += index; + if (sToken.type != TK_LP) { + return tscInvalidSQLErrMsg(pCmd->payload, NULL, sToken.z); + } + SKVRowBuilder kvRowBuilder = {0}; if (tdInitKVRowBuilder(&kvRowBuilder) < 0) { return TSDB_CODE_TSC_OUT_OF_MEMORY; @@ -1554,6 +1561,7 @@ void tscImportDataFromFile(SSqlObj *pSql) { tscError("%p failed to open file %s to load data from file, code:%s", pSql, pCmd->payload, tstrerror(pSql->res.code)); tfree(pSupporter); + taos_free_result(pNew); tscAsyncResultOnError(pSql); return; } -- GitLab