diff --git a/src/client/src/tscServer.c b/src/client/src/tscServer.c index b19af46a0c7f191b84d1ea8658f13456624179c9..0eba04ffb2e500e0d7a0ab6f005a217b6027f41c 100644 --- a/src/client/src/tscServer.c +++ b/src/client/src/tscServer.c @@ -2955,7 +2955,8 @@ int32_t tscGetTableMetaImpl(SSqlObj* pSql, STableMetaInfo *pTableMetaInfo, bool // in case of child table, here only get the if (pMeta->tableType == TSDB_CHILD_TABLE) { int32_t code = tscCreateTableMetaFromSTableMeta(pSql, &pTableMetaInfo->pTableMeta, name, &pTableMetaInfo->tableMetaCapacity, (STableMeta **)(&pSTMeta)); - pSql->pBuf = (void *)(pSTMeta); + pSql->pBuf = (void *)(pSTMeta); + pMeta = pTableMetaInfo->pTableMeta; if (code != TSDB_CODE_SUCCESS) { return getTableMetaFromMnode(pSql, pTableMetaInfo, autocreate); }