摘要:
mysql列存储引擎-union all与给返回值赋值集合出错-问题分析
相关ISSUE: https://github.com/stoneatom/stonedb/issues/1599
DML
表结构与插入数据
drop table ttt;
create table ttt(c1 int,c2 int);
insert into ttt values(327266,1),(327267,1),(327268,1),(327269,1),(327270,1);
查询SQL
结果正确的SQL
select c1 from ttt union select 'aaa' c1 from (select c2 from ttt where c1 IN (327265)) x;
结果错误的SQL
select c1 from ttt union all select 'aaa' c1