*: Address comment

This commit is contained in:
shenli
2015-12-22 00:17:12 +08:00
parent 2015287078
commit 25d883da3c
2 changed files with 4 additions and 3 deletions

View File

@ -14,12 +14,13 @@
package converter
import (
"strings"
"github.com/juju/errors"
"github.com/pingcap/tidb/ast"
"github.com/pingcap/tidb/expression"
"github.com/pingcap/tidb/expression/subquery"
"github.com/pingcap/tidb/model"
"strings"
)
func convertExpr(converter *expressionConverter, expr ast.ExprNode) (expression.Expression, error) {

View File

@ -1373,8 +1373,8 @@ func (s *testSessionSuite) TestSubstringIndexExpr(c *C) {
se := newSession(c, store, s.dbName)
mustExecSQL(c, se, "drop table if exists t;")
mustExecSQL(c, se, "create table t (c varchar(128));")
mustExecSQL(c, se, `insert into t values ("www.mysql.com");`)
mustExecMatch(c, se, "SELECT DISTINCT SUBSTRING_INDEX(c, '.', 2) from t;", [][]interface{}{{"www.mysql"}})
mustExecSQL(c, se, `insert into t values ("www.pingcap.com");`)
mustExecMatch(c, se, "SELECT DISTINCT SUBSTRING_INDEX(c, '.', 2) from t;", [][]interface{}{{"www.pingcap"}})
}
func (s *testSessionSuite) TestGlobalVarAccessor(c *C) {