Merge pull request #20253 from taosdata/fix/TD-22952
fix: taosc crash caused of ordering by string
This commit is contained in:
commit
3d49dd670e
|
@ -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()
|
||||
|
|
Loading…
Reference in New Issue