提交 647a679f 编写于 作者: Y yihaoDeng

failed at some case

上级 95c618ef
......@@ -32,6 +32,14 @@
static void freeQueryInfoImpl(SQueryInfo* pQueryInfo);
static void clearAllTableMetaInfo(SQueryInfo* pQueryInfo);
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') {
str[i] -= ('A' - 'a');
}
}
}
SCond* tsGetSTableQueryCond(STagCond* pTagCond, uint64_t uid) {
if (pTagCond->pCond == NULL) {
return NULL;
......@@ -1422,7 +1430,7 @@ int32_t tscValidateName(SStrToken* pToken) {
if (pToken->type == TK_STRING) {
strdequote(pToken->z);
strntolower(pToken->z, pToken->z, pToken->n);
tscStrToLower(pToken->z, pToken->n);
pToken->n = (uint32_t)strtrim(pToken->z);
int len = tSQLGetToken(pToken->z, &pToken->type);
......@@ -1477,8 +1485,6 @@ int32_t tscValidateName(SStrToken* pToken) {
return TSDB_CODE_TSC_INVALID_SQL;
}
strntolower(pToken->z, pToken->z, pToken->n);
// re-build the whole name string
if (pStr[firstPartLen] == TS_PATH_DELIMITER[0]) {
// first part do not have quote do nothing
......@@ -1491,7 +1497,7 @@ int32_t tscValidateName(SStrToken* pToken) {
pToken->n += (firstPartLen + sizeof(TS_PATH_DELIMITER[0]));
pToken->z = pStr;
strntolower(pToken->z, pToken->z, pToken->n);
tscStrToLower(pToken->z,pToken->n);
}
return TSDB_CODE_SUCCESS;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册