未验证 提交 5b6d6871 编写于 作者: M Minglei Jin 提交者: GitHub

Merge pull request #14649 from taosdata/fix/TS-1664-V26

fix: table name which is a key word led to a crash
......@@ -3014,6 +3014,10 @@ int32_t tscValidateName(SStrToken* pToken, bool escapeEnabled, bool *dbIncluded)
// single token, validate it
if (len == pToken->n) {
if (taosIsKeyWordToken(pToken->z, (int32_t) pToken->n)) {
return TSDB_CODE_TSC_INVALID_OPERATION;
}
return validateQuoteToken(pToken, escapeEnabled, NULL);
} else {
sep = strnchr(pToken->z, TS_PATH_DELIMITER[0], pToken->n, true);
......
......@@ -171,6 +171,11 @@ class TDTestCase:
tdSql.waitedQuery(sql, 1, WAITS)
tdSql.checkData(0, 1, 229400)
# TS-1664
tdSql.error("create database string")
tdSql.error("create table string(ts timestamp, c1 int)")
tdSql.error("select * from string")
#
# add case with filename
#
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册