Skip to content

Commit

Permalink
server: fix invalid condition check
Browse files Browse the repository at this point in the history
  • Loading branch information
siddontang committed Oct 10, 2015
1 parent 8aa3305 commit b8b918b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tidb-server/server/conn.go
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ func (cc *clientConn) readHandshakeResponse() error {
pos++
auth := data[pos : pos+authLen]
pos += authLen
if cc.capability|mysql.ClientConnectWithDB > 0 {
if cc.capability&mysql.ClientConnectWithDB > 0 {
if len(data[pos:]) > 0 {
idx := bytes.IndexByte(data[pos:], 0)
cc.dbname = string(data[pos : pos+idx])
Expand Down

0 comments on commit b8b918b

Please sign in to comment.