提交 17b9917b 编写于 作者: X Xiaoyu Wang

TD-12696 bug fix for insert

上级 0d4490bc
......@@ -121,12 +121,8 @@ static int32_t findCol(SToken* pColname, int32_t start, int32_t end, SSchema* pS
}
static void buildMsgHeader(SVgDataBlocks* blocks) {
// SMsgDesc* desc = (SMsgDesc*)blocks->pData;
// desc->numOfVnodes = htonl(1);
// SSubmitMsg* submit = (SSubmitMsg*)(desc + 1);
SSubmitMsg* submit = (SSubmitMsg*)blocks->pData;
submit->header.vgId = htonl(blocks->vg.vgId);
// submit->header.contLen = htonl(blocks->size - sizeof(SMsgDesc));
submit->header.contLen = htonl(blocks->size);
submit->length = submit->header.contLen;
submit->numOfBlocks = htonl(blocks->numOfTables);
......
......@@ -28,7 +28,7 @@ class TableBuilder : public ITableBuilder {
public:
virtual TableBuilder& addColumn(const std::string& name, int8_t type, int32_t bytes) {
assert(colId_ <= schema()->tableInfo.numOfTags + schema()->tableInfo.numOfColumns);
SSchema* col = schema()->schema + colId_;
SSchema* col = schema()->schema + (colId_ - 1);
col->type = type;
col->colId = colId_++;
col->bytes = bytes;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册