From befbdf8972fa5aeefcc48878722cd41d020d9dcf Mon Sep 17 00:00:00 2001 From: Haojun Liao Date: Tue, 16 Mar 2021 14:11:05 +0800 Subject: [PATCH] [td-225]update test. --- src/client/src/tscSQLParser.c | 4 ++-- tests/pytest/query/queryNormal.py | 5 +++-- tests/script/general/table/delete_writing.sim | 2 +- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/src/client/src/tscSQLParser.c b/src/client/src/tscSQLParser.c index d4ab9cc1c7..8b2998c0e7 100644 --- a/src/client/src/tscSQLParser.c +++ b/src/client/src/tscSQLParser.c @@ -6379,8 +6379,8 @@ int32_t doCheckForStream(SSqlObj* pSql, SSqlInfo* pInfo) { return invalidSqlErrMsg(tscGetErrorMsgPayload(pCmd), msg6); } - tVariantListItem* p1 = taosArrayGet(pFromInfo->tableList, 0); - SStrToken srcToken = {.z = p1->pVar.pz, .n = p1->pVar.nLen, .type = TK_STRING}; + STableNamePair* p1 = taosArrayGet(pFromInfo->tableList, 0); + SStrToken srcToken = {.z = p1->name.z, .n = p1->name.n, .type = TK_STRING}; if (tscValidateName(&srcToken) != TSDB_CODE_SUCCESS) { return invalidSqlErrMsg(tscGetErrorMsgPayload(pCmd), msg1); } diff --git a/tests/pytest/query/queryNormal.py b/tests/pytest/query/queryNormal.py index 13393117d6..4e3f9dd3bd 100644 --- a/tests/pytest/query/queryNormal.py +++ b/tests/pytest/query/queryNormal.py @@ -94,8 +94,9 @@ class TDTestCase: tdSql.query("select * from stb1 limit 2 offset 3") tdSql.checkRows(1) - # query ... alias for table ---- bug - tdSql.error("select t.ts from tb1 t") + # query ... alias for table + tdSql.query("select t.ts from tb1 t") + tdSql.checkRows(2) # query ... tbname tdSql.query("select tbname from stb1") diff --git a/tests/script/general/table/delete_writing.sim b/tests/script/general/table/delete_writing.sim index b7350f26a7..5351d13d80 100644 --- a/tests/script/general/table/delete_writing.sim +++ b/tests/script/general/table/delete_writing.sim @@ -41,7 +41,7 @@ while $x < 15 sql create table db.tb (ts timestamp, i int) - sleep 2000 + sleep 1000 $x = $x + 1 endw -- GitLab