diff --git a/src/benchCsv.c b/src/benchCsv.c index ac2e7cb9..34e0ba7b 100644 --- a/src/benchCsv.c +++ b/src/benchCsv.c @@ -293,7 +293,7 @@ int32_t genRowByField(char* buf, BArray* fields, int16_t fieldCnt, char* binanry } } - pos1 += dataGenByField(fd, buf, pos1, prefix, k); + pos1 += dataGenByField(fd, buf, pos1, prefix, k, ""); } return pos1; diff --git a/src/benchDataMix.c b/src/benchDataMix.c index d819ec9f..d2f59e7b 100644 --- a/src/benchDataMix.c +++ b/src/benchDataMix.c @@ -14,8 +14,6 @@ #include "benchDataMix.h" #include -#define VAL_NULL "NULL" - #define VBOOL_CNT 3 int32_t inul = 20; // interval null count @@ -97,11 +95,11 @@ uint32_t genRadomString(char* val, uint32_t len, char* prefix) { // data row generate by randowm -uint32_t dataGenByField(Field* fd, char* pstr, uint32_t len, char* prefix, int64_t *k) { +uint32_t dataGenByField(Field* fd, char* pstr, uint32_t len, char* prefix, int64_t *k, char* nullVal) { uint32_t size = 0; - char val[512] = VAL_NULL; + char val[512] = {0}; if( fd->fillNull && RD(inul) == 0 ) { - size = sprintf(pstr + len, ",%s", VAL_NULL); + size = sprintf(pstr + len, ",%s", nullVal); return size; } diff --git a/src/benchInsertMix.c b/src/benchInsertMix.c index 3e62143e..87ac2670 100644 --- a/src/benchInsertMix.c +++ b/src/benchInsertMix.c @@ -285,6 +285,8 @@ uint32_t appendRowRuleOld(SSuperTable* stb, char* pstr, uint32_t len, int64_t ti } #define GET_IDX(i) info->batCols[i] +#define VAL_NULL "NULL" + uint32_t genRowMixAll(threadInfo* info, SSuperTable* stb, char* pstr, uint32_t len, int64_t ts, int64_t* k) { uint32_t size = 0; // first col is ts @@ -317,7 +319,7 @@ uint32_t genRowMixAll(threadInfo* info, SSuperTable* stb, char* pstr, uint32_t l } } - size += dataGenByField(fd, pstr, len + size, prefix, k); + size += dataGenByField(fd, pstr, len + size, prefix, k, VAL_NULL); } // end