提交 e8f9f503 编写于 作者: H Haojun Liao

[td-225] fix bugs in join query.

上级 6fd03c90
......@@ -419,7 +419,6 @@ char *tscGetErrorMsgPayload(SSqlCmd *pCmd);
int32_t tscInvalidSQLErrMsg(char *msg, const char *additionalInfo, const char *sql);
int32_t tscToSQLCmd(SSqlObj *pSql, struct SSqlInfo *pInfo);
//void tscGetResultColumnChr(SSqlRes *pRes, SFieldInfo* pFieldInfo, int32_t column);
static FORCE_INLINE void tscGetResultColumnChr(SSqlRes* pRes, SFieldInfo* pFieldInfo, int32_t columnIndex) {
SFieldSupInfo* pInfo = (SFieldSupInfo*) TARRAY_GET_ELEM(pFieldInfo->pSupportInfo, columnIndex);
......
......@@ -1054,6 +1054,10 @@ void tscSetupOutputColumnIndex(SSqlObj* pSql) {
}
}
}
// restore the offset value for super table query in case of final result.
tscRestoreSQLFuncForSTableQuery(pQueryInfo);
tscFieldInfoUpdateOffset(pQueryInfo);
}
void tscJoinQueryCallback(void* param, TAOS_RES* tres, int code) {
......@@ -2046,9 +2050,7 @@ void tscBuildResFromSubqueries(SSqlObj *pSql) {
}
while (1) {
if (pRes->row < pRes->numOfRows) {
assert(0);
}
assert (pRes->row >= pRes->numOfRows);
doBuildResFromSubqueries(pSql);
sem_post(&pSql->rspSem);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册