pingcap / mysql-tester

A Golang implementation of MySQL Test Framework
Apache License 2.0
63 stars 62 forks source link

Mysql test runner doesn't parse CTE statement correlty. #63

Closed espresso98 closed 2 years ago

espresso98 commented 2 years ago
create table t1(a int);
insert into t1 values(1),(2);
with qn(a) as (select 1 from t1 limit 2)
select * from qn where qn.a=(select * from qn qn1 limit 1) union select 2;
drop table t1;
ERRO[0000] run test [with_non_recursive_bugs] err: sql:with qn(a) as (select 1 from t1 limit 2): [parser:1064]You have an error in your SQL syntax; check the manual that corresponds to your TiDB version for the right syntax to use line 1 column 40 near "" 
espresso98 commented 2 years ago

Resolved.