patch 4.0

This commit is contained in:
wangzelin.wzl
2022-10-24 10:34:53 +08:00
parent 4ad6e00ec3
commit 93a1074b0c
10533 changed files with 2588271 additions and 2299373 deletions

View File

@ -2,6 +2,7 @@ drop database if exists ambiguous;
create database ambiguous;
use ambiguous;
# http://k3.alibaba-inc.com/issue/6300608?stat=1.5.7&toPage=1&versionId=1043693
drop table if exists t1, t2, t3;
create table t1(c1 int primary key, c2 int);
create table t2(c1 int primary key, c2 int);
@ -9,12 +10,15 @@ create table t3(c1 int primary key, c2 int);
--error 5206
select c1, sum(c2) from t1 group by 2;
# http://k3.alibaba-inc.com/issue/6307368?stat=1.5.2&toPage=1&versionId=1043693
--error 5207
select * from t1 join t2 using(c1) join t3 using(c2);
# http://k3.alibaba-inc.com/issue/6311307?versionId=1043693
--error 5208
select * from t1 join t2 using(c1) join t1 using(c2);
# http://k3.alibaba-inc.com/issue/6258378?stat=1.5.9&toPage=1&versionId=1043693
--error 5207
select c2 from t1 join t2 using(c1) join t3 using(c1);
@ -26,6 +30,7 @@ select X.c1 from t1 AS X group by X.c2 having (X.c2 = 1);
select * from (select * from t1) t join t2 using(c1)
SELECT * FROM t1 LEFT JOIN t2 USING (c1) WHERE c1 IS NULL;
# http://k3.alibaba-inc.com/issue/6345854?stat=1.5.10&toPage=1&versionId=1043693
select c2 from t1 left join t2 using(c2);
drop database ambiguous;

View File

@ -128,7 +128,7 @@ CREATE TABLE s012 (c1 int primary key, c2 varchar(50), c3 int,c4 int, key k1(c1
##index naming
CREATE TABLE s013 (c1 int primary key, c2 varchar(50), c3 int,c4 int, key (c1), key (c1,c2), key (c1,c3))
create table s014 (a int primary key, b int, c int, key(b), key(b, c), key(c));
##测试table_option是否被index_option冲掉
#index option should not specify compress method
CREATE TABLE s015 (c1 int primary key, index idx(c1))compression='lz4_1.0';
@ -191,7 +191,7 @@ create table a019(c1 int unique primary key);
CREATE TABLE e001 (c1 int primary key, c2 varchar(50) comment 'the column of c2')
##table_option
##CHARACTER_SET'指定表中字符串编码'目前仅支持utf-8
CREATE TABLE f001 (c1 int primary key, c2 varchar(50)) CHARACTER SET = 'utf8'
CREATE TABLE f002 (c1 int primary key, c2 varchar(50)) DEFAULT CHARACTER SET = 'utf8'
CREATE TABLE f003 (c1 int primary key, c2 varchar(50)) CHARACTER SET 'utf8'
@ -205,7 +205,7 @@ CREATE TABLE f008 (c1 int primary key, c2 varchar(50)) DEFAULT CHARSET 'utf8'
CREATE TABLE g001 (c1 int primary key, c2 varchar(50))COMMENT = 'the table_name of tt1'
CREATE TABLE g002 (c1 int primary key, c2 varchar(50))COMMENT 'the table_name of tt1'
##COMPRESSION 'none(默认值'不压缩)、lz4_1.0、lzo_1.0、snappy_1.0、zlib_1.0
CREATE TABLE h001 (c1 int primary key, c2 varchar(50))COMPRESSION = 'none'
CREATE TABLE h002 (c1 int primary key, c2 varchar(50))COMPRESSION 'none'
CREATE TABLE h003 (c1 int primary key, c2 varchar(50))COMPRESSION 'lz4_1.0'
@ -213,7 +213,7 @@ CREATE TABLE h004 (c1 int primary key, c2 varchar(50))COMPRESSION 'LZ4_1.0'
--error 4002
CREATE TABLE h005 (c1 int primary key, c2 varchar(50))COMPRESSION 'abc'
##CONSISTENT_MODE static,frozen,weak,strong
##CONSISTENT_MODE ,指定表的默认一致性' staticfrozenweakstrong
#CREATE TABLE t021 (c1 int primary key, c2 varchar(50))CONSISTENT_MODE = 'static'
##EXPIRE_INFO
@ -226,7 +226,7 @@ CREATE TABLE h005 (c1 int primary key, c2 varchar(50))COMPRESSION 'abc'
CREATE TABLE j001 (c1 int primary key, c2 varchar(50))REPLICA_NUM = 3
CREATE TABLE j002 (c1 int primary key, c2 varchar(50))REPLICA_NUM 3
##TABLE_ID
##TABLE_ID//如果指定的table_id小于1000'需要打开RootServer的配置项开关“ddl_system_table_switch”。
CREATE TABLE k001 (c1 int primary key, c2 varchar(50))TABLE_ID = 4000
CREATE TABLE k002 (c1 int primary key, c2 varchar(50))TABLE_ID 4000
@ -401,7 +401,7 @@ create table r47(c1 varchar(2) collate utf8mb4_general_ci)charset=utf8mb4;
create table r48(c1 varchar(2) collate utf8mb4_bin)charset=utf8mb4;
create table r49(c1 varchar(2) charset utf8)collate=utf8mb4_general_ci;
#default value(主要测试中文字符串)
create table r50(c1 varchar(3) default 'abc');
create table r51(c1 varchar(3) default '支付宝');
create table r52(c1 varchar(4) default 'a支付宝');
@ -416,6 +416,7 @@ create table r55(c1 varchar(4) default 'a支付宝d');
create table r56(c1 varchar(3) binary);
create table r57(c1 varchar(3) binary charset utf8mb4);
create table r58(c1 varchar(3) binary charset utf8mb4 collate utf8mb4_general_ci);
#TODO@nijia.nj 列字符集和表字符集同时指定非法值时的报错先后次序
#using hash/btree(only syntax support)
create table r59(c1 int primary key,c2 int ,index idx using btree(c1) using hash);

View File

@ -56,6 +56,17 @@
#WITH cte1 (a, b) AS (SELECT c1, c2 FROM t1), cte2 (c, d) AS (SELECT c1, c2 FROM t2) select * from (with cte2 as(select * from t3) select c3 as c11, c4 from cte2) cte1 join cte2 on cte1.c11=cte2.c;
#--error 5217
#with cte(n) as ( select 1 from dual union all select n+1 from cte where n < 10 ) search depth first by a set abc select * from cte;
##这两种写法oracle也是支持的,因此我们也会支持,但是这个地方其实oracle做的不合理
##举个例子
##with cte(n) as (select 1 from dual) cycle n set iscyc to 'y' default 'n' select n from cte;
##oracle中,上面这条语句会报错,报主查询中的n是找不到,我们这边在非递归的cte中直接忽略了cycle和search的解析
##符合实现oracle超集的目标
##但是后来发现事情没有这么简单
##假设t1表有c1,c2,c3三个列,那么下面这句
##with cte(n,x) as (select * from t1) cycle n set iscyc to 'y' default 'n' select * from cte;
##在oracle中会出现3个列,即c1,c2,c3, 即cte完全变成了t1表
##这个就比较恶心了,这样的定义cte感觉有明显的错误(因为cte表的伪列数量都已经和内部子查询产出的列数量不等了)
##应该被报错才对, 暂时不支持,OB遇到这样的语句会报错
#with cte(n) as (select 1 from dual) search depth first by n set abc select * from cte;
#with cte(a,b,c) as (select * from emp) search depth first by a set abc select * from cte;
#--error 4002

View File

@ -6,7 +6,7 @@ create table t1(c1 int primary key, c2 int) partition by hash(c1 + 1) partitions
### create
create user 'hualong' identified by '123456'
#create user 'hualong' identified by password '123456'
create user 'hualong' identified by '123456', '' identified by '123456'
create user 'hualong' identified by '123456', 'xiyu' identified by '123456'
### drop
drop user 'hualong'

View File

@ -19,7 +19,7 @@ ALTER TABLE default_t1 ADD d3 double not null default 5.0000
ALTER TABLE default_t1 ADD v1 varchar(500);
ALTER TABLE default_t1 ADD v2 varchar(500) not null;
ALTER TABLE default_t1 ADD v3 varchar(500) not null default '@varchar500';
ALTER TABLE default_t1 ADD v3 varchar(500) not null default 'xiyu@varchar500';
--error 5173
ALTER TABLE default_t1 ADD v3 varchar(500) not null default null;
@ -54,10 +54,10 @@ ALTER TABLE default_t1 ADD c3 char not null default 'x';
ALTER TABLE default_t1 ADD b1 binary;
ALTER TABLE default_t1 ADD b2 binary not null;
ALTER TABLE default_t1 ADD b3 binary not null default '@binary'
ALTER TABLE default_t1 ADD b3 binary not null default 'xiyu@binary'
ALTER TABLE default_t1 ADD vb1 varbinary(1000);
ALTER TABLE default_t1 ADD vb2 varbinary(1000) not null;
ALTER TABLE default_t1 ADD vb3 varbinary(1000) not null default '@varbinary@1000';
ALTER TABLE default_t1 ADD vb3 varbinary(1000) not null default 'xiyu@varbinary@1000';
drop database defaultvalue;

View File

@ -8,7 +8,7 @@ select * from t1 left join (t2 left join t3 on d+1=e) on t1.b=t3.b;
select * from t1 left join (t2 left join t3 on d+1=b) on t1.b=t3.b;
select * from t1 left join (t2 left join t3 on c+1=b) on t1.b=t3.b;
# http://k3.alibaba-inc.com/issue/6347852?stat=1.5.1&toPage=1&versionId=1043693
create table t_1 (a1 int, a2 int);
create table t_2 (a1 int, b int);
create table t_3 (c1 int, c2 int);

View File

@ -6,13 +6,18 @@ create table t1(a int, b int);
create table t2(a int, b int);
create table t3(a int, b int);
#聚集没有上推
select (select count(t2.a) from t2) from t1;
#没有上推
select a, (select count(t2.a) from t2) from t1 group by b;
#聚集上推
select count((select count(t2.a) from t2)) from t1;
--error 5176
select count((select count(t1.a) from t2)) from t1;
--error count(t1.a+(select count(t1.a) from t2)) from t1;
#没有上推,聚集含有第二层的基础列
select a as c, b from t1 having b>(select count(t2.a+c) from t2);
#没有上推,聚集含有第二层的alias列
select a as c, b from t1 having b>(select t1.a as d from t2 having count(d)>0);
select a as c, b from t1 having b>(select t1.a as d from t2 having count(c)>0);
select a from t1 having a=(select 1+t1.a as c from t2 order by(select count(t1.a) from t3));
@ -23,13 +28,18 @@ select a from t1 having a=(select 1+t1.a as c from t2 order by(select count(t1.a
select a from t1 having a=(select 1+t1.a as c from t2 order by(select count(t1.a+c) from t3));
select a from t1 having a=(select 1+t1.a as c from t2 order by(select count(t1.a+t1.a) from t3));
select a from t1 having a=(select 1+t2.a as c from t2 order by(select count(t1.a+c) from t3));
#第二层的count()不能被提升到第一层
--error 5176
select a from t1 having a=(select 1+t1.a as c from t2 having count(t1.a+(select count(c) from t3))>0);
select a from t1 having a=(select 1+t1.a as c from t2 having count(t1.a+(select 1+t1.a as cc from t3 having count(cc)>0))>0);
select a from t1 where exists(select max(t1.a) from t2);
SELECT t1.a FROM t1 GROUP BY t1.a HAVING t1.a < ALL(SELECT t2.a FROM t2 GROUP BY t2.a HAVING EXISTS(SELECT t3.a FROM t3 GROUP BY t3.a HAVING SUM(t1.a+t2.a) < t3.a/4));
#子查询是union,union的左右支的aggr fun引用了上层查询的属性,该aggr func也不会上推到该层,
#aggr function的上推不会穿过union
select (select count(t1.b) from t2 union select 1 from t2 where 12 < 3) from t1 group by t1.a;
select a from t1 having count(*) > (select 1);
#聚集函数出现在join table的子查询中
select * from t1 join t2 on t1.a=(select count(t2.a));
select * from t1 join (t2, t3) on t1.a=(select count(t2.a));
#聚集函数上推,聚集函数中的subquery跟着被上推
select (select count((select t1.a from t2)) from t2) from t1;

View File

@ -1,11 +1,13 @@
flashback table t1 to before drop;
flashback table t1 to before drop rename to t2;
flashback database db1 to before drop;
flashback database db1 to before drop rename to db2;
flashback schema db1 to before drop;
flashback schema db1 to before drop rename to db2;
flashback tenant tenant1 to before drop;
flashback table t1 to before drop;
flashback table t1 to before drop rename to t2;
flashback database db1 to before drop;
flashback database db1 to before drop rename to db2;
flashback schema db1 to before drop;
flashback schema db1 to before drop rename to db2;
flashback tenant tenant1 to before drop;
flashback tenant tenant1 to before drop rename to tenant2;
purge table t1;

View File

@ -263,7 +263,7 @@ select c1, sum(c2) from t1 order by sum(c2)
select * from t1 having c1 > 0
select * from t1 having sum(c1) > 0
select c1, c2 column2 from t1 having sum(c1) > 1 and sum(column2) > 1
#select c1, c2 column2 from t1 having column2 > 1 @ TODO
#select c1, c2 column2 from t1 having column2 > 1 @xiyu TODO
####having column must exist in select items or in group items
select c1 from t1 group by c2 having c2 > 0
@ -377,7 +377,7 @@ select c1 from t1 union select c1,c2 from t1;
### select into ###
### when just for test
### select c1 from t1 when ROW_COUNT(update t2 set c1 = 1) @ TODO
### select c1 from t1 when ROW_COUNT(update t2 set c1 = 1) @xiyu TODO
select t1.c1, t2.c2, t2.c3 from t1,t2 where t1.c1 = t2.c1 order by t1.c2;
### sys fun
@ -415,7 +415,7 @@ select X.c1 from t1 AS X group by X.c2 having (X.c1 = 1);
select * from (select * from t1) t join t2 using(c1) join t4 using(c1)
select * from (select * from t1) t join t2 using(c1) left join t4 using(c1)
select * from (select * from t1) t join t2 using(c1) right join t4 using(c1)
# @TODO: table_id will be changed, coment out!
# xiyu@TODO: table_id will be changed, coment out!
#select * from __idx_1099511631103_idx1
--error 5019
select * from t_not_exist
@ -424,7 +424,7 @@ select * from t_not_exist
--error 5207
select c1 a, C2 A from t1 order by a
## bug http://k3.alibaba-inc.com/issue/6347332?stat=1.5.2&toPage=1&versionId=1043693
select * from (t1);
select * from (t1,t2);
select * from (t1,(t2));
@ -436,9 +436,11 @@ select * from ((t1 join t2) join (select * from t3) a);
#select * from (t1,t2) join (t3,t4);
#select * from (t1 join t2) join (t3,t4);
# http://k3.alibaba-inc.com/issue/6328022?versionId=1043693
select * from t1 join t2 on t1.c1=t2.c1, t3 join t4 on t3.c3=t4.c3;
select * from t1 join t2 using(c1), t3 join t4 using(c3);
#http://k3.alibaba-inc.com/issue/6492617?stat=1.5.0&toPage=1&versionId=1043693
select '';
select ' ';
select '\n';
@ -455,6 +457,7 @@ select 'abc' '\n\t11111111111111111111111111111111111111111111111111111111111111
select 'abc' as '\n\t11111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111a22';
select 'abc' as ` 11111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111a22`;
# http://k3.alibaba-inc.com/issue/6358759?stat=1.5.7&toPage=2&versionId=1043693
SELECT t1.c1 FROM t2 LEFT JOIN t1 ON t2.c2 = t1.c1 ORDER BY c1;
select default(c1) from t2;
select default(c3) from test2;
@ -535,6 +538,7 @@ select c3 from t3 where c3>'1';
#select max(connect_by_isleaf), emp_id from emp where connect_by_isleaf < 1 connect by prior emp_id = mgr_id;
#
#
## 测试非层次查询语句中的使用 #
#--error 5312
#select level from emp;
#--error 5312
@ -561,6 +565,7 @@ select c3 from t3 where c3>'1';
#select emp_id from emp where connect_by_iscycle > 1;
#select `level` from emp1;
#
## 测试放到非法的位置 #
#--error 5313
#select emp_id from emp connect by level = 1;
#--error 5313

View File

@ -34,12 +34,16 @@ SELECT (SELECT 1) a, (select A);
--error 5217
SELECT 1 as a,(SELECT a+a) b,(SELECT b);
# http://k3.alibaba-inc.com/issue/6407267?stat=1.5.0&toPage=1&versionId=1043693
select 1 in (1, (1));
select 1 in (1, (select 1));
select 1 in ((select 1), (select 1));
select 1 in ((select 1), (select 1), (select 1));
select 1 in (1, (select 1), (select c1 from t1));
#http://k3.alibaba-inc.com/issue/6213707?stat=1.5.9&toPage=1&versionId=1043693
select MAX(c1) c from t1 having (select c) > 0;
--error 5225
select MAX(c1) c from t1 group by (select c);

View File

@ -228,7 +228,7 @@ select c1, sum(c2) from t1 order by sum(c2)
select * from t1 having c1 > 0
select * from t1 having sum(c1) > 0
select c1, c2 column2 from t1 having sum(c1) > 1 and sum(column2) > 1
#select c1, c2 column2 from t1 having column2 > 1 @ TODO
#select c1, c2 column2 from t1 having column2 > 1 @xiyu TODO
####having column must exist in select items or in group items
select c1 from t1 group by c2 having c2 > 0
@ -332,7 +332,7 @@ select c1 from t1 union select c1,c2 from t1;
### select into ###
### when just for test
### select c1 from t1 when ROW_COUNT(update t2 set c1 = 1) @ TODO
### select c1 from t1 when ROW_COUNT(update t2 set c1 = 1) @xiyu TODO
select t1.c1, t2.c2, t2.c3 from t1,t2 where t1.c1 = t2.c1 order by t1.c2;
### sys fun
@ -362,7 +362,7 @@ select X.c1 from t1 AS X group by X.c2 having (X.c1 = 1);
select * from (select * from t1) t join t2 using(c1) join t4 using(c1)
select * from (select * from t1) t join t2 using(c1) left join t4 using(c1)
select * from (select * from t1) t join t2 using(c1) right join t4 using(c1)
# @TODO: table_id will be changed, coment out!
# xiyu@TODO: table_id will be changed, coment out!
#select * from __idx_1099511631103_idx1
--error 5019
select * from t_not_exist
@ -371,6 +371,7 @@ select * from t_not_exist
--error 5207
select c1 a, C2 A from t1 order by a
## bug http://k3.alibaba-inc.com/issue/6347332?stat=1.5.2&toPage=1&versionId=1043693
select * from (t1);
select * from (t1,t2);
select * from (t1,(t2));
@ -382,9 +383,11 @@ select * from (t1 join t2) join t3;
#select * from (t1,t2) join (t3,t4);
#select * from (t1 join t2) join (t3,t4);
# http://k3.alibaba-inc.com/issue/6328022?versionId=1043693
select * from t1 join t2 on t1.c1=t2.c1, t3 join t4 on t3.c3=t4.c3;
select * from t1 join t2 using(c1), t3 join t4 using(c3);
#http://k3.alibaba-inc.com/issue/6492617?stat=1.5.0&toPage=1&versionId=1043693
SELECT t1.c1 FROM t2 LEFT JOIN t1 ON t2.c2 = t1.c1 ORDER BY c1;
select default(c1) from t2;
--error 5217

View File

@ -1,4 +1,4 @@
CREATE RESOURCE UNIT resource_test MAX_CPU=1, MIN_MEMORY=8589934592, MAX_MEMORY=17179869184, MAX_IOPS=10000, MAX_DISK_SIZE=10737418240, MAX_SESSION_NUM=9223372036854775807;
CREATE RESOURCE UNIT resource_test MAX_CPU=1, MEMORY_SIZE=8589934592;
CREATE RESOURCE POOL resource_zone unit='resource_test', unit_num=1, zone_list=('zone1');
CREATE RESOURCE POOL resource_zone1 unit='resource_test', unit_num=1, zone_list=('zone1');
CREATE TENANT if not exists tenant_test RESOURCE_POOL_LIST=('resource_zone'), LOCALITY='auto_locality_strategy', logonly_replica_num=1 set ob_tcp_invited_nodes='%';

View File

@ -25,6 +25,7 @@ create table ts(c1 int primary key, c2 timestamp default current_timestamp on up
update t1 set c2=1
update t1 set t1.c2=1
##alias 别名
update t1 vt1 set c2=1
update t1 vt1 set vt1.c2=1
#resolve error
@ -40,6 +41,7 @@ update test set c5 = 1
#### column not in index or rowkey
update test set c7 = 3 where c1 = 0
##expr 表达式
update t1 set c2=c1+1
update t1 set c2=2*c1,c2=c2+1
update t1 set c2=c2
@ -66,15 +68,17 @@ update test set c7 = 3 where c1 = 0
#resolve error
#update t1 set c2=1 order by 1 desc
update t1 set c2=1 order by c1 desc
####以下关于order_by的语句是否支持
update t1 set c2=1 order by c2
update t1 set c2=1 order by c1,c2
#parse error
# update t1 set c2=1 order by 2 2
##subquery 子查询
# update t1 set c2 = 6 where c1 = (select max(c1) from t1) //parse error
# update t1 set c2 = (select max(c1) from t1) where c1 = 1 //parse error
##hint 注释
update/*+query_timeout(2000)*/ t1 set c1=1
update/*+index(t1 i1)*/ t1 set c1=1
@ -84,8 +88,10 @@ update test set c7 = 3 where c1 = 0
# update t1 set 1=2
# update t1 set 2=2
##特殊语法
update t2 set c2 = c3 like '%h%' where c1 = 1
##复杂测试语句
update/*+index(t2 i2)*/ t2 vt2 set vt2.c1=2*vt2.c2,c1=c1+1,vt2.c2=10,c3=2 where c1>0 and vt2.c2<2 order by vt2.c1 asc, vt2.c2 desc limit 2 offset 10
update/*+index(t2 i2),query_timeout(2000)*/ t2 vt2 set vt2.c1=2*vt2.c2,c1=c1+1,vt2.c2=10,c3=10 where c1>0 and vt2.c2<10 order by vt2.c1 asc,c2 desc limit 10,10
@ -93,7 +99,9 @@ update test set c7 = 3 where c1 = 0
UPDATE t1 SET c1=c1+(SELECT MAX(C1) FROM (SELECT 1) t) WHERE c1=(SELECT MAX(c1));
#更新索引列
update test set c4 = 1 where c1 =0
#更新rowkey列
update test set c1 = 1 where c1 = 0
## default and not null

View File

@ -169,6 +169,7 @@ insert into t1 values(1,2),(2,3),(3,4);
create view v as select c1,c2 from t1 order by c2;
drop table t1;
create table t1(c1 int);
#order by 即使是从select里找到了c2(select中的c2不报错是因为view_stmt),因为select里面的c2也是无效列,因此最终结果也是视图无效
--error 5231
select c1 from v;
@ -180,6 +181,7 @@ create view v as select c1, -1 as c2 from t1 order by (select c2);
select c1 from v;
drop table t1;
create table t1(c1 int);
# a select c2提升上来之后从t1基础列里面找不到就直接报错,不会再去select_items找
--error 5231
select c1 from v;
# b (bug)

View File

@ -1,19 +1,25 @@
# 1. opt assert failed: code_generator/ob_expr_generator_impl.cpp:119
# http://k3.alibaba-inc.com/issue/6354515?stat=1.5.12&toPage=1&versionId=1043693
select (select c1 from t1) as field from t1 GROUP BY field;
# http://k3.alibaba-inc.com/issue/6356302?versionId=1043693
select (select c3 from t1 where 1000 > c3) as 'x' from t3;
# 2. CG vistor invalid idx
# http://k3.alibaba-inc.com/issue/6323123?stat=1.5.6&toPage=1&versionId=1043693
select c1 as a FROM t1 GROUP BY (SELECT 1 FROM t1 HAVING a=1);
# http://k3.alibaba-inc.com/issue/6381107?stat=1.5.1&toPage=2&versionId=1043693
--error 5217
SELECT (SELECT 1) a, (select A)
# 3. resolver failed due to searching scope
# http://k3.alibaba-inc.com/issue/6337963?stat=1.5.10&toPage=1&versionId=1043693
SELECT c1 as a, c1 as b FROM t1 GROUP BY (SELECT a) ORDER BY (SELECT c2*1);
SELECT c1 as a, c2 as b FROM t2 GROUP BY (SELECT a) ORDER BY (SELECT c3);
--error 5217
select c1 as ca from t1 where (select (select ca)) > 1;
# http://k3.alibaba-inc.com/issue/6397456?stat=1.5.7&toPage=1&versionId=1043693
# works, expected error 1054
--error 5217
select c1, c1 DD, DD||'kaka' KK, KK || 'haha' from t1;
@ -21,6 +27,7 @@ select c1, c1 DD, DD||'kaka' KK, KK || 'haha' from t1;
select c1, c1 DD, concat(DD,'kaka') KK, concat(KK,'haha') from t1;
# 5. OPT all_expr_produced (ob_logical_operator.cpp:1372) [13112][Y8B7E0A7DE005-6C91B] failed to produce expression
# http://k3.alibaba-inc.com/issue/6323137?stat=1.5.5&toPage=1&versionId=1043693
--error 5217
SELECT 1 FROM (SELECT c1 FROM t1) b HAVING (SELECT b.c1)=1