Skip to content

Commit

Permalink
tidb: add hex test
Browse files Browse the repository at this point in the history
  • Loading branch information
siddontang committed Sep 15, 2015
1 parent 181e832 commit 6ceda1c
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions tidb_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -668,6 +668,16 @@ func (s *testSessionSuite) TestIndex(c *C) {
match(c, rows[0], 1)
}

func (s *testSessionSuite) TestHexadecimal(c *C) {
store := newStore(c, s.dbName)
se := newSession(c, store, s.dbName)

r := mustExecSQL(c, se, `select 0x01 + 1, x'4D7953514C' = "MySQL"`)
row, err := r.FirstRow()
c.Assert(err, IsNil)
match(c, row, 2, 1)
}

func newSession(c *C, store kv.Storage, dbName string) Session {
se, err := CreateSession(store)
c.Assert(err, IsNil)
Expand Down

0 comments on commit 6ceda1c

Please sign in to comment.