Skip to content

Commit 7cb89d5

Browse files
committed
Merge pull request #588 from pingcap/qiuyesuifeng/fix-reorg-state-test-bug
ddl: fix reorg state test bug.
2 parents 6f0b599 + 06f24a4 commit 7cb89d5

File tree

2 files changed

+1
-11
lines changed

2 files changed

+1
-11
lines changed

ddl/column_test.go

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -415,8 +415,6 @@ func (s *testColumnSuite) checkReorganizationColumn(c *C, ctx context.Context, d
415415
c.Assert(err, IsNil)
416416
c.Assert(i, Equals, int64(1))
417417

418-
s.checkColumnKVExist(c, ctx, t, handle, col, columnValue, isDropped)
419-
420418
// Test add a new row.
421419
_, err = ctx.GetTxn(true)
422420
c.Assert(err, IsNil)
@@ -457,7 +455,6 @@ func (s *testColumnSuite) checkReorganizationColumn(c *C, ctx context.Context, d
457455
})
458456
c.Assert(i, Equals, int64(1))
459457

460-
s.checkColumnKVExist(c, ctx, t, handle, col, columnValue, false)
461458
s.testGetColumn(c, t, col.Name.L, false)
462459
}
463460

ddl/index_test.go

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -384,13 +384,6 @@ func (s *testIndexSuite) checkReorganizationIndex(c *C, ctx context.Context, d *
384384
c.Assert(err, IsNil)
385385
c.Assert(i, Equals, int64(1))
386386

387-
columnValues := make([]interface{}, len(indexCol.Columns))
388-
for i, column := range indexCol.Columns {
389-
columnValues[i] = row[column.Offset]
390-
}
391-
392-
s.checkIndexKVExist(c, ctx, t, handle, indexCol, columnValues, isDropped)
393-
394387
// Test add a new row.
395388
_, err = ctx.GetTxn(true)
396389
c.Assert(err, IsNil)
@@ -412,6 +405,7 @@ func (s *testIndexSuite) checkReorganizationIndex(c *C, ctx context.Context, d *
412405
})
413406
c.Assert(i, Equals, int64(2))
414407

408+
columnValues := make([]interface{}, len(indexCol.Columns))
415409
for i, column := range indexCol.Columns {
416410
columnValues[i] = newRow[column.Offset]
417411
}
@@ -452,7 +446,6 @@ func (s *testIndexSuite) checkReorganizationIndex(c *C, ctx context.Context, d *
452446
})
453447
c.Assert(i, Equals, int64(1))
454448

455-
s.checkIndexKVExist(c, ctx, t, handle, indexCol, columnValues, false)
456449
s.testGetIndex(c, t, indexCol.Columns[0].Name.L, false)
457450
}
458451

0 commit comments

Comments
 (0)