Hotfix/sangshuduo/td 3197 fix taosdemo coverity scan (#6907)
* [TD-3197] <fix>: fix taosdemo coverity scan issues. * [TD-3197] <fix>: fix taosdemo coverity scan issue. fix subscribeTest pids uninitialized. * [TD-3197] <fix>: fix taosdemo coverity scan issues. * [TD-3197] <fix>: fix coverity scan issues. check super tbl info pointer. * [TD-3197] <fix>: fix coverity scan issues. move sub tbl query thread join into loop * [TD-3197] <fix>: fix coverity scan issues. remove unused variable * [TD-3197] <fix>: fix coverity scan issues. use more secure random library * [TD-3197] <fix>: fix coverity scan issues. use strncpy for more safe * [TD-3197] <fix>: fix taosdemo coverity scan issue. replace arc4random with rand(). * [TD-3197] <fix>: fix coverity scan issues. check stb info pointer for start time * [TD-3197] <fix>: fix coverity scan issues. fix strcpy vulnerability * [TD-3197] <fix>: fix taosdemo coverity scan issue. modify taosdemoTest2. try to check database continously. * [TD-3197] <fix>: taosdemo coverity scan issues. * [TD-3197] <fix>: fix memory leak when parsing arguments. * [TD-3197] <fix>: fix cmake strip arguments. * [TD-3197] <fix>: taosdemo coverity scan. fix cmake string manipulation. * [TD-3197]<fix>: taosdemo coverity scan issue. configDir buffer overwrite. * [TD-3197]<fix>: coverity scan issue. taosdump argument validation. * [TD-3197]<fix>: taosdemo and taosdump coverity scan issues. * [TD-3197]<fix>: taosdemo coverity scan. append result buf to file. for develop branch. * exit if read sample file failed. * fix converity scan issue. * fix coverity scan issue. Co-authored-by: Shuduo Sang <sdsang@taosdata.com>
This commit is contained in:
parent
93396bca69
commit
2e4f9508ce
|
@ -5002,6 +5002,7 @@ static int64_t generateData(char *recBuf, char **data_type,
|
|||
if (s == NULL) {
|
||||
errorPrint("%s() LN%d, memory allocation %d bytes failed\n",
|
||||
__func__, __LINE__, lenOfBinary + 1);
|
||||
exit(-1);
|
||||
}
|
||||
rand_string(s, lenOfBinary);
|
||||
pstr += sprintf(pstr, ",\"%s\"", s);
|
||||
|
@ -5011,6 +5012,7 @@ static int64_t generateData(char *recBuf, char **data_type,
|
|||
if (s == NULL) {
|
||||
errorPrint("%s() LN%d, memory allocation %d bytes failed\n",
|
||||
__func__, __LINE__, lenOfBinary + 1);
|
||||
exit(-1);
|
||||
}
|
||||
rand_string(s, lenOfBinary);
|
||||
pstr += sprintf(pstr, ",\"%s\"", s);
|
||||
|
@ -6747,7 +6749,9 @@ static void startMultiThreadInsertData(int threads, char* db_name,
|
|||
char buffer[3000];
|
||||
char *pstr = buffer;
|
||||
|
||||
if (AUTO_CREATE_SUBTBL == superTblInfo->autoCreateTable) {
|
||||
if ((superTblInfo)
|
||||
&& (AUTO_CREATE_SUBTBL
|
||||
== superTblInfo->autoCreateTable)) {
|
||||
pstr += sprintf(pstr, "INSERT INTO ? USING %s TAGS(?",
|
||||
superTblInfo->sTblName);
|
||||
for (int tag = 0; tag < (superTblInfo->tagCount - 1); tag ++ ) {
|
||||
|
|
Loading…
Reference in New Issue