提交 d36bfa25 编写于 作者: A Alex Duan

fix(query): uniform the format of result between 2.6 and 3.0

上级 339c9302
...@@ -217,16 +217,16 @@ void shellRunSingleCommandImp(char *command) { ...@@ -217,16 +217,16 @@ void shellRunSingleCommandImp(char *command) {
et = taosGetTimestampUs(); et = taosGetTimestampUs();
if (error_no == 0) { 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 { } 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); taos_free_result(pSql);
} else { } else {
int32_t num_rows_affacted = taos_affected_rows(pSql); int32_t num_rows_affacted = taos_affected_rows(pSql);
taos_free_result(pSql); taos_free_result(pSql);
et = taosGetTimestampUs(); 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 of %d row(s) in set (%.6fs)\r\n", num_rows_affacted, num_rows_affacted, (et - st) / 1E6);
// call auto tab // call auto tab
callbackAutoTab(command, NULL, false); callbackAutoTab(command, NULL, false);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册