未验证 提交 81ac233c 编写于 作者: J Jeff Tao 提交者: GitHub

Merge pull request #720 from taosdata/hotfix/#719

Fix #719
...@@ -363,19 +363,19 @@ int vnodeImportToFile(SImportInfo *pImport) { ...@@ -363,19 +363,19 @@ int vnodeImportToFile(SImportInfo *pImport) {
SData *cdata[TSDB_MAX_COLUMNS]; SData *cdata[TSDB_MAX_COLUMNS];
char *buffer1 = char *buffer1 =
malloc(pObj->bytesPerPoint * pCfg->rowsInFileBlock + (sizeof(SData) + EXTRA_BYTES) * pObj->numOfColumns); malloc(pObj->bytesPerPoint * pCfg->rowsInFileBlock + (sizeof(SData) + EXTRA_BYTES + sizeof(TSCKSUM)) * pObj->numOfColumns);
cdata[0] = (SData *)buffer1; cdata[0] = (SData *)buffer1;
SData *data[TSDB_MAX_COLUMNS]; SData *data[TSDB_MAX_COLUMNS];
char *buffer2 = char *buffer2 =
malloc(pObj->bytesPerPoint * pCfg->rowsInFileBlock + (sizeof(SData) + EXTRA_BYTES) * pObj->numOfColumns); malloc(pObj->bytesPerPoint * pCfg->rowsInFileBlock + (sizeof(SData) + EXTRA_BYTES + sizeof(TSCKSUM)) * pObj->numOfColumns);
data[0] = (SData *)buffer2; data[0] = (SData *)buffer2;
for (col = 1; col < pObj->numOfColumns; ++col) { for (col = 1; col < pObj->numOfColumns; ++col) {
cdata[col] = (SData *)(((char *)cdata[col - 1]) + sizeof(SData) + EXTRA_BYTES + cdata[col] = (SData *)(((char *)cdata[col - 1]) + sizeof(SData) + EXTRA_BYTES +
pObj->pointsPerFileBlock * pObj->schema[col - 1].bytes); pObj->pointsPerFileBlock * pObj->schema[col - 1].bytes + sizeof(TSCKSUM));
data[col] = (SData *)(((char *)data[col - 1]) + sizeof(SData) + EXTRA_BYTES + data[col] = (SData *)(((char *)data[col - 1]) + sizeof(SData) + EXTRA_BYTES +
pObj->pointsPerFileBlock * pObj->schema[col - 1].bytes); pObj->pointsPerFileBlock * pObj->schema[col - 1].bytes + sizeof(TSCKSUM));
} }
int rowsBefore = 0; int rowsBefore = 0;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册