diff --git a/source/client/src/clientSml.c b/source/client/src/clientSml.c index 544e9c925ae9eb26717e6fa6b8de3e9aec65b584..1ca7d53991178edfd99123aae1a91a9893fe4ad0 100644 --- a/source/client/src/clientSml.c +++ b/source/client/src/clientSml.c @@ -461,10 +461,14 @@ static int32_t smlProcessSchemaAction(SSmlHandle* info, SSchema* schemaField, SH static int32_t smlModifyDBSchemas(SSmlHandle* info) { int32_t code = 0; - SEpSet ep = getEpSet_s(&info->taos->pAppInfo->mgmtEp); SName pName = {TSDB_TABLE_NAME_T, info->taos->acctId, {0}, {0}}; strcpy(pName.dbname, info->pRequest->pDb); + SRequestConnInfo conn = {.pTrans = info->taos->pAppInfo->pTransporter, + .requestId = info->pRequest->requestId, + .requestObjRefId = info->pRequest->self, + .mgmtEps = getEpSet_s(&info->taos->pAppInfo->mgmtEp)}; + SSmlSTableMeta** tableMetaSml = (SSmlSTableMeta**)taosHashIterate(info->superTables, NULL); while (tableMetaSml) { SSmlSTableMeta* sTableData = *tableMetaSml; @@ -475,11 +479,6 @@ static int32_t smlModifyDBSchemas(SSmlHandle* info) { memset(pName.tname, 0, TSDB_TABLE_NAME_LEN); memcpy(pName.tname, superTable, superTableLen); - SRequestConnInfo conn = {.pTrans = info->taos->pAppInfo->pTransporter, - .requestId = info->pRequest->requestId, - .requestObjRefId = info->pRequest->self, - .mgmtEps = getEpSet_s(&info->taos->pAppInfo->mgmtEp)}; - code = catalogGetSTableMeta(info->pCatalog, &conn, &pName, &pTableMeta); if (code == TSDB_CODE_PAR_TABLE_NOT_EXIST || code == TSDB_CODE_MND_INVALID_STB) { @@ -542,7 +541,7 @@ static int32_t smlModifyDBSchemas(SSmlHandle* info) { return 0; end: - catalogRefreshTableMeta(info->pCatalog, info->taos->pAppInfo->pTransporter, &ep, &pName, 1); + catalogRefreshTableMeta(info->pCatalog, &conn, &pName, 1); return code; }