Skip to content

Commit

Permalink
*: remove a useless argument (#2319)
Browse files Browse the repository at this point in the history
  • Loading branch information
zimulala authored and hanfei1991 committed Dec 25, 2016
1 parent 751a81b commit 6f95d18
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion ddl/ddl_worker.go
Expand Up @@ -426,6 +426,6 @@ func updateSchemaVersion(t *meta.Meta, job *model.Job) (int64, error) {
} else {
diff.TableID = job.TableID
}
err = t.SetSchemaDiff(schemaVersion, diff)
err = t.SetSchemaDiff(diff)
return schemaVersion, errors.Trace(err)
}
4 changes: 2 additions & 2 deletions meta/meta.go
Expand Up @@ -756,12 +756,12 @@ func (m *Meta) GetSchemaDiff(schemaVersion int64) (*model.SchemaDiff, error) {
}

// SetSchemaDiff sets the modification information on a given schema version.
func (m *Meta) SetSchemaDiff(schemaVersion int64, diff *model.SchemaDiff) error {
func (m *Meta) SetSchemaDiff(diff *model.SchemaDiff) error {
data, err := json.Marshal(diff)
if err != nil {
return errors.Trace(err)
}
diffKey := m.schemaDiffKey(schemaVersion)
diffKey := m.schemaDiffKey(diff.Version)
err = m.txn.Set(diffKey, data)
return errors.Trace(err)
}
Expand Down
2 changes: 1 addition & 1 deletion meta/meta_test.go
Expand Up @@ -176,7 +176,7 @@ func (s *testSuite) TestMeta(c *C) {
TableID: 2,
OldTableID: 3,
}
err = t.SetSchemaDiff(schemaDiff.Version, schemaDiff)
err = t.SetSchemaDiff(schemaDiff)
c.Assert(err, IsNil)
readDiff, err := t.GetSchemaDiff(schemaDiff.Version)
c.Assert(readDiff, DeepEquals, schemaDiff)
Expand Down

0 comments on commit 6f95d18

Please sign in to comment.