From 471886c0aea0e73a9ca5505fb551f9321649e001 Mon Sep 17 00:00:00 2001 From: Alex Duan <417921451@qq.com> Date: Fri, 22 Sep 2023 15:38:56 +0800 Subject: [PATCH] fix: add dbname tbname output in error information --- src/taosdump.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/taosdump.c b/src/taosdump.c index cc2387e3..e0fc0ecb 100644 --- a/src/taosdump.c +++ b/src/taosdump.c @@ -5203,8 +5203,8 @@ static int64_t writeResultToAvroNative( if (0 != avro_value_get_by_name( &record, "tbname", &avro_value, NULL)) { errorPrint("%s() LN%d, avro_value_get_by_name(tbname) " - "failed\n", - __func__, __LINE__); + "failed dbName=%s tbName=%s\n", + __func__, __LINE__, dbName, tbName); break; } avro_value_set_branch(&avro_value, 1, &branch); @@ -5224,9 +5224,9 @@ static int64_t writeResultToAvroNative( if (0 != avro_file_writer_append_value(db, &record)) { errorPrint("%s() LN%d, " - "Unable to write record to file. Message: %s\n", + "Unable to write record to file. Message: %s dbName=%s tbName=%s\n", __func__, __LINE__, - avro_strerror()); + avro_strerror(), dbName, tbName); failed--; } else { success++; @@ -5237,9 +5237,9 @@ static int64_t writeResultToAvroNative( } if (countInBatch != limit) { - errorPrint("%s() LN%d, actual dump out: %d, batch %" PRId64 "\n", + errorPrint("%s() LN%d, table rows is zero. actual dump out: %d, batch %" PRId64 " dbName=%s tbName=%s\n", __func__, __LINE__, - countInBatch, limit); + countInBatch, limit, dbName, tbName); } taos_free_result(res); printDotOrX(offset, &printDot);