[Add single quotation marks to nchar fields when export to a file]

This commit is contained in:
huili 2019-07-23 15:34:36 +08:00
parent 0015053b9e
commit 1caaf88c7e
1 changed files with 1 additions and 1 deletions

View File

@ -480,7 +480,7 @@ int shellDumpResult(TAOS *con, char *fname, int *error_no) {
case TSDB_DATA_TYPE_NCHAR:
memset(t_str, 0, TSDB_MAX_BYTES_PER_ROW);
memcpy(t_str, row[i], fields[i].bytes);
fprintf(fp, "%s", t_str);
fprintf(fp, "\'%s\'", t_str);
break;
case TSDB_DATA_TYPE_TIMESTAMP:
fprintf(fp, "%ld", *(int64_t *)row[i]);