From 36ade4200e263a73c55e384d000cca7d789f758f Mon Sep 17 00:00:00 2001 From: hzcheng Date: Fri, 13 Mar 2020 19:14:47 +0800 Subject: [PATCH] fix bug --- src/vnode/tsdb/tests/tsdbTests.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/vnode/tsdb/tests/tsdbTests.cpp b/src/vnode/tsdb/tests/tsdbTests.cpp index 91b6d417a4..052ad38d01 100644 --- a/src/vnode/tsdb/tests/tsdbTests.cpp +++ b/src/vnode/tsdb/tests/tsdbTests.cpp @@ -46,12 +46,12 @@ TEST(TsdbTest, createRepo) { SDataRow row = (SDataRow)(pBlock->data + pBlock->len); tdInitDataRow(row, schema); - for (int j; j < schemaNCols(schema); j++) { + for (int j = 0; j < schemaNCols(schema); j++) { if (j == 0) { // Just for timestamp - tdAppendColVal(row, (void *)(&time), schemaColAt(schema, i)); + tdAppendColVal(row, (void *)(&time), schemaColAt(schema, j)); } else { // For int int val = 10; - tdAppendColVal(row, (void *)(&val), schemaColAt(schema, i)); + tdAppendColVal(row, (void *)(&val), schemaColAt(schema, j)); } pBlock->len += dataRowLen(row); -- GitLab