Skip to content

Commit bbffc22

Browse files
committed
*: Tiny cleanup (pingcap#1145)
Fix typo
1 parent 3b25069 commit bbffc22

File tree

10 files changed

+10
-9
lines changed

10 files changed

+10
-9
lines changed

LICENSES/LICENSE LICENSE

File renamed without changes.

ast/ast.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ const (
5555
// ExprNode is a node that can be evaluated.
5656
// Name of implementations should have 'Expr' suffix.
5757
type ExprNode interface {
58-
// Node is embeded in ExprNode.
58+
// Node is embedded in ExprNode.
5959
Node
6060
// SetType sets evaluation type to the expression.
6161
SetType(tp *types.FieldType)

ddl/index_test.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@ func (s *testIndexSuite) TestIndex(c *C) {
155155
c.Assert(err, IsNil)
156156
c.Assert(exist, IsFalse)
157157

158-
h, err = t.AddRecord(ctx, types.MakeDatums(1, 1, 1))
158+
_, err = t.AddRecord(ctx, types.MakeDatums(1, 1, 1))
159159
c.Assert(err, IsNil)
160160
}
161161

infoschema/infoschema.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ type InfoSchema interface {
7676
SchemaMetaVersion() int64
7777
}
7878

79-
// Infomation Schema Name.
79+
// Information Schema Name.
8080
const (
8181
Name = "INFORMATION_SCHEMA"
8282
)

optimizer/plan/plan_test.go

+1
Original file line numberDiff line numberDiff line change
@@ -346,6 +346,7 @@ func (s *testPlanSuite) TestBestPlan(c *C) {
346346
c.Assert(err, IsNil)
347347

348348
err = Refine(p)
349+
c.Assert(err, IsNil)
349350
c.Assert(ToString(p), Equals, ca.best, Commentf("for %s cost %v", ca.sql, EstimateCost(p)))
350351
}
351352
}

perfschema/statement_test.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ func (p *testStatementSuit) TestUninitPS(c *C) {
2929
// Run init()
3030
ps := &perfSchema{}
3131
// ps is uninitialized, all mTables are missing.
32-
// This cound happend at the bootstrap stage.
32+
// This may happen at the bootstrap stage.
3333
// So we must make sure the following actions are safe.
3434
err := ps.updateEventsStmtsCurrent(0, []types.Datum{})
3535
c.Assert(err, IsNil)

store/localstore/mvcc_test.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ func (t *testMvccSuite) TestMvccPutAndDel(c *C) {
132132
})
133133
txn, _ = t.s.Begin()
134134
txn.Set(encodeInt(0), []byte("v"))
135-
v, err = txn.Get(encodeInt(0))
135+
_, err = txn.Get(encodeInt(0))
136136
c.Assert(err, IsNil)
137137
txn.Commit()
138138

@@ -191,7 +191,7 @@ func (t *testMvccSuite) TestSnapshotGet(c *C) {
191191
// Get version not exists
192192
minVerSnapshot, err := t.s.GetSnapshot(kv.MinVersion)
193193
c.Assert(err, IsNil)
194-
b, err = minVerSnapshot.Get(testKey)
194+
_, err = minVerSnapshot.Get(testKey)
195195
c.Assert(err, NotNil)
196196
}
197197

table/tables/bounded_tables_test.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,6 @@ func (ts *testBoundedTableSuite) TestBoundedBasic(c *C) {
115115
c.Assert(vals[0].GetString(), Equals, "abc")
116116

117117
c.Assert(tb.Truncate(ctx), IsNil)
118-
row, err = tb.Row(ctx, rid)
118+
_, err = tb.Row(ctx, rid)
119119
c.Assert(err, NotNil)
120120
}

table/tables/memory_tables_test.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,6 @@ func (ts *testMemoryTableSuite) TestMemoryBasic(c *C) {
116116
_, err = tb.AddRecord(ctx, types.MakeDatums(1, "abc"))
117117
c.Assert(err, IsNil)
118118
c.Assert(tb.Truncate(ctx), IsNil)
119-
row, err = tb.Row(ctx, rid)
119+
_, err = tb.Row(ctx, rid)
120120
c.Assert(err, NotNil)
121121
}

util/hack/hack_test.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ func TestString(t *testing.T) {
3434

3535
b = append(b, "abc"...)
3636
if a != "aello world" {
37-
t.Fatal(a)
37+
t.Fatalf("a:%v, b:%v", a, b)
3838
}
3939
}
4040

0 commit comments

Comments
 (0)