Merge pull request #875 from pingcap/qiuyesuifeng/add-in-test

optimizer/evaluator: add in expr evaluation test.
This commit is contained in:
zimulala
2016-01-29 20:01:06 +08:00

View File

@ -662,10 +662,23 @@ func (s *testEvaluatorSuite) TestPatternIn(c *C) {
{
exprStr: "NULL not in (2, 3)",
resultStr: "<nil>",
}, {
},
{
exprStr: "NULL in (NULL, 3)",
resultStr: "<nil>",
},
{
exprStr: "1 in (1, NULL)",
resultStr: "1",
},
{
exprStr: "1 in (NULL, 1)",
resultStr: "1",
},
{
exprStr: "2 in (1, NULL)",
resultStr: "<nil>",
},
}
s.runTests(c, cases)
}