From f32f10ec82f9b94348c652f3793ad0bd6fb3168b Mon Sep 17 00:00:00 2001 From: Shuduo Sang Date: Wed, 22 Sep 2021 18:00:41 +0800 Subject: [PATCH] Hotfix/sangshuduo/td 5872 taosdemo stmt improve (#8014) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * [TD-5872]: taosdemo stmt improve. * refactor stmt functions. * [TD-5872]: taosdemo stmt csv perf improve. * rand func back to early impl. * fix windows/mac compile error. * fix empty tag sample. * [TD-5873]add stmt’performance taosdemo testcase * add data_type enum and stmt_batch framework. * use data type enum and fix test case limit/offset. * revert thread number. * rename MAX_SAMPLES_ONCE_FROM_FILE to reflect reality. * split func for stmt interlace. * fix bug that get build path. * stmt batch interlace works. * fix start time issue. * few cleanup. * fix nchar random length. Co-authored-by: Shuduo Sang Co-authored-by: tomchon --- src/kit/taosdemo/taosdemo.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/kit/taosdemo/taosdemo.c b/src/kit/taosdemo/taosdemo.c index 482d76ebd5..88ff349915 100644 --- a/src/kit/taosdemo/taosdemo.c +++ b/src/kit/taosdemo/taosdemo.c @@ -6717,7 +6717,7 @@ static int generateSampleFromRand( case TSDB_DATA_TYPE_NCHAR: dataLen = (columns)?columns[c].dataLen:g_args.binwidth; - rand_string(data, dataLen); + rand_string(data, dataLen - 1); pos += sprintf(buff + pos, "%s,", data); break; -- GitLab