From f74d2258cb66a789f297ee804abb2bb70536b40e Mon Sep 17 00:00:00 2001 From: Minglei Jin Date: Thu, 28 Apr 2022 19:27:27 +0800 Subject: [PATCH] fix(query): disallow order by tbname for temp table --- src/client/src/tscSQLParser.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/client/src/tscSQLParser.c b/src/client/src/tscSQLParser.c index f52f60db40..8060bfc899 100644 --- a/src/client/src/tscSQLParser.c +++ b/src/client/src/tscSQLParser.c @@ -6701,6 +6701,10 @@ int32_t validateOrderbyNode(SSqlCmd* pCmd, SQueryInfo* pQueryInfo, SSqlNode* pSq return invalidOperationMsg(pMsgBuf, msg1); } + if (index.columnIndex == TSDB_TBNAME_COLUMN_INDEX) { + return invalidOperationMsg(pMsgBuf, msg1); + } + if (udf) { return invalidOperationMsg(pMsgBuf, msg11); } -- GitLab