提交 e9a40a09 编写于 作者: X xywang

fix: table name which is a key word led to a crash

上级 995d9e5b
...@@ -2983,6 +2983,10 @@ int32_t tscValidateName(SStrToken* pToken, bool escapeEnabled, bool *dbIncluded) ...@@ -2983,6 +2983,10 @@ int32_t tscValidateName(SStrToken* pToken, bool escapeEnabled, bool *dbIncluded)
// single token, validate it // single token, validate it
if (len == pToken->n) { if (len == pToken->n) {
if (taosIsKeyWordToken(pToken->z, (int32_t) pToken->n)) {
return TSDB_CODE_TSC_INVALID_OPERATION;
}
return validateQuoteToken(pToken, escapeEnabled, NULL); return validateQuoteToken(pToken, escapeEnabled, NULL);
} else { } else {
sep = strnchr(pToken->z, TS_PATH_DELIMITER[0], pToken->n, true); sep = strnchr(pToken->z, TS_PATH_DELIMITER[0], pToken->n, true);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册