提交 56efeefc 编写于 作者: M Minglei Jin

tsdbUtil: fix binary search typo

上级 004a6571
......@@ -1190,16 +1190,12 @@ void tBlockDataGetColData(SBlockData *pBlockData, int16_t cid, SColData **ppColD
ASSERT(cid != PRIMARYKEY_TIMESTAMP_COL_ID);
int32_t lidx = 0;
int32_t ridx = taosArrayGetSize(pBlockData->aIdx) - 1;
int32_t midx;
while (lidx <= ridx) {
SColData *pColData;
int32_t c;
midx = (lidx + midx) / 2;
int32_t midx = (lidx + ridx) / 2;
SColData *pColData = tBlockDataGetColDataByIdx(pBlockData, midx);
int32_t c = tColDataCmprFn(pColData, &(SColData){.cid = cid});
pColData = tBlockDataGetColDataByIdx(pBlockData, midx);
c = tColDataCmprFn(pColData, &(SColData){.cid = cid});
if (c == 0) {
*ppColData = pColData;
return;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册