validate failed

This commit is contained in:
yihaoDeng 2021-01-22 12:21:21 +00:00
parent 7c008851e1
commit da00ccd0f1
2 changed files with 10 additions and 6 deletions

View File

@ -1477,6 +1477,8 @@ 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
@ -1488,6 +1490,8 @@ int32_t tscValidateName(SStrToken* pToken) {
}
pToken->n += (firstPartLen + sizeof(TS_PATH_DELIMITER[0]));
pToken->z = pStr;
strntolower(pToken->z, pToken->z, pToken->n);
}
return TSDB_CODE_SUCCESS;

View File

@ -26,11 +26,11 @@ sql use ' XYZ '
sql drop database 'abc123'
sql drop database '_ab1234'
sql drop database 'ABC123'
sql_error drop database 'ABC123'
sql drop database '_ABC123'
sql drop database 'aABb123'
sql drop database ' xyz '
sql drop database ' XYZ '
sql_error drop database ' XYZ '
sql use abc
@ -67,9 +67,9 @@ sql describe mt
sql describe sub_001
sql describe sub_dy_tbl
sql_error describe Dd
sql_error describe FF
sql_error describe gG
sql describe Dd
sql describe FF
sql describe gG
sql drop table abc.cc
sql drop table 'abc.Dd'