提交 36ade420 编写于 作者: H hzcheng

fix bug

上级 bedd0eb8
...@@ -46,12 +46,12 @@ TEST(TsdbTest, createRepo) { ...@@ -46,12 +46,12 @@ TEST(TsdbTest, createRepo) {
SDataRow row = (SDataRow)(pBlock->data + pBlock->len); SDataRow row = (SDataRow)(pBlock->data + pBlock->len);
tdInitDataRow(row, schema); tdInitDataRow(row, schema);
for (int j; j < schemaNCols(schema); j++) { for (int j = 0; j < schemaNCols(schema); j++) {
if (j == 0) { // Just for timestamp if (j == 0) { // Just for timestamp
tdAppendColVal(row, (void *)(&time), schemaColAt(schema, i)); tdAppendColVal(row, (void *)(&time), schemaColAt(schema, j));
} else { // For int } else { // For int
int val = 10; int val = 10;
tdAppendColVal(row, (void *)(&val), schemaColAt(schema, i)); tdAppendColVal(row, (void *)(&val), schemaColAt(schema, j));
} }
pBlock->len += dataRowLen(row); pBlock->len += dataRowLen(row);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册