Merge pull request #17659 from taosdata/fix/TD-19489-3.0

fix(query): uniform the format of result between 2.6 and 3.0
This commit is contained in:
dapan1121 2022-10-27 09:12:06 +08:00 committed by GitHub
commit d3d60dad8d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 3 deletions

View File

@ -217,16 +217,16 @@ void shellRunSingleCommandImp(char *command) {
et = taosGetTimestampUs();
if (error_no == 0) {
printf("Query OK, %d rows in database (%.6fs)\r\n", numOfRows, (et - st) / 1E6);
printf("Query OK, %d row(s) in set (%.6fs)\r\n", numOfRows, (et - st) / 1E6);
} else {
printf("Query interrupted (%s), %d rows affected (%.6fs)\r\n", taos_errstr(pSql), numOfRows, (et - st) / 1E6);
printf("Query interrupted (%s), %d row(s) in set (%.6fs)\r\n", taos_errstr(pSql), numOfRows, (et - st) / 1E6);
}
taos_free_result(pSql);
} else {
int32_t num_rows_affacted = taos_affected_rows(pSql);
taos_free_result(pSql);
et = taosGetTimestampUs();
printf("Query OK, %d of %d rows affected (%.6fs)\r\n", num_rows_affacted, num_rows_affacted, (et - st) / 1E6);
printf("Query OK, %d row(s) affected in set (%.6fs)\r\n", num_rows_affacted, (et - st) / 1E6);
// call auto tab
callbackAutoTab(command, NULL, false);