提交 da00ccd0 编写于 作者: Y yihaoDeng

validate failed

上级 7c008851
...@@ -1477,6 +1477,8 @@ int32_t tscValidateName(SStrToken* pToken) { ...@@ -1477,6 +1477,8 @@ int32_t tscValidateName(SStrToken* pToken) {
return TSDB_CODE_TSC_INVALID_SQL; return TSDB_CODE_TSC_INVALID_SQL;
} }
strntolower(pToken->z, pToken->z, pToken->n);
// re-build the whole name string // re-build the whole name string
if (pStr[firstPartLen] == TS_PATH_DELIMITER[0]) { if (pStr[firstPartLen] == TS_PATH_DELIMITER[0]) {
// first part do not have quote do nothing // first part do not have quote do nothing
...@@ -1488,6 +1490,8 @@ int32_t tscValidateName(SStrToken* pToken) { ...@@ -1488,6 +1490,8 @@ int32_t tscValidateName(SStrToken* pToken) {
} }
pToken->n += (firstPartLen + sizeof(TS_PATH_DELIMITER[0])); pToken->n += (firstPartLen + sizeof(TS_PATH_DELIMITER[0]));
pToken->z = pStr; pToken->z = pStr;
strntolower(pToken->z, pToken->z, pToken->n);
} }
return TSDB_CODE_SUCCESS; return TSDB_CODE_SUCCESS;
......
...@@ -26,11 +26,11 @@ sql use ' XYZ ' ...@@ -26,11 +26,11 @@ sql use ' XYZ '
sql drop database 'abc123' sql drop database 'abc123'
sql drop database '_ab1234' sql drop database '_ab1234'
sql drop database 'ABC123' sql_error drop database 'ABC123'
sql drop database '_ABC123' sql drop database '_ABC123'
sql drop database 'aABb123' sql drop database 'aABb123'
sql drop database ' xyz ' sql drop database ' xyz '
sql drop database ' XYZ ' sql_error drop database ' XYZ '
sql use abc sql use abc
...@@ -67,9 +67,9 @@ sql describe mt ...@@ -67,9 +67,9 @@ sql describe mt
sql describe sub_001 sql describe sub_001
sql describe sub_dy_tbl sql describe sub_dy_tbl
sql_error describe Dd sql describe Dd
sql_error describe FF sql describe FF
sql_error describe gG sql describe gG
sql drop table abc.cc sql drop table abc.cc
sql drop table 'abc.Dd' sql drop table 'abc.Dd'
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册