未验证 提交 3d49dd67 编写于 作者: S Shengliang Guan 提交者: GitHub

Merge pull request #20253 from taosdata/fix/TD-22952

fix: taosc crash caused of ordering by string
......@@ -2797,6 +2797,10 @@ static int32_t translateOrderBy(STranslateContext* pCxt, SSelectStmt* pSelect) {
bool other;
int32_t code = translateOrderByPosition(pCxt, pSelect->pProjectionList, pSelect->pOrderByList, &other);
if (TSDB_CODE_SUCCESS == code) {
if (0 == LIST_LENGTH(pSelect->pOrderByList)) {
NODES_DESTORY_LIST(pSelect->pOrderByList);
return TSDB_CODE_SUCCESS;
}
if (!other) {
return TSDB_CODE_SUCCESS;
}
......
......@@ -38,6 +38,7 @@ class TDTestCase:
#tdSql.checkData(0,0,1537146000000)
tdSql.checkData(0,1,10)
tdSql.query(f"select * from {dbname}.stb_1 order by 'aaa' desc")
def stop(self):
tdSql.close()
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册