Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion source/client/src/clientMain.c
Original file line number Diff line number Diff line change
Expand Up @@ -781,8 +781,14 @@ TAOS_ROW taos_fetch_row(TAOS_RES *res) {

if (TD_RES_QUERY(res)) {
SRequestObj *pRequest = (SRequestObj *)res;
if (pRequest->killed) {
tscInfo("query has been killed, can not fetch more row.");
pRequest->code = TSDB_CODE_TSC_QUERY_KILLED;
return NULL;
}

if (pRequest->type == TSDB_SQL_RETRIEVE_EMPTY_RESULT || pRequest->type == TSDB_SQL_INSERT ||
pRequest->code != TSDB_CODE_SUCCESS || taos_num_fields(res) == 0 || pRequest->killed) {
pRequest->code != TSDB_CODE_SUCCESS || taos_num_fields(res) == 0) {
return NULL;
}

Expand Down
4 changes: 2 additions & 2 deletions tools/shell/src/shellEngine.c
Original file line number Diff line number Diff line change
Expand Up @@ -284,7 +284,7 @@ void shellRunSingleCommandImp(char *command) {
if (error_no == 0) {
printf("Query OK, %" PRId64 " row(s) in set (%.6fs)\r\n", numOfRows, (et - st) / 1E6);
} else {
printf("Query interrupted (%s), %" PRId64 " row(s) in set (%.6fs)\r\n", taos_errstr(NULL), numOfRows,
printf("Query interrupted (%s), %" PRId64 " row(s) in set (%.6fs)\r\n", tstrerror(error_no), numOfRows,
(et - st) / 1E6);
}
taos_free_result(pSql);
Expand Down Expand Up @@ -1033,7 +1033,7 @@ void shellDumpResultCallback(void *param, TAOS_RES *tres, int num_of_rows) {
}
} else {
if (num_of_rows < 0) {
printf("\033[31masync retrieve failed, code: %d\033, %s[0m\n", num_of_rows, tstrerror(num_of_rows));
printf("\033[31masync retrieve failed, code: %d, %s\033[0m\n", num_of_rows, tstrerror(num_of_rows));
}
tsem_post(&dump_info->sem);
}
Expand Down
Loading