[TD-3177] <fix>: fix demo.c checking result error mistake.
This commit is contained in:
parent
5f2ead65af
commit
b44bff0c6a
|
@ -27,7 +27,6 @@ tests/hdfs/
|
|||
nmake/
|
||||
sln/
|
||||
hdfs/
|
||||
c/
|
||||
taoshebei/
|
||||
taosdalipu/
|
||||
Target/
|
||||
|
|
|
@ -92,15 +92,14 @@ void Test(TAOS *taos, char *qstr, int index) {
|
|||
// printf("insert row: %i, reason:%s\n", i, taos_errstr(taos));
|
||||
// }
|
||||
TAOS_RES *result1 = taos_query(taos, qstr);
|
||||
if (result1) {
|
||||
printf("insert row: %i\n", i);
|
||||
} else {
|
||||
printf("failed to insert row: %i, reason:%s\n", i, "null result"/*taos_errstr(result)*/);
|
||||
if (result1 == NULL || taos_errno(result1) != 0) {
|
||||
printf("failed to insert row, reason:%s\n", taos_errstr(result1));
|
||||
taos_free_result(result1);
|
||||
exit(1);
|
||||
} else {
|
||||
printf("insert row: %i\n", i);
|
||||
}
|
||||
taos_free_result(result1);
|
||||
|
||||
}
|
||||
printf("success to insert rows, total %d rows\n", i);
|
||||
|
||||
|
|
Loading…
Reference in New Issue