Skip to content

Commit

Permalink
*: Tiny cleanup (pingcap#1145)
Browse files Browse the repository at this point in the history
Fix typo
  • Loading branch information
shenli committed Apr 23, 2016
1 parent 3b25069 commit bbffc22
Show file tree
Hide file tree
Showing 10 changed files with 10 additions and 9 deletions.
File renamed without changes.
2 changes: 1 addition & 1 deletion ast/ast.go
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ const (
// ExprNode is a node that can be evaluated.
// Name of implementations should have 'Expr' suffix.
type ExprNode interface {
// Node is embeded in ExprNode.
// Node is embedded in ExprNode.
Node
// SetType sets evaluation type to the expression.
SetType(tp *types.FieldType)
Expand Down
2 changes: 1 addition & 1 deletion ddl/index_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ func (s *testIndexSuite) TestIndex(c *C) {
c.Assert(err, IsNil)
c.Assert(exist, IsFalse)

h, err = t.AddRecord(ctx, types.MakeDatums(1, 1, 1))
_, err = t.AddRecord(ctx, types.MakeDatums(1, 1, 1))
c.Assert(err, IsNil)
}

Expand Down
2 changes: 1 addition & 1 deletion infoschema/infoschema.go
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ type InfoSchema interface {
SchemaMetaVersion() int64
}

// Infomation Schema Name.
// Information Schema Name.
const (
Name = "INFORMATION_SCHEMA"
)
Expand Down
1 change: 1 addition & 0 deletions optimizer/plan/plan_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -346,6 +346,7 @@ func (s *testPlanSuite) TestBestPlan(c *C) {
c.Assert(err, IsNil)

err = Refine(p)
c.Assert(err, IsNil)
c.Assert(ToString(p), Equals, ca.best, Commentf("for %s cost %v", ca.sql, EstimateCost(p)))
}
}
Expand Down
2 changes: 1 addition & 1 deletion perfschema/statement_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ func (p *testStatementSuit) TestUninitPS(c *C) {
// Run init()
ps := &perfSchema{}
// ps is uninitialized, all mTables are missing.
// This cound happend at the bootstrap stage.
// This may happen at the bootstrap stage.
// So we must make sure the following actions are safe.
err := ps.updateEventsStmtsCurrent(0, []types.Datum{})
c.Assert(err, IsNil)
Expand Down
4 changes: 2 additions & 2 deletions store/localstore/mvcc_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ func (t *testMvccSuite) TestMvccPutAndDel(c *C) {
})
txn, _ = t.s.Begin()
txn.Set(encodeInt(0), []byte("v"))
v, err = txn.Get(encodeInt(0))
_, err = txn.Get(encodeInt(0))
c.Assert(err, IsNil)
txn.Commit()

Expand Down Expand Up @@ -191,7 +191,7 @@ func (t *testMvccSuite) TestSnapshotGet(c *C) {
// Get version not exists
minVerSnapshot, err := t.s.GetSnapshot(kv.MinVersion)
c.Assert(err, IsNil)
b, err = minVerSnapshot.Get(testKey)
_, err = minVerSnapshot.Get(testKey)
c.Assert(err, NotNil)
}

Expand Down
2 changes: 1 addition & 1 deletion table/tables/bounded_tables_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,6 @@ func (ts *testBoundedTableSuite) TestBoundedBasic(c *C) {
c.Assert(vals[0].GetString(), Equals, "abc")

c.Assert(tb.Truncate(ctx), IsNil)
row, err = tb.Row(ctx, rid)
_, err = tb.Row(ctx, rid)
c.Assert(err, NotNil)
}
2 changes: 1 addition & 1 deletion table/tables/memory_tables_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,6 @@ func (ts *testMemoryTableSuite) TestMemoryBasic(c *C) {
_, err = tb.AddRecord(ctx, types.MakeDatums(1, "abc"))
c.Assert(err, IsNil)
c.Assert(tb.Truncate(ctx), IsNil)
row, err = tb.Row(ctx, rid)
_, err = tb.Row(ctx, rid)
c.Assert(err, NotNil)
}
2 changes: 1 addition & 1 deletion util/hack/hack_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ func TestString(t *testing.T) {

b = append(b, "abc"...)
if a != "aello world" {
t.Fatal(a)
t.Fatalf("a:%v, b:%v", a, b)
}
}

Expand Down

0 comments on commit bbffc22

Please sign in to comment.