Skip to content

Commit

Permalink
plan: open some test. (pingcap#5811)
Browse files Browse the repository at this point in the history
  • Loading branch information
hanfei1991 authored Feb 7, 2018
1 parent 5be134e commit 901e898
Showing 1 changed file with 12 additions and 13 deletions.
25 changes: 12 additions & 13 deletions plan/logical_plan_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1077,15 +1077,14 @@ func (s *testPlanSuite) TestValidate(c *C) {
sql: "insert into t set a = 1, b = values(a) + 1",
err: nil,
},
// TODO: Fix Error Code.
//{
// sql: "select a, b, c from t order by 0",
// err: ErrUnknownColumn,
//},
//{
// sql: "select a, b, c from t order by 4",
// err: ErrUnknownColumn,
//},
{
sql: "select a, b, c from t order by 0",
err: ErrUnknownColumn,
},
{
sql: "select a, b, c from t order by 4",
err: ErrUnknownColumn,
},
{
sql: "select a as c1, b as c1 from t order by c1",
err: ErrAmbiguous,
Expand All @@ -1094,10 +1093,10 @@ func (s *testPlanSuite) TestValidate(c *C) {
sql: "(select a as b, b from t) union (select a, b from t) order by b",
err: ErrAmbiguous,
},
//{
// sql: "(select a as b, b from t) union (select a, b from t) order by a",
// err: ErrUnknownColumn,
//},
{
sql: "(select a as b, b from t) union (select a, b from t) order by a",
err: ErrUnknownColumn,
},
{
sql: "select * from t t1 use index(e)",
err: ErrKeyDoesNotExist,
Expand Down

0 comments on commit 901e898

Please sign in to comment.