提交 d3f5f8fd 编写于 作者: D dapan1121

fix bugs and case issue

上级 9f9f72a6
......@@ -7559,11 +7559,16 @@ int32_t doCheckForCreateFromStable(SSqlObj* pSql, SSqlInfo* pInfo) {
SStrToken* pToken = &pCreateTableInfo->stableName;
bool dbIncluded = false;
if (tscValidateName(pToken, true, &dbIncluded) != TSDB_CODE_SUCCESS) {
char buf[TSDB_TABLE_FNAME_LEN];
SStrToken sTblToken;
sTblToken.z = buf;
int32_t code = validateTableName(pToken->z, pToken->n, &sTblToken, &dbIncluded);
if (code != TSDB_CODE_SUCCESS) {
return invalidOperationMsg(tscGetErrorMsgPayload(pCmd), msg1);
}
int32_t code = tscSetTableFullName(&pStableMetaInfo->name, pToken, pSql, dbIncluded);
code = tscSetTableFullName(&pStableMetaInfo->name, &sTblToken, pSql, dbIncluded);
if (code != TSDB_CODE_SUCCESS) {
return code;
}
......@@ -7793,7 +7798,7 @@ int32_t doCheckForStream(SSqlObj* pSql, SSqlInfo* pInfo) {
}
SRelElementPair* p1 = taosArrayGet(pFromInfo->list, 0);
SStrToken srcToken = {.z = p1->tableName.z, .n = p1->tableName.n, .type = TK_STRING};
SStrToken srcToken = {.z = p1->tableName.z, .n = p1->tableName.n, .type = p1->tableName.type};
bool dbIncluded2 = false;
if (tscValidateName(&srcToken, true, &dbIncluded2) != TSDB_CODE_SUCCESS) {
......
......@@ -250,6 +250,7 @@ int32_t shellRunCommand(TAOS* con, char* command) {
break;
case '\'':
case '"':
case '`':
if (quote) {
*p++ = '\\';
}
......@@ -271,7 +272,7 @@ int32_t shellRunCommand(TAOS* con, char* command) {
if (quote == c) {
quote = 0;
} else if (quote == 0 && (c == '\'' || c == '"')) {
} else if (quote == 0 && (c == '\'' || c == '"' || c == '`')) {
quote = c;
}
......
......@@ -101,9 +101,9 @@ if $data11 != 2 then
return -1
endi
## tbname in can accpet Upper case table name
## no support tbname in Upper case
sql select count(*) from $stb where tbname in ('ti_tb0', 'TI_tb1', 'TI_TB2') group by t1 order by t1
if $rows != 3 then
if $rows != 1 then
return -1
endi
if $data00 != 10 then
......@@ -112,18 +112,6 @@ endi
if $data01 != 0 then
return -1
endi
if $data10 != 10 then
return -1
endi
if $data11 != 1 then
return -1
endi
if $data20 != 10 then
return -1
endi
if $data21 != 2 then
return -1
endi
sql select count(*) from $stb where tbname in ('ti_tb1', 'ti_tb300') and tbname in ('ti_tb5', 'ti_tb1000') group by t1 order by t1 asc
if $rows != 0 then
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册