Hotfix/sangshuduo/td 4823 taosdemo gettablename for develop (#6605)
* [TD-4823]<fix>: taosdemo getTableName return empty. * fix typo. * check table name is empty in early stage. Co-authored-by: Shuduo Sang <sdsang@taosdata.com>
This commit is contained in:
parent
eb0f1a39e7
commit
8fc2b3d79d
|
@ -2493,6 +2493,13 @@ static int getChildNameOfSuperTableWithLimitAndOffset(TAOS * taos,
|
|||
char* pTblName = childTblName;
|
||||
while((row = taos_fetch_row(res)) != NULL) {
|
||||
int32_t* len = taos_fetch_lengths(res);
|
||||
|
||||
if (0 == strlen((char *)row[0])) {
|
||||
errorPrint("%s() LN%d, No.%"PRId64" table return empty name\n",
|
||||
__func__, __LINE__, count);
|
||||
exit(-1);
|
||||
}
|
||||
|
||||
tstrncpy(pTblName, (char *)row[0], len[0]+1);
|
||||
//printf("==== sub table name: %s\n", pTblName);
|
||||
count++;
|
||||
|
@ -6293,16 +6300,6 @@ static void startMultiThreadInsertData(int threads, char* db_name,
|
|||
}
|
||||
}
|
||||
|
||||
// read sample data from file first
|
||||
if ((superTblInfo) && (0 == strncasecmp(superTblInfo->dataSource,
|
||||
"sample", strlen("sample")))) {
|
||||
if (0 != prepareSampleDataForSTable(superTblInfo)) {
|
||||
errorPrint("%s() LN%d, prepare sample data for stable failed!\n",
|
||||
__func__, __LINE__);
|
||||
exit(-1);
|
||||
}
|
||||
}
|
||||
|
||||
TAOS* taos0 = taos_connect(
|
||||
g_Dbs.host, g_Dbs.user,
|
||||
g_Dbs.password, db_name, g_Dbs.port);
|
||||
|
|
Loading…
Reference in New Issue