diff --git a/source/client/src/clientSml.c b/source/client/src/clientSml.c index 46cca54e42fae751a75b4b89ced0b26f13602a03..0de4a981419333d3cc9c19ef60cc3af10e9a3e3c 100644 --- a/source/client/src/clientSml.c +++ b/source/client/src/clientSml.c @@ -1216,7 +1216,8 @@ static int32_t smlInsertData(SSmlHandle *info) { if(info->pRequest->dbList == NULL){ info->pRequest->dbList = taosArrayInit(1, TSDB_DB_FNAME_LEN); } - taosArrayPush(info->pRequest->dbList, info->pRequest->pDb); + void* data = taosArrayReserve(info->pRequest->dbList, 1); + memcpy(data, info->pRequest->pDb, TSDB_DB_FNAME_LEN > strlen(info->pRequest->pDb) ? strlen(info->pRequest->pDb) : TSDB_DB_FNAME_LEN); SSmlTableInfo **oneTable = (SSmlTableInfo **)taosHashIterate(info->childTables, NULL); while (oneTable) {