提交 2d0dad7a 编写于 作者: G Ganlin Zhao

fix: fix nullbitmap shift error when trimming data blocks.

上级 8b063357
......@@ -1590,7 +1590,7 @@ static void doShiftBitmap(char* nullBitmap, size_t n, size_t total) {
i += 1;
}
} else if (n > 8) {
int32_t remain = (total % 8 <= tail) ? 1 : 0;
int32_t remain = (total % 8 != 0 && total % 8 <= tail) ? 1 : 0;
int32_t gap = len - newLen - remain;
while (i < newLen) {
uint8_t v = p[i + gap];
......
......@@ -288,7 +288,7 @@ class TDTestCase:
tdSql.checkData(0, 3, 5.000000000)
tdSql.checkData(0, 4, 5.000000000)
tdSql.checkData(0, 5, 0.000000000)
tdSql.checkData(0, 7, None)
tdSql.checkData(0, 7, 1)
tdSql.checkData(0, 8, "binary5")
tdSql.checkData(0, 9, "nchar5")
tdSql.checkData(1, 8, None)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册