commit
48d0543d0e
|
@ -235,7 +235,7 @@ void taos_fetch_rows_a(TAOS_RES *taosa, void (*fp)(void *, TAOS_RES *, int), voi
|
||||||
(*pSql->fetchFp)(param, pSql, 0);
|
(*pSql->fetchFp)(param, pSql, 0);
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
} else if (pCmd->command == TSDB_SQL_RETRIEVE) {
|
} else if (pCmd->command == TSDB_SQL_RETRIEVE || pCmd->command == TSDB_SQL_RETRIEVE_LOCALMERGE) {
|
||||||
// in case of show command, return no data
|
// in case of show command, return no data
|
||||||
(*pSql->fetchFp)(param, pSql, 0);
|
(*pSql->fetchFp)(param, pSql, 0);
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -46,10 +46,13 @@ static int32_t minMsgSize() { return tsRpcHeadSize + 100; }
|
||||||
|
|
||||||
static void tscSetDnodeIpList(SSqlObj* pSql, SCMVgroupInfo* pVgroupInfo) {
|
static void tscSetDnodeIpList(SSqlObj* pSql, SCMVgroupInfo* pVgroupInfo) {
|
||||||
SRpcIpSet* pIpList = &pSql->ipList;
|
SRpcIpSet* pIpList = &pSql->ipList;
|
||||||
|
pIpList->inUse = 0;
|
||||||
|
if (pVgroupInfo == NULL) {
|
||||||
|
pIpList->numOfIps = 0;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
pIpList->numOfIps = pVgroupInfo->numOfIps;
|
pIpList->numOfIps = pVgroupInfo->numOfIps;
|
||||||
pIpList->inUse = 0;
|
|
||||||
|
|
||||||
for(int32_t i = 0; i < pVgroupInfo->numOfIps; ++i) {
|
for(int32_t i = 0; i < pVgroupInfo->numOfIps; ++i) {
|
||||||
strcpy(pIpList->fqdn[i], pVgroupInfo->ipAddr[i].fqdn);
|
strcpy(pIpList->fqdn[i], pVgroupInfo->ipAddr[i].fqdn);
|
||||||
pIpList->port[i] = pVgroupInfo->ipAddr[i].port;
|
pIpList->port[i] = pVgroupInfo->ipAddr[i].port;
|
||||||
|
@ -539,14 +542,18 @@ static char *doSerializeTableInfo(SQueryTableMsg* pQueryMsg, SSqlObj *pSql, char
|
||||||
int32_t index = pTableMetaInfo->vgroupIndex;
|
int32_t index = pTableMetaInfo->vgroupIndex;
|
||||||
assert(index >= 0);
|
assert(index >= 0);
|
||||||
|
|
||||||
|
if (pTableMetaInfo->vgroupList->numOfVgroups > 0) {
|
||||||
pVgroupInfo = &pTableMetaInfo->vgroupList->vgroups[index];
|
pVgroupInfo = &pTableMetaInfo->vgroupList->vgroups[index];
|
||||||
|
}
|
||||||
tscDebug("%p query on stable, vgIndex:%d, numOfVgroups:%d", pSql, index, pTableMetaInfo->vgroupList->numOfVgroups);
|
tscDebug("%p query on stable, vgIndex:%d, numOfVgroups:%d", pSql, index, pTableMetaInfo->vgroupList->numOfVgroups);
|
||||||
} else {
|
} else {
|
||||||
pVgroupInfo = &pTableMeta->vgroupInfo;
|
pVgroupInfo = &pTableMeta->vgroupInfo;
|
||||||
}
|
}
|
||||||
|
|
||||||
tscSetDnodeIpList(pSql, pVgroupInfo);
|
tscSetDnodeIpList(pSql, pVgroupInfo);
|
||||||
|
if (pVgroupInfo != NULL) {
|
||||||
pQueryMsg->head.vgId = htonl(pVgroupInfo->vgId);
|
pQueryMsg->head.vgId = htonl(pVgroupInfo->vgId);
|
||||||
|
}
|
||||||
|
|
||||||
STableIdInfo *pTableIdInfo = (STableIdInfo *)pMsg;
|
STableIdInfo *pTableIdInfo = (STableIdInfo *)pMsg;
|
||||||
pTableIdInfo->tid = htonl(pTableMeta->sid);
|
pTableIdInfo->tid = htonl(pTableMeta->sid);
|
||||||
|
|
Loading…
Reference in New Issue