提交 8b393645 编写于 作者: C Cary Xu

tscValidateName change tscStrToLower to strntolower to support in tableName

上级 27847f7b
......@@ -133,7 +133,7 @@ int32_t converToStr(char *str, int type, void *buf, int32_t bufSize, int32_t *le
}
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') {
......@@ -3029,7 +3029,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);
......@@ -3083,7 +3084,8 @@ int32_t tscValidateName(SStrToken* pToken, bool escapeEnabled, bool *dbIncluded)
if (validateQuoteToken(pToken, escapeEnabled, NULL) != TSDB_CODE_SUCCESS) {
return TSDB_CODE_TSC_INVALID_OPERATION;
} else {
tscStrToLower(pToken->z,pToken->n);
// tscStrToLower(pToken->z,pToken->n);
strntolower(pToken->z, pToken->z, pToken->n);
firstPartQuote = true;
}
}
......@@ -3101,7 +3103,8 @@ int32_t tscValidateName(SStrToken* pToken, bool escapeEnabled, bool *dbIncluded)
if (validateQuoteToken(pToken, escapeEnabled, NULL) != TSDB_CODE_SUCCESS) {
return TSDB_CODE_TSC_INVALID_OPERATION;
} else {
tscStrToLower(pToken->z,pToken->n);
// tscStrToLower(pToken->z,pToken->n);
strntolower(pToken->z, pToken->z, pToken->n);
}
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册