[td-225] fix compiler errors.
This commit is contained in:
parent
805ee80611
commit
5e6006f533
|
@ -1947,16 +1947,22 @@ int32_t tscHandleInsertRetry(SSqlObj* pSql) {
|
||||||
}
|
}
|
||||||
|
|
||||||
int32_t tscHandleMultivnodeInsert(SSqlObj *pSql) {
|
int32_t tscHandleMultivnodeInsert(SSqlObj *pSql) {
|
||||||
SSqlRes *pRes = &pSql->res;
|
|
||||||
SSqlCmd *pCmd = &pSql->cmd;
|
SSqlCmd *pCmd = &pSql->cmd;
|
||||||
|
SSqlRes *pRes = &pSql->res;
|
||||||
|
|
||||||
size_t size = taosArrayGetSize(pCmd->pDataBlocks);
|
size_t size = taosArrayGetSize(pCmd->pDataBlocks);
|
||||||
assert(size > 0);
|
assert(size > 0);
|
||||||
|
|
||||||
// the number of already initialized subqueries
|
// the number of already initialized subqueries
|
||||||
int32_t numOfSub = 0;
|
int32_t numOfSub = 0;
|
||||||
|
|
||||||
|
SSubqueryState *pState = calloc(1, sizeof(SSubqueryState));
|
||||||
|
pState->numOfTotal = pSql->numOfSubs;
|
||||||
|
pState->numOfRemain = pSql->numOfSubs;
|
||||||
|
|
||||||
pSql->numOfSubs = (uint16_t)size;
|
pSql->numOfSubs = (uint16_t)size;
|
||||||
|
pRes->code = TSDB_CODE_SUCCESS;
|
||||||
|
|
||||||
pSql->pSubs = calloc(size, POINTER_BYTES);
|
pSql->pSubs = calloc(size, POINTER_BYTES);
|
||||||
if (pSql->pSubs == NULL) {
|
if (pSql->pSubs == NULL) {
|
||||||
goto _error;
|
goto _error;
|
||||||
|
@ -1964,12 +1970,6 @@ int32_t tscHandleMultivnodeInsert(SSqlObj *pSql) {
|
||||||
|
|
||||||
tscDebug("%p submit data to %" PRIzu " vnode(s)", pSql, size);
|
tscDebug("%p submit data to %" PRIzu " vnode(s)", pSql, size);
|
||||||
|
|
||||||
SSubqueryState *pState = calloc(1, sizeof(SSubqueryState));
|
|
||||||
pState->numOfTotal = pSql->numOfSubs;
|
|
||||||
pState->numOfRemain = pSql->numOfSubs;
|
|
||||||
|
|
||||||
pRes->code = TSDB_CODE_SUCCESS;
|
|
||||||
|
|
||||||
while(numOfSub < pSql->numOfSubs) {
|
while(numOfSub < pSql->numOfSubs) {
|
||||||
SInsertSupporter* pSupporter = calloc(1, sizeof(SInsertSupporter));
|
SInsertSupporter* pSupporter = calloc(1, sizeof(SInsertSupporter));
|
||||||
if (pSupporter == NULL) {
|
if (pSupporter == NULL) {
|
||||||
|
|
Loading…
Reference in New Issue