From 00b9c04d417b4cdaaeacc7dc3d4b1abff34775a0 Mon Sep 17 00:00:00 2001 From: Yang Zhao Date: Thu, 21 Oct 2021 10:55:55 +0800 Subject: [PATCH] [TD-1027]taosdemo query show error message (#8360) --- src/kit/taosdemo/taosdemo.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/kit/taosdemo/taosdemo.c b/src/kit/taosdemo/taosdemo.c index 77aadab171..87757443f1 100644 --- a/src/kit/taosdemo/taosdemo.c +++ b/src/kit/taosdemo/taosdemo.c @@ -3857,8 +3857,8 @@ static int getChildNameOfSuperTableWithLimitAndOffset(TAOS * taos, if (code != 0) { taos_free_result(res); taos_close(taos); - errorPrint2("%s() LN%d, failed to run command %s\n", - __func__, __LINE__, command); + errorPrint2("%s() LN%d, failed to run command %s, reason: %s\n", + __func__, __LINE__, command, taos_errstr(res)); exit(EXIT_FAILURE); } @@ -3937,7 +3937,7 @@ static int getSuperTableFromServer(TAOS * taos, char* dbName, res = taos_query(taos, command); int32_t code = taos_errno(res); if (code != 0) { - printf("failed to run command %s\n", command); + printf("failed to run command %s, reason: %s\n", command, taos_errstr(res)); taos_free_result(res); return -1; } -- GitLab