[TD-573]
This commit is contained in:
parent
f5e2e2f642
commit
a427d5bc28
|
@ -30,7 +30,7 @@ static int32_t doQuery(TAOS* taos, const char* sql) {
|
||||||
|
|
||||||
TAOS_RES* res = taos_query(taos, sql);
|
TAOS_RES* res = taos_query(taos, sql);
|
||||||
if (taos_errno(res) != 0) {
|
if (taos_errno(res) != 0) {
|
||||||
printf("failed to execute query, reason:%s\n", taos_errstr(res));
|
printf("failed to execute query, reason:%s\n", taos_errstr(taos));
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -77,7 +77,7 @@ static __attribute__((unused)) void multiThreadTest(int32_t numOfThreads, void*
|
||||||
pthread_attr_init(&thattr);
|
pthread_attr_init(&thattr);
|
||||||
pthread_attr_setdetachstate(&thattr, PTHREAD_CREATE_JOINABLE);
|
pthread_attr_setdetachstate(&thattr, PTHREAD_CREATE_JOINABLE);
|
||||||
|
|
||||||
pthread_t* threadId = malloc(sizeof(pthread_t)*numOfThreads);
|
pthread_t* threadId = (pthread_t*)malloc(sizeof(pthread_t)*(uint32_t)numOfThreads);
|
||||||
|
|
||||||
for (int i = 0; i < numOfThreads; ++i) {
|
for (int i = 0; i < numOfThreads; ++i) {
|
||||||
pthread_create(&threadId[i], NULL, oneLoader, conn);
|
pthread_create(&threadId[i], NULL, oneLoader, conn);
|
||||||
|
|
Loading…
Reference in New Issue