Skip to content

Commit

Permalink
ddl: fix shard show id bug (#5751)
Browse files Browse the repository at this point in the history
  • Loading branch information
zimulala authored and shenli committed Jan 30, 2018
1 parent 9588cec commit ef9452d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion ddl/table.go
Original file line number Diff line number Diff line change
Expand Up @@ -276,7 +276,7 @@ func (d *ddl) onShardRowID(t *meta.Meta, job *model.Job) (ver int64, _ error) {
return ver, errors.Trace(err)
}
tblInfo.ShardRowIDBits = shardRowIDBits
job.State = model.JobCancelled
job.State = model.JobDone
job.BinlogInfo.AddTableInfo(ver, tblInfo)
ver, err = updateTableInfo(t, job, tblInfo, tblInfo.State)
if err != nil {
Expand Down
2 changes: 2 additions & 0 deletions executor/ddl_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -310,4 +310,6 @@ func (s *testSuite) TestShardRowIDBits(c *C) {
c.Assert(err, IsNil)
c.Assert(count, Equals, 100)
c.Assert(hasShardedID, IsTrue)

tk.MustExec("alter table t shard_row_id_bits = 5")
}

0 comments on commit ef9452d

Please sign in to comment.