*: Tiny cleanup (#1145)

Fix typo
This commit is contained in:
Shen Li
2016-04-23 10:27:13 +08:00
parent 3b25069f84
commit bbffc220ed
10 changed files with 10 additions and 9 deletions

View File

@ -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)

View File

@ -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)
}

View File

@ -76,7 +76,7 @@ type InfoSchema interface {
SchemaMetaVersion() int64
}
// Infomation Schema Name.
// Information Schema Name.
const (
Name = "INFORMATION_SCHEMA"
)

View File

@ -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)))
}
}

View File

@ -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)

View File

@ -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()
@ -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)
}

View File

@ -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)
}

View File

@ -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)
}

View File

@ -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)
}
}