提交 e377d4e9 编写于 作者: S Shengliang Guan

fix: should not memset after realloc

上级 8b7f0f3a
...@@ -1135,7 +1135,6 @@ int32_t colInfoDataEnsureCapacity(SColumnInfoData* pColumn, size_t existRows, ui ...@@ -1135,7 +1135,6 @@ int32_t colInfoDataEnsureCapacity(SColumnInfoData* pColumn, size_t existRows, ui
assert(pColumn->info.bytes); assert(pColumn->info.bytes);
tmp = taosMemoryRealloc(pColumn->pData, numOfRows * pColumn->info.bytes); tmp = taosMemoryRealloc(pColumn->pData, numOfRows * pColumn->info.bytes);
memset(tmp, 0, numOfRows * pColumn->info.bytes);
if (tmp == NULL) { if (tmp == NULL) {
return TSDB_CODE_OUT_OF_MEMORY; return TSDB_CODE_OUT_OF_MEMORY;
} }
......
...@@ -253,16 +253,15 @@ endi ...@@ -253,16 +253,15 @@ endi
# The order of data from different sub tables in the super table is random, # The order of data from different sub tables in the super table is random,
# so this detection may fail randomly # so this detection may fail randomly
print $data01 $data02 $data03 if $data01 != 10 then
# if $data01 != 10 then return -1
# return -1 endi
# endi if $data02 != 2.00000 then
# if $data02 != 2.00000 then return -1
# return -1 endi
# endi if $data03 != 3.000000000 then
# if $data03 != 3.000000000 then return -1
# return -1 endi
# endi
#print =============== select count(column) from supter table #print =============== select count(column) from supter table
#sql select count(ts), count(c1), count(c2), count(c3) from stb #sql select count(ts), count(c1), count(c2), count(c3) from stb
...@@ -511,15 +510,15 @@ if $rows != 9 then ...@@ -511,15 +510,15 @@ if $rows != 9 then
endi endi
# The order of data from different sub tables in the super table is random, # The order of data from different sub tables in the super table is random,
# so this detection may fail randomly # so this detection may fail randomly
#if $data01 != 10 then if $data01 != 10 then
# return -1 return -1
#endi endi
#if $data02 != 2.00000 then if $data02 != 2.00000 then
# return -1 return -1
#endi endi
#if $data03 != 3.000000000 then if $data03 != 3.000000000 then
# return -1 return -1
#endi endi
#print =============== select count(column) from supter table #print =============== select count(column) from supter table
#sql select count(ts), count(c1), count(c2), count(c3) from stb #sql select count(ts), count(c1), count(c2), count(c3) from stb
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册