Fix RCTE bugs

This commit is contained in:
xianyu-w
2023-08-11 03:48:48 +00:00
committed by ob-robot
parent 4a847be5a7
commit 02a2a424fa
22 changed files with 493 additions and 350 deletions

View File

@ -122,7 +122,7 @@ WITH t4 as (select 1 from dual) select * from t4;
##############################
## PART 2.1 定义列名重复
with cte(a,a) as (select 1,1 from dual) select * from cte;
ERROR HY000: duplicate name found in column alias list for WITH clause
ERROR 42S21: Duplicate column name 'a'
## PART 2.2.1 定义列数量与查询产生列一致或不一致
explain basic with cte(a,b) as (select 1,1 from dual) select * from cte;

View File

@ -6,13 +6,13 @@ with cte(a,b) as (select 1 from dual) select * from cte;
ERROR HY000: View's SELECT and view's field list have different column counts
with cte(a,b) as (with cte2(a,b) as (select 1,1 from dual) select a,b from cte) select * from cte;
ERROR 42S02: Table doesn't exist
ERROR 42S02: Table 'cte_st.cte' doesn't exist
with cte(a,a) as (select 1 from dual) select * from cte;
ERROR HY000: duplicate name found in column alias list for WITH clause
ERROR 42S21: Duplicate column name 'a'
with cte as (select 1,1 from dual union all select a+1,b+1 from cte where cte.a < 10) select * from cte;
ERROR 42S02: Table doesn't exist
ERROR 42S02: Table 'cte_st.cte' doesn't exist
# MySQL不支持search depth关键字
with cte(a,b,c) as
@ -33,7 +33,7 @@ select 1,2,3 from dual
union
select a+1,b+1,c+1 from cte, cte b where cte.c < 10 and b.c = cte.c
) select * from cte;
ERROR 42S02: Table doesn't exist
ERROR 42S02: Table 'cte_st.cte' doesn't exist
with cte(a,b,c) as
(
@ -43,10 +43,10 @@ select 1,2,3 from dual
union all
select a+1,b+1,c+1 from cte, cte b where cte.c < 10 and b.c = cte.c
) select * from cte;
ERROR 42S02: Table doesn't exist
ERROR 42S02: Table 'cte_st.cte' doesn't exist
with t1 as (select c1 from t1) select * from t1;
ERROR 42S02: Table doesn't exist
ERROR 42S02: Table 'cte_st.t1' doesn't exist
## success
with cte1(a,b) as (select 'a','b' from dual), cte2 as (select * from cte1 where b > 'c'), cte3 as (select * from cte2 where a > 1 union select * from cte2 where a > 1) select * from cte3;
@ -56,26 +56,26 @@ with cte1(a,b) as (select 'a','b' from dual), cte2 as (select * from cte1 where
+---+---+
with cte(a) as (select 1,1 from dual union all select a+1, a+1 from cte where a+1 < 10) select * from cte;
ERROR 42S02: Table doesn't exist
ERROR 42S02: Table 'cte_st.cte' doesn't exist
with cte(n) AS (select 1 from dual UNION ALL select n+1 from cte where n < 3 UNION ALL select 2 from dual) select * from cte;
ERROR 42S02: Table doesn't exist
ERROR 42S02: Table 'cte_st.cte' doesn't exist
with cte(n) AS ( select 1 from dual UNION ALL select sum(n+1) from cte) select * from cte;
ERROR 42S02: Table doesn't exist
ERROR 42S02: Table 'cte_st.cte' doesn't exist
with cte(n) AS ( select 1 from dual UNION ALL select (select 1 from dual) from cte where cte.n < 2) select * from cte;
ERROR 42S02: Table doesn't exist
ERROR 42S02: Table 'cte_st.cte' doesn't exist
create table t1(c1 int, c2 int, c3 int);
with cte (c1, c2, c3) as ( select * from ( select c1, c2, c3 from t1 union select c1, c2, c3 from t1) where c1 = 1 union all select * from t1 join cte c on t1.c1 = c.c1 where c.c1 < 10 ) select * from cte;
ERROR 42S02: Table doesn't exist
ERROR 42S02: Table 'cte_st.cte' doesn't exist
with cte(n) AS ( select 1 from cte) select * from cte;
ERROR 42S02: Table doesn't exist
ERROR 42S02: Table 'cte_st.cte' doesn't exist
with cte(n) AS (select 1 from dual UNION ALL select n+1 from cte where n < 3 order by n ) select * from cte;
ERROR 42S02: Table doesn't exist
ERROR 42S02: Table 'cte_st.cte' doesn't exist
with RECURSIVE cte(n) as (select 1 union all select (select n+1 from cte where n < 1) ) select n from cte;
ERROR HY000: In recursive query block of Recursive Common Table Expression, the recursive table must be referenced only once, and not in any subquery

View File

@ -215,16 +215,16 @@ CREATE TABLE numbers
)
SELECT * FROM my_cte;
SELECT * FROM numbers;
+---+
| n |
+---+
| 1 |
| 2 |
| 3 |
| 4 |
| 5 |
| 6 |
+---+
+------+
| n |
+------+
| 1 |
| 2 |
| 3 |
| 4 |
| 5 |
| 6 |
+------+
INSERT INTO numbers
WITH RECURSIVE my_cte(n) AS
@ -236,22 +236,22 @@ WITH RECURSIVE my_cte(n) AS
SELECT * FROM my_cte;
SELECT * FROM numbers;
+---+
| n |
+---+
| 1 |
| 2 |
| 3 |
| 4 |
| 5 |
| 6 |
| 1 |
| 2 |
| 3 |
| 4 |
| 5 |
| 6 |
+---+
+------+
| n |
+------+
| 1 |
| 2 |
| 3 |
| 4 |
| 5 |
| 6 |
| 1 |
| 2 |
| 3 |
| 4 |
| 5 |
| 6 |
+------+
DELETE FROM numbers
WHERE numbers.n >
@ -265,12 +265,12 @@ WHERE numbers.n >
SELECT AVG(n)/2 FROM my_cte
);
SELECT * FROM numbers;
+---+
| n |
+---+
| 1 |
| 1 |
+---+
+------+
| n |
+------+
| 1 |
| 1 |
+------+
################################################################################################
### PART 2 generating series

View File

@ -1028,11 +1028,11 @@ SELECT * FROM x;
with RECURSIVE x(n) AS (SELECT 1 from dual UNION ALL SELECT count(*) FROM x)
SELECT * FROM x;
ERROR HY000: Recursive Common Table Expression can contain neither aggregation nor window functions in recursive query block
ERROR HY000: ORDER BY / LIMIT / SELECT DISTINCT / HAVING / WINDOW FUNCTION / GROUP BY in recursive query block of Common Table Expression not supported
with RECURSIVE x(n) AS (SELECT 1 from dual UNION ALL SELECT sum(n) FROM x)
SELECT * FROM x;
ERROR HY000: Recursive Common Table Expression can contain neither aggregation nor window functions in recursive query block
ERROR HY000: ORDER BY / LIMIT / SELECT DISTINCT / HAVING / WINDOW FUNCTION / GROUP BY in recursive query block of Common Table Expression not supported
with RECURSIVE x(n) AS (SELECT 1 from dual UNION ALL SELECT n+1 FROM x where n < 10 ORDER BY 1 ) SELECT * FROM x;
+------+
@ -1105,7 +1105,7 @@ with RECURSIVE outermost(x) AS (
UNION SELECT * FROM innermost)
)
SELECT * FROM outermost ORDER BY 1;
ERROR HY000: UNION ALL operation in recursive WITH clause must have only two branches
ERROR HY000: More than one recursive query blocks of Common Table Expression not supported
with RECURSIVE outermost(x) AS (
SELECT 1 FROM DUAL

View File

@ -102,7 +102,7 @@ ERROR 42S02: Table 'cte_st.qn' doesn't exist
# recursive
with recursive qn AS (SELECT a FROM qn)
SELECT qn.a FROM qn;
ERROR HY000: recursive WITH clause must use a UNION ALL operation
ERROR HY000: Recursive Common Table Expression should contain a UNION ALL
with RECURSIVE qn1 AS (SELECT a FROM qn3),
qn2 AS (SELECT a FROM qn1),
@ -520,7 +520,7 @@ with RECURSIVE qn (foo, bar) as (select 1,1 from t1) select * from qn;
| 1 | 1 |
+-----+-----+
with RECURSIVE qn (foo, foo) as (select 1,2 from dual) select * from qn;
ERROR HY000: duplicate name found in column alias list for WITH clause
ERROR 42S21: Duplicate column name 'foo'
# Derived tables support this too
# Column names for QN/DT are printed
@ -1650,7 +1650,7 @@ with RECURSIVE t4(a) as (select 1 from dual union all select a+1 from t4 where a
| 9 |
+------+
with RECURSIVE cte(a,a) as (select 1,1 from dual union all select a+1, a+1 from cte where a+1 < 10) select * from cte;
ERROR HY000: duplicate name found in column alias list for WITH clause
ERROR 42S21: Duplicate column name 'a'
with RECURSIVE cte(a,b) as (select 1,1 from dual union all select a+1, a+1 from cte where a+1 < 10) select * from cte;
+------+------+
| a | b |
@ -1747,122 +1747,23 @@ with RECURSIVE cte(a) as (select 1 from dual union all select 2 from dual), cte_
| 2 |
+------+
with RECURSIVE cte(n) AS (select 1 from dual UNION ALL select n+1 from cte where n < 3 UNION ALL select 2 from dual) select * from cte;
ERROR HY000: UNION ALL operation in recursive WITH clause must have only two branches
ERROR HY000: More than one recursive query blocks of Common Table Expression not supported
with RECURSIVE cte(n) AS ( select 1 from cte) select * from cte;
ERROR HY000: recursive WITH clause must use a UNION ALL operation
ERROR HY000: Recursive Common Table Expression should contain a UNION ALL
set @@ob_query_timeout=1000000;
with RECURSIVE cte(n) AS ( select 1 from dual UNION ALL select sum(n+1) from cte) select * from cte;
ERROR HY000: Recursive Common Table Expression can contain neither aggregation nor window functions in recursive query block
ERROR HY000: ORDER BY / LIMIT / SELECT DISTINCT / HAVING / WINDOW FUNCTION / GROUP BY in recursive query block of Common Table Expression not supported
set @@ob_query_timeout=10000000;
with RECURSIVE cte(n) AS (select 1 from dual UNION ALL select n+1 from cte where n < 3 union all select n+1 from cte where n < 2) select * from cte;
ERROR HY000: UNION ALL operation in recursive WITH clause must have only two branches
ERROR HY000: More than one recursive query blocks of Common Table Expression not supported
with RECURSIVE cte(n) as (select 1 from dual union all select c1 from t1 union all (with RECURSIVE cte(n) as (select c1 from t1) select * from cte)) select * from cte;
ERROR HY000: cycle detected while executing recursive WITH query
with RECURSIVE cte(n) as (select '1' from dual union all select n+1 from cte where n < 100) select * from cte;
+------+
| n |
+------+
| 1 |
| 2 |
| 3 |
| 4 |
| 5 |
| 6 |
| 7 |
| 8 |
| 9 |
| 10 |
| 11 |
| 12 |
| 13 |
| 14 |
| 15 |
| 16 |
| 17 |
| 18 |
| 19 |
| 20 |
| 21 |
| 22 |
| 23 |
| 24 |
| 25 |
| 26 |
| 27 |
| 28 |
| 29 |
| 30 |
| 31 |
| 32 |
| 33 |
| 34 |
| 35 |
| 36 |
| 37 |
| 38 |
| 39 |
| 40 |
| 41 |
| 42 |
| 43 |
| 44 |
| 45 |
| 46 |
| 47 |
| 48 |
| 49 |
| 50 |
| 51 |
| 52 |
| 53 |
| 54 |
| 55 |
| 56 |
| 57 |
| 58 |
| 59 |
| 60 |
| 61 |
| 62 |
| 63 |
| 64 |
| 65 |
| 66 |
| 67 |
| 68 |
| 69 |
| 70 |
| 71 |
| 72 |
| 73 |
| 74 |
| 75 |
| 76 |
| 77 |
| 78 |
| 79 |
| 80 |
| 81 |
| 82 |
| 83 |
| 84 |
| 85 |
| 86 |
| 87 |
| 88 |
| 89 |
| 90 |
| 91 |
| 92 |
| 93 |
| 94 |
| 95 |
| 96 |
| 97 |
| 98 |
| 99 |
| 100 |
| 1 |
+------+
with RECURSIVE cte(n) as (select '1' from dual union all select n+1 from cte where n < 100) select * from cte;
ERROR 22001: Data too long for column
with RECURSIVE cte(n) as (select n from (select 1 from dual union all select n+1 from cte) tmp) select * from cte;
ERROR HY000: In recursive query block of Recursive Common Table Expression, the recursive table must be referenced only once, and not in any subquery

View File

@ -160,13 +160,14 @@ Outputs & filters:
access([e.JOB], [e.ENAME], [e.MGR], [e.EMPno]), partitions(p0)
is_index_back=false, is_global_index=false, filter_before_indexback[false],
range_key([e.__pk_increment]), range(MIN ; MAX)always true
3 - output([e.ENAME], [e.MGR], [e.EMPno]), filter(nil), rowset=256
3 - output([column_conv(VARCHAR,utf8mb4_general_ci,length:30,NULL,e.ENAME)], [column_conv(DECIMAL,PS:(4,0),NULL,e.MGR)], [column_conv(DECIMAL,PS:(10,0),
NULL,e.EMPno)]), filter(nil), rowset=256
conds([r.empno = e.MGR]), nl_params_(nil), use_batch=false
4 - output([r.empno]), filter(nil), rowset=256
access([r.empno])
is_index_back=false, is_global_index=false,
range_key(nil), range(MIN ; MAX)
5 - output([e.ENAME], [e.MGR], [e.EMPno]), filter(nil), rowset=256
5 - output([e.MGR], [e.ENAME], [e.EMPno]), filter(nil), rowset=256
6 - output([e.MGR], [e.ENAME], [e.EMPno]), filter(nil), rowset=256
access([e.MGR], [e.ENAME], [e.EMPno]), partitions(p0)
is_index_back=false, is_global_index=false,
@ -243,11 +244,12 @@ Outputs & filters:
access([e.JOB], [e.ENAME], [e.MGR], [e.EMPno]), partitions(p0)
is_index_back=false, is_global_index=false, filter_before_indexback[false],
range_key([e.__pk_increment]), range(MIN ; MAX)always true
3 - output([e.ENAME], [e.MGR], [e.EMPno]), filter(nil), rowset=256
3 - output([column_conv(VARCHAR,utf8mb4_general_ci,length:30,NULL,e.ENAME)], [column_conv(DECIMAL,PS:(4,0),NULL,e.MGR)], [column_conv(DECIMAL,PS:(10,0),
NULL,e.EMPno)]), filter(nil), rowset=256
equal_conds([r.empno = e.MGR]), other_conds(nil)
merge_directions([ASC])
4 - output([e.ENAME], [e.MGR], [e.EMPno]), filter(nil), rowset=256
5 - output([e.ENAME], [e.MGR], [e.EMPno]), filter(nil), rowset=256
4 - output([e.MGR], [e.ENAME], [e.EMPno]), filter(nil), rowset=256
5 - output([e.MGR], [e.ENAME], [e.EMPno]), filter(nil), rowset=256
sort_keys([e.MGR, ASC])
6 - output([e.MGR], [e.ENAME], [e.EMPno]), filter(nil), rowset=256
access([e.MGR], [e.ENAME], [e.EMPno]), partitions(p0)
@ -328,7 +330,8 @@ Outputs & filters:
access([e.JOB], [e.ENAME], [e.MGR], [e.EMPno]), partitions(p0)
is_index_back=false, is_global_index=false, filter_before_indexback[false],
range_key([e.__pk_increment]), range(MIN ; MAX)always true
3 - output([e.ENAME], [e.MGR], [e.EMPno]), filter(nil), rowset=256
3 - output([column_conv(VARCHAR,utf8mb4_general_ci,length:30,NULL,e.ENAME)], [column_conv(DECIMAL,PS:(4,0),NULL,e.MGR)], [column_conv(DECIMAL,PS:(10,0),
NULL,e.EMPno)]), filter(nil), rowset=256
equal_conds([r.empno = e.MGR]), other_conds(nil)
4 - output([e.MGR], [e.ENAME], [e.EMPno]), filter(nil), rowset=256
access([e.MGR], [e.ENAME], [e.EMPno]), partitions(p0)
@ -421,10 +424,11 @@ Outputs & filters:
access([d.SAL]), partitions(p0)
is_index_back=false, is_global_index=false,
range_key([d.__pk_increment]), range(MIN ; MAX)always true
6 - output([e.ENAME], [e.MGR], [e.EMPno]), filter(nil), rowset=256
6 - output([column_conv(VARCHAR,utf8mb4_general_ci,length:30,NULL,e.ENAME)], [column_conv(DECIMAL,PS:(4,0),NULL,e.MGR)], [column_conv(DECIMAL,PS:(10,0),
NULL,e.EMPno)]), filter(nil), rowset=256
equal_conds([r.empno = e.MGR]), other_conds(nil)
7 - output([e.ENAME], [e.MGR], [e.EMPno]), filter(nil), rowset=256
8 - output([e.ENAME], [e.MGR], [e.EMPno]), filter(nil), rowset=256
7 - output([e.MGR], [e.ENAME], [e.EMPno]), filter(nil), rowset=256
8 - output([e.MGR], [e.ENAME], [e.EMPno]), filter(nil), rowset=256
equal_conds([e.SAL = d.SAL]), other_conds(nil)
9 - output([d.SAL]), filter(nil), rowset=256
access([d.SAL]), partitions(p0)
@ -552,7 +556,8 @@ Outputs & filters:
access([e.JOB], [e.ENAME], [e.MGR], [e.EMPno]), partitions(p0)
is_index_back=false, is_global_index=false, filter_before_indexback[false],
range_key([e.__pk_increment]), range(MIN ; MAX)always true
3 - output([e.ENAME], [e.MGR], [e.EMPno]), filter(nil), rowset=256
3 - output([column_conv(VARCHAR,utf8mb4_general_ci,length:30,NULL,e.ENAME)], [column_conv(DECIMAL,PS:(4,0),NULL,e.MGR)], [column_conv(DECIMAL,PS:(10,0),
NULL,e.EMPno)]), filter(nil), rowset=256
equal_conds([e.MGR = r.empno]), other_conds(nil)
4 - output([e.MGR], [e.ENAME], [e.EMPno]), filter(nil), rowset=256
access([e.MGR], [e.ENAME], [e.EMPno]), partitions(p0)
@ -632,7 +637,8 @@ Outputs & filters:
access([e.JOB], [e.ENAME], [e.MGR], [e.EMPno]), partitions(p0)
is_index_back=false, is_global_index=false, filter_before_indexback[false],
range_key([e.__pk_increment]), range(MIN ; MAX)always true
3 - output([e.ENAME], [e.MGR], [e.EMPno]), filter(nil), rowset=256
3 - output([column_conv(VARCHAR,utf8mb4_general_ci,length:30,NULL,e.ENAME)], [column_conv(DECIMAL,PS:(4,0),NULL,e.MGR)], [column_conv(DECIMAL,PS:(10,0),
NULL,e.EMPno)]), filter(nil), rowset=256
equal_conds([r.empno = e.MGR]), other_conds(nil)
4 - output([e.MGR], [e.ENAME], [e.EMPno]), filter(nil), rowset=256
access([e.MGR], [e.ENAME], [e.EMPno]), partitions(p0)
@ -735,9 +741,10 @@ Outputs & filters:
access([n2.empno]), partitions(p0)
is_index_back=false, is_global_index=false,
range_key([n2.__pk_increment]), range(MIN ; MAX)always true
8 - output([r.empno], [e.MGR], [r.iters + 1], [r.sal + e.SAL]), filter(nil), rowset=256
8 - output([column_conv(DECIMAL,PS:(10,0),NULL,r.empno)], [column_conv(DECIMAL,PS:(4,0),NULL,e.MGR)], [column_conv(BIGINT,PS:(1,0),NULL,r.iters + 1)],
[column_conv(DECIMAL,PS:(7,2),NULL,r.sal + e.SAL)]), filter(nil), rowset=256
equal_conds([e.MGR = cast(n.empno, DECIMAL(-1, -1))]), other_conds(nil)
9 - output([r.empno], [e.MGR], [r.iters], [r.sal], [e.SAL]), filter(nil), rowset=256
9 - output([e.MGR], [r.empno], [r.iters], [r.sal], [e.SAL]), filter(nil), rowset=256
equal_conds([r.mgr = e.EMPno]), other_conds(nil)
10 - output([r.mgr], [r.empno], [r.iters], [r.sal]), filter(nil), rowset=256
access([r.mgr], [r.empno], [r.iters], [r.sal])
@ -840,9 +847,10 @@ Outputs & filters:
access([n2.empno]), partitions(p0)
is_index_back=false, is_global_index=false,
range_key([n2.__pk_increment]), range(MIN ; MAX)always true
8 - output([r.empno], [e.MGR], [r.iters + 1], [r.sal + e.SAL]), filter(nil), rowset=256
8 - output([column_conv(DECIMAL,PS:(10,0),NULL,r.empno)], [column_conv(DECIMAL,PS:(4,0),NULL,e.MGR)], [column_conv(BIGINT,PS:(1,0),NULL,r.iters + 1)],
[column_conv(DECIMAL,PS:(7,2),NULL,r.sal + e.SAL)]), filter(nil), rowset=256
equal_conds([e.MGR = cast(n.empno, DECIMAL(-1, -1))]), other_conds(nil)
9 - output([r.empno], [e.MGR], [e.SAL], [r.iters], [r.sal]), filter(nil), rowset=256
9 - output([e.MGR], [e.SAL], [r.empno], [r.iters], [r.sal]), filter(nil), rowset=256
equal_conds([e.EMPno = r.mgr]), other_conds(nil)
10 - output([e.EMPno], [e.MGR], [e.SAL]), filter([e.EMPno < e.MGR]), rowset=256
access([e.EMPno], [e.MGR], [e.SAL]), partitions(p0)
@ -946,7 +954,8 @@ Outputs & filters:
access([n2.empno]), partitions(p0)
is_index_back=false, is_global_index=false,
range_key([n2.__pk_increment]), range(MIN ; MAX)always true
8 - output([r.empno], [e.MGR], [r.iters + 1], [r.sal + e.SAL]), filter(nil), rowset=256
8 - output([column_conv(DECIMAL,PS:(10,0),NULL,r.empno)], [column_conv(DECIMAL,PS:(4,0),NULL,e.MGR)], [column_conv(BIGINT,PS:(1,0),NULL,r.iters + 1)],
[column_conv(DECIMAL,PS:(7,2),NULL,r.sal + e.SAL)]), filter(nil), rowset=256
equal_conds([e.EMPno = r.mgr]), other_conds(nil)
9 - output([e.MGR], [e.EMPno], [e.SAL]), filter(nil), rowset=256
10 - output([e.MGR], [e.EMPno], [e.SAL]), filter(nil), rowset=256
@ -1053,7 +1062,8 @@ Outputs & filters:
access([n2.empno]), partitions(p0)
is_index_back=false, is_global_index=false,
range_key([n2.__pk_increment]), range(MIN ; MAX)always true
8 - output([r.empno], [e.MGR], [r.iters + 1], [r.sal + e.SAL]), filter(nil), rowset=256
8 - output([column_conv(DECIMAL,PS:(10,0),NULL,r.empno)], [column_conv(DECIMAL,PS:(4,0),NULL,e.MGR)], [column_conv(BIGINT,PS:(1,0),NULL,r.iters + 1)],
[column_conv(DECIMAL,PS:(7,2),NULL,r.sal + e.SAL)]), filter(nil), rowset=256
equal_conds([e.EMPno = r.mgr]), other_conds(nil)
9 - output([e.MGR], [e.EMPno], [e.SAL]), filter(nil), rowset=256
10 - output([e.MGR], [e.EMPno], [e.SAL]), filter(nil), rowset=256
@ -1137,7 +1147,8 @@ Outputs & filters:
access([e.JOB], [e.ENAME], [e.MGR], [e.EMPno]), partitions(p0)
is_index_back=false, is_global_index=false, filter_before_indexback[false],
range_key([e.__pk_increment]), range(MIN ; MAX)always true
3 - output([e.ENAME], [e.MGR], [e.EMPno]), filter(nil), rowset=256
3 - output([column_conv(VARCHAR,utf8mb4_general_ci,length:30,NULL,e.ENAME)], [column_conv(DECIMAL,PS:(4,0),NULL,e.MGR)], [column_conv(DECIMAL,PS:(10,0),
NULL,e.EMPno)]), filter(nil), rowset=256
equal_conds([r.empno = e.MGR]), other_conds(nil)
4 - output([r.empno]), filter(nil), rowset=256
access([r.empno])
@ -1217,7 +1228,8 @@ Outputs & filters:
access([e.JOB], [e.ENAME], [e.MGR], [e.EMPno]), partitions(p0)
is_index_back=false, is_global_index=false, filter_before_indexback[false],
range_key([e.__pk_increment]), range(MIN ; MAX)always true
3 - output([e.ENAME], [e.MGR], [e.EMPno]), filter(nil), rowset=256
3 - output([column_conv(VARCHAR,utf8mb4_general_ci,length:30,NULL,e.ENAME)], [column_conv(DECIMAL,PS:(4,0),NULL,e.MGR)], [column_conv(DECIMAL,PS:(10,0),
NULL,e.EMPno)]), filter(nil), rowset=256
equal_conds([e.MGR = r.empno]), other_conds(nil)
4 - output([e.MGR], [e.ENAME], [e.EMPno]), filter(nil), rowset=256
access([e.MGR], [e.ENAME], [e.EMPno]), partitions(p0)
@ -1320,9 +1332,10 @@ Outputs & filters:
access([n2.empno]), partitions(p0)
is_index_back=false, is_global_index=false,
range_key([n2.__pk_increment]), range(MIN ; MAX)always true
8 - output([r.empno], [e.MGR], [r.iters + 1], [r.sal + e.SAL]), filter(nil), rowset=256
8 - output([column_conv(DECIMAL,PS:(10,0),NULL,r.empno)], [column_conv(DECIMAL,PS:(4,0),NULL,e.MGR)], [column_conv(BIGINT,PS:(1,0),NULL,r.iters + 1)],
[column_conv(DECIMAL,PS:(7,2),NULL,r.sal + e.SAL)]), filter(nil), rowset=256
equal_conds([cast(n.empno, DECIMAL(-1, -1)) = e.MGR], [r.mgr = e.EMPno]), other_conds(nil)
9 - output([r.empno], [r.mgr], [r.iters], [r.sal], [n.empno]), filter(nil), rowset=256
9 - output([r.mgr], [r.empno], [r.iters], [r.sal], [n.empno]), filter(nil), rowset=256
conds(nil), nl_params_(nil), use_batch=false
10 - output([r.mgr], [r.empno], [r.iters], [r.sal]), filter(nil), rowset=256
access([r.mgr], [r.empno], [r.iters], [r.sal])
@ -1427,9 +1440,10 @@ Outputs & filters:
access([n2.empno]), partitions(p0)
is_index_back=false, is_global_index=false,
range_key([n2.__pk_increment]), range(MIN ; MAX)always true
8 - output([r.empno], [e.MGR], [r.iters + 1], [r.sal + e.SAL]), filter(nil), rowset=256
8 - output([column_conv(DECIMAL,PS:(10,0),NULL,r.empno)], [column_conv(DECIMAL,PS:(4,0),NULL,e.MGR)], [column_conv(BIGINT,PS:(1,0),NULL,r.iters + 1)],
[column_conv(DECIMAL,PS:(7,2),NULL,r.sal + e.SAL)]), filter(nil), rowset=256
equal_conds([r.mgr = e.EMPno], [cast(n.empno, DECIMAL(-1, -1)) = e.MGR]), other_conds(nil)
9 - output([r.empno], [r.mgr], [r.iters], [r.sal], [n.empno]), filter(nil), rowset=256
9 - output([r.mgr], [r.empno], [r.iters], [r.sal], [n.empno]), filter(nil), rowset=256
conds(nil), nl_params_(nil), use_batch=false
10 - output([r.mgr], [r.empno], [r.iters], [r.sal]), filter(nil), rowset=256
access([r.mgr], [r.empno], [r.iters], [r.sal])
@ -1510,7 +1524,8 @@ Outputs & filters:
access([e.JOB], [e.ENAME], [e.MGR], [e.EMPno]), partitions(p0)
is_index_back=false, is_global_index=false, filter_before_indexback[false],
range_key([e.__pk_increment]), range(MIN ; MAX)always true
3 - output([e.ENAME], [e.MGR], [e.EMPno]), filter(nil), rowset=256
3 - output([column_conv(VARCHAR,utf8mb4_general_ci,length:30,NULL,e.ENAME)], [column_conv(DECIMAL,PS:(4,0),NULL,e.MGR)], [column_conv(DECIMAL,PS:(10,0),
NULL,e.EMPno)]), filter(nil), rowset=256
equal_conds([r.empno = e.MGR]), other_conds(nil)
4 - output([e.MGR], [e.ENAME], [e.EMPno]), filter(nil), rowset=256
access([e.MGR], [e.ENAME], [e.EMPno]), partitions(p0)
@ -1589,7 +1604,8 @@ Outputs & filters:
access([e.JOB], [e.ENAME], [e.MGR], [e.EMPno]), partitions(p0)
is_index_back=false, is_global_index=false, filter_before_indexback[false],
range_key([e.__pk_increment]), range(MIN ; MAX)always true
3 - output([e.ENAME], [e.MGR], [e.EMPno]), filter(nil), rowset=256
3 - output([column_conv(VARCHAR,utf8mb4_general_ci,length:30,NULL,e.ENAME)], [column_conv(DECIMAL,PS:(4,0),NULL,e.MGR)], [column_conv(DECIMAL,PS:(10,0),
NULL,e.EMPno)]), filter(nil), rowset=256
equal_conds([r.empno = e.MGR]), other_conds(nil)
4 - output([e.MGR], [e.EMPno], [e.ENAME]), filter([e.EMPno < e.MGR]), rowset=256
access([e.MGR], [e.EMPno], [e.ENAME]), partitions(p0)
@ -1697,13 +1713,14 @@ Outputs & filters:
access([e.JOB], [e.ENAME], [e.MGR], [e.EMPno]), partitions(p0)
is_index_back=false, is_global_index=false, filter_before_indexback[false],
range_key([e.__pk_increment]), range(MIN ; MAX)always true
3 - output([e.ENAME], [e.MGR], [e.EMPno]), filter(nil), rowset=256
3 - output([column_conv(VARCHAR,utf8mb4_general_ci,length:30,NULL,e.ENAME)], [column_conv(DECIMAL,PS:(4,0),NULL,e.MGR)], [column_conv(DECIMAL,PS:(10,0),
NULL,e.EMPno)]), filter(nil), rowset=256
conds([r.empno = e.MGR]), nl_params_(nil), use_batch=false
4 - output([r.empno]), filter(nil), rowset=256
access([r.empno])
is_index_back=false, is_global_index=false,
range_key(nil), range(MIN ; MAX)
5 - output([e.ENAME], [e.MGR], [e.EMPno]), filter(nil), rowset=256
5 - output([e.MGR], [e.ENAME], [e.EMPno]), filter(nil), rowset=256
6 - output([e.MGR], [e.ENAME], [e.EMPno]), filter(nil), rowset=256
access([e.MGR], [e.ENAME], [e.EMPno]), partitions(p0)
is_index_back=false, is_global_index=false,
@ -1780,11 +1797,12 @@ Outputs & filters:
access([e.JOB], [e.ENAME], [e.MGR], [e.EMPno]), partitions(p0)
is_index_back=false, is_global_index=false, filter_before_indexback[false],
range_key([e.__pk_increment]), range(MIN ; MAX)always true
3 - output([e.ENAME], [e.MGR], [e.EMPno]), filter(nil), rowset=256
3 - output([column_conv(VARCHAR,utf8mb4_general_ci,length:30,NULL,e.ENAME)], [column_conv(DECIMAL,PS:(4,0),NULL,e.MGR)], [column_conv(DECIMAL,PS:(10,0),
NULL,e.EMPno)]), filter(nil), rowset=256
equal_conds([r.empno = e.MGR]), other_conds(nil)
merge_directions([ASC])
4 - output([e.ENAME], [e.MGR], [e.EMPno]), filter(nil), rowset=256
5 - output([e.ENAME], [e.MGR], [e.EMPno]), filter(nil), rowset=256
4 - output([e.MGR], [e.ENAME], [e.EMPno]), filter(nil), rowset=256
5 - output([e.MGR], [e.ENAME], [e.EMPno]), filter(nil), rowset=256
sort_keys([e.MGR, ASC])
6 - output([e.MGR], [e.ENAME], [e.EMPno]), filter(nil), rowset=256
access([e.MGR], [e.ENAME], [e.EMPno]), partitions(p0)
@ -1865,7 +1883,8 @@ Outputs & filters:
access([e.JOB], [e.ENAME], [e.MGR], [e.EMPno]), partitions(p0)
is_index_back=false, is_global_index=false, filter_before_indexback[false],
range_key([e.__pk_increment]), range(MIN ; MAX)always true
3 - output([e.ENAME], [e.MGR], [e.EMPno]), filter(nil), rowset=256
3 - output([column_conv(VARCHAR,utf8mb4_general_ci,length:30,NULL,e.ENAME)], [column_conv(DECIMAL,PS:(4,0),NULL,e.MGR)], [column_conv(DECIMAL,PS:(10,0),
NULL,e.EMPno)]), filter(nil), rowset=256
equal_conds([r.empno = e.MGR]), other_conds(nil)
4 - output([e.MGR], [e.ENAME], [e.EMPno]), filter(nil), rowset=256
access([e.MGR], [e.ENAME], [e.EMPno]), partitions(p0)
@ -1958,10 +1977,11 @@ Outputs & filters:
access([d.SAL]), partitions(p0)
is_index_back=false, is_global_index=false,
range_key([d.__pk_increment]), range(MIN ; MAX)always true
6 - output([e.ENAME], [e.MGR], [e.EMPno]), filter(nil), rowset=256
6 - output([column_conv(VARCHAR,utf8mb4_general_ci,length:30,NULL,e.ENAME)], [column_conv(DECIMAL,PS:(4,0),NULL,e.MGR)], [column_conv(DECIMAL,PS:(10,0),
NULL,e.EMPno)]), filter(nil), rowset=256
equal_conds([r.empno = e.MGR]), other_conds(nil)
7 - output([e.ENAME], [e.MGR], [e.EMPno]), filter(nil), rowset=256
8 - output([e.ENAME], [e.MGR], [e.EMPno]), filter(nil), rowset=256
7 - output([e.MGR], [e.ENAME], [e.EMPno]), filter(nil), rowset=256
8 - output([e.MGR], [e.ENAME], [e.EMPno]), filter(nil), rowset=256
equal_conds([e.SAL = d.SAL]), other_conds(nil)
9 - output([d.SAL]), filter(nil), rowset=256
access([d.SAL]), partitions(p0)
@ -2089,7 +2109,8 @@ Outputs & filters:
access([e.JOB], [e.ENAME], [e.MGR], [e.EMPno]), partitions(p0)
is_index_back=false, is_global_index=false, filter_before_indexback[false],
range_key([e.__pk_increment]), range(MIN ; MAX)always true
3 - output([e.ENAME], [e.MGR], [e.EMPno]), filter(nil), rowset=256
3 - output([column_conv(VARCHAR,utf8mb4_general_ci,length:30,NULL,e.ENAME)], [column_conv(DECIMAL,PS:(4,0),NULL,e.MGR)], [column_conv(DECIMAL,PS:(10,0),
NULL,e.EMPno)]), filter(nil), rowset=256
equal_conds([e.MGR = r.empno]), other_conds(nil)
4 - output([e.MGR], [e.ENAME], [e.EMPno]), filter(nil), rowset=256
access([e.MGR], [e.ENAME], [e.EMPno]), partitions(p0)
@ -2169,7 +2190,8 @@ Outputs & filters:
access([e.JOB], [e.ENAME], [e.MGR], [e.EMPno]), partitions(p0)
is_index_back=false, is_global_index=false, filter_before_indexback[false],
range_key([e.__pk_increment]), range(MIN ; MAX)always true
3 - output([e.ENAME], [e.MGR], [e.EMPno]), filter(nil), rowset=256
3 - output([column_conv(VARCHAR,utf8mb4_general_ci,length:30,NULL,e.ENAME)], [column_conv(DECIMAL,PS:(4,0),NULL,e.MGR)], [column_conv(DECIMAL,PS:(10,0),
NULL,e.EMPno)]), filter(nil), rowset=256
equal_conds([r.empno = e.MGR]), other_conds(nil)
4 - output([e.MGR], [e.ENAME], [e.EMPno]), filter(nil), rowset=256
access([e.MGR], [e.ENAME], [e.EMPno]), partitions(p0)
@ -2272,9 +2294,10 @@ Outputs & filters:
access([n2.empno]), partitions(p0)
is_index_back=false, is_global_index=false,
range_key([n2.__pk_increment]), range(MIN ; MAX)always true
8 - output([r.empno], [e.MGR], [r.iters + 1], [r.sal + e.SAL]), filter(nil), rowset=256
8 - output([column_conv(DECIMAL,PS:(10,0),NULL,r.empno)], [column_conv(DECIMAL,PS:(4,0),NULL,e.MGR)], [column_conv(BIGINT,PS:(1,0),NULL,r.iters + 1)],
[column_conv(DECIMAL,PS:(7,2),NULL,r.sal + e.SAL)]), filter(nil), rowset=256
equal_conds([e.MGR = cast(n.empno, DECIMAL(-1, -1))]), other_conds(nil)
9 - output([r.empno], [e.MGR], [r.iters], [r.sal], [e.SAL]), filter(nil), rowset=256
9 - output([e.MGR], [r.empno], [r.iters], [r.sal], [e.SAL]), filter(nil), rowset=256
equal_conds([r.mgr = e.EMPno]), other_conds(nil)
10 - output([r.mgr], [r.empno], [r.iters], [r.sal]), filter(nil), rowset=256
access([r.mgr], [r.empno], [r.iters], [r.sal])
@ -2377,9 +2400,10 @@ Outputs & filters:
access([n2.empno]), partitions(p0)
is_index_back=false, is_global_index=false,
range_key([n2.__pk_increment]), range(MIN ; MAX)always true
8 - output([r.empno], [e.MGR], [r.iters + 1], [r.sal + e.SAL]), filter(nil), rowset=256
8 - output([column_conv(DECIMAL,PS:(10,0),NULL,r.empno)], [column_conv(DECIMAL,PS:(4,0),NULL,e.MGR)], [column_conv(BIGINT,PS:(1,0),NULL,r.iters + 1)],
[column_conv(DECIMAL,PS:(7,2),NULL,r.sal + e.SAL)]), filter(nil), rowset=256
equal_conds([e.MGR = cast(n.empno, DECIMAL(-1, -1))]), other_conds(nil)
9 - output([r.empno], [e.MGR], [e.SAL], [r.iters], [r.sal]), filter(nil), rowset=256
9 - output([e.MGR], [e.SAL], [r.empno], [r.iters], [r.sal]), filter(nil), rowset=256
equal_conds([e.EMPno = r.mgr]), other_conds(nil)
10 - output([e.EMPno], [e.MGR], [e.SAL]), filter([e.EMPno < e.MGR]), rowset=256
access([e.EMPno], [e.MGR], [e.SAL]), partitions(p0)
@ -2483,7 +2507,8 @@ Outputs & filters:
access([n2.empno]), partitions(p0)
is_index_back=false, is_global_index=false,
range_key([n2.__pk_increment]), range(MIN ; MAX)always true
8 - output([r.empno], [e.MGR], [r.iters + 1], [r.sal + e.SAL]), filter(nil), rowset=256
8 - output([column_conv(DECIMAL,PS:(10,0),NULL,r.empno)], [column_conv(DECIMAL,PS:(4,0),NULL,e.MGR)], [column_conv(BIGINT,PS:(1,0),NULL,r.iters + 1)],
[column_conv(DECIMAL,PS:(7,2),NULL,r.sal + e.SAL)]), filter(nil), rowset=256
equal_conds([e.EMPno = r.mgr]), other_conds(nil)
9 - output([e.MGR], [e.EMPno], [e.SAL]), filter(nil), rowset=256
10 - output([e.MGR], [e.EMPno], [e.SAL]), filter(nil), rowset=256
@ -2590,7 +2615,8 @@ Outputs & filters:
access([n2.empno]), partitions(p0)
is_index_back=false, is_global_index=false,
range_key([n2.__pk_increment]), range(MIN ; MAX)always true
8 - output([r.empno], [e.MGR], [r.iters + 1], [r.sal + e.SAL]), filter(nil), rowset=256
8 - output([column_conv(DECIMAL,PS:(10,0),NULL,r.empno)], [column_conv(DECIMAL,PS:(4,0),NULL,e.MGR)], [column_conv(BIGINT,PS:(1,0),NULL,r.iters + 1)],
[column_conv(DECIMAL,PS:(7,2),NULL,r.sal + e.SAL)]), filter(nil), rowset=256
equal_conds([e.EMPno = r.mgr]), other_conds(nil)
9 - output([e.MGR], [e.EMPno], [e.SAL]), filter(nil), rowset=256
10 - output([e.MGR], [e.EMPno], [e.SAL]), filter(nil), rowset=256
@ -2675,7 +2701,8 @@ Outputs & filters:
access([e.JOB], [e.ENAME], [e.MGR], [e.EMPno]), partitions(p0)
is_index_back=false, is_global_index=false, filter_before_indexback[false],
range_key([e.__pk_increment]), range(MIN ; MAX)always true
3 - output([e.ENAME], [e.MGR], [e.EMPno]), filter(nil), rowset=256
3 - output([column_conv(VARCHAR,utf8mb4_general_ci,length:30,NULL,e.ENAME)], [column_conv(DECIMAL,PS:(4,0),NULL,e.MGR)], [column_conv(DECIMAL,PS:(10,0),
NULL,e.EMPno)]), filter(nil), rowset=256
equal_conds([r.empno = e.MGR]), other_conds(nil)
4 - output([r.empno]), filter(nil), rowset=256
access([r.empno])
@ -2755,7 +2782,8 @@ Outputs & filters:
access([e.JOB], [e.ENAME], [e.MGR], [e.EMPno]), partitions(p0)
is_index_back=false, is_global_index=false, filter_before_indexback[false],
range_key([e.__pk_increment]), range(MIN ; MAX)always true
3 - output([e.ENAME], [e.MGR], [e.EMPno]), filter(nil), rowset=256
3 - output([column_conv(VARCHAR,utf8mb4_general_ci,length:30,NULL,e.ENAME)], [column_conv(DECIMAL,PS:(4,0),NULL,e.MGR)], [column_conv(DECIMAL,PS:(10,0),
NULL,e.EMPno)]), filter(nil), rowset=256
equal_conds([e.MGR = r.empno]), other_conds(nil)
4 - output([e.MGR], [e.ENAME], [e.EMPno]), filter(nil), rowset=256
access([e.MGR], [e.ENAME], [e.EMPno]), partitions(p0)
@ -2858,9 +2886,10 @@ Outputs & filters:
access([n2.empno]), partitions(p0)
is_index_back=false, is_global_index=false,
range_key([n2.__pk_increment]), range(MIN ; MAX)always true
8 - output([r.empno], [e.MGR], [r.iters + 1], [r.sal + e.SAL]), filter(nil), rowset=256
8 - output([column_conv(DECIMAL,PS:(10,0),NULL,r.empno)], [column_conv(DECIMAL,PS:(4,0),NULL,e.MGR)], [column_conv(BIGINT,PS:(1,0),NULL,r.iters + 1)],
[column_conv(DECIMAL,PS:(7,2),NULL,r.sal + e.SAL)]), filter(nil), rowset=256
equal_conds([cast(n.empno, DECIMAL(-1, -1)) = e.MGR], [r.mgr = e.EMPno]), other_conds(nil)
9 - output([r.empno], [r.mgr], [r.iters], [r.sal], [n.empno]), filter(nil), rowset=256
9 - output([r.mgr], [r.empno], [r.iters], [r.sal], [n.empno]), filter(nil), rowset=256
conds(nil), nl_params_(nil), use_batch=false
10 - output([r.mgr], [r.empno], [r.iters], [r.sal]), filter(nil), rowset=256
access([r.mgr], [r.empno], [r.iters], [r.sal])
@ -2965,9 +2994,10 @@ Outputs & filters:
access([n2.empno]), partitions(p0)
is_index_back=false, is_global_index=false,
range_key([n2.__pk_increment]), range(MIN ; MAX)always true
8 - output([r.empno], [e.MGR], [r.iters + 1], [r.sal + e.SAL]), filter(nil), rowset=256
8 - output([column_conv(DECIMAL,PS:(10,0),NULL,r.empno)], [column_conv(DECIMAL,PS:(4,0),NULL,e.MGR)], [column_conv(BIGINT,PS:(1,0),NULL,r.iters + 1)],
[column_conv(DECIMAL,PS:(7,2),NULL,r.sal + e.SAL)]), filter(nil), rowset=256
equal_conds([r.mgr = e.EMPno], [cast(n.empno, DECIMAL(-1, -1)) = e.MGR]), other_conds(nil)
9 - output([r.empno], [r.mgr], [r.iters], [r.sal], [n.empno]), filter(nil), rowset=256
9 - output([r.mgr], [r.empno], [r.iters], [r.sal], [n.empno]), filter(nil), rowset=256
conds(nil), nl_params_(nil), use_batch=false
10 - output([r.mgr], [r.empno], [r.iters], [r.sal]), filter(nil), rowset=256
access([r.mgr], [r.empno], [r.iters], [r.sal])
@ -3048,7 +3078,8 @@ Outputs & filters:
access([e.JOB], [e.ENAME], [e.MGR], [e.EMPno]), partitions(p0)
is_index_back=false, is_global_index=false, filter_before_indexback[false],
range_key([e.__pk_increment]), range(MIN ; MAX)always true
3 - output([e.ENAME], [e.MGR], [e.EMPno]), filter(nil), rowset=256
3 - output([column_conv(VARCHAR,utf8mb4_general_ci,length:30,NULL,e.ENAME)], [column_conv(DECIMAL,PS:(4,0),NULL,e.MGR)], [column_conv(DECIMAL,PS:(10,0),
NULL,e.EMPno)]), filter(nil), rowset=256
equal_conds([r.empno = e.MGR]), other_conds(nil)
4 - output([e.MGR], [e.ENAME], [e.EMPno]), filter(nil), rowset=256
access([e.MGR], [e.ENAME], [e.EMPno]), partitions(p0)
@ -3127,7 +3158,8 @@ Outputs & filters:
access([e.JOB], [e.ENAME], [e.MGR], [e.EMPno]), partitions(p0)
is_index_back=false, is_global_index=false, filter_before_indexback[false],
range_key([e.__pk_increment]), range(MIN ; MAX)always true
3 - output([e.ENAME], [e.MGR], [e.EMPno]), filter(nil), rowset=256
3 - output([column_conv(VARCHAR,utf8mb4_general_ci,length:30,NULL,e.ENAME)], [column_conv(DECIMAL,PS:(4,0),NULL,e.MGR)], [column_conv(DECIMAL,PS:(10,0),
NULL,e.EMPno)]), filter(nil), rowset=256
equal_conds([r.empno = e.MGR]), other_conds(nil)
4 - output([e.MGR], [e.EMPno], [e.ENAME]), filter([e.EMPno < e.MGR]), rowset=256
access([e.MGR], [e.EMPno], [e.ENAME]), partitions(p0)
@ -3235,13 +3267,14 @@ Outputs & filters:
access([e.JOB], [e.ENAME], [e.MGR], [e.EMPno]), partitions(p0)
is_index_back=false, is_global_index=false, filter_before_indexback[false],
range_key([e.__pk_increment]), range(MIN ; MAX)always true
3 - output([e.ENAME], [e.MGR], [e.EMPno]), filter(nil), rowset=256
3 - output([column_conv(VARCHAR,utf8mb4_general_ci,length:30,NULL,e.ENAME)], [column_conv(DECIMAL,PS:(4,0),NULL,e.MGR)], [column_conv(DECIMAL,PS:(10,0),
NULL,e.EMPno)]), filter(nil), rowset=256
conds([r.empno = e.MGR]), nl_params_(nil), use_batch=false
4 - output([r.empno]), filter(nil), rowset=256
access([r.empno])
is_index_back=false, is_global_index=false,
range_key(nil), range(MIN ; MAX)
5 - output([e.ENAME], [e.MGR], [e.EMPno]), filter(nil), rowset=256
5 - output([e.MGR], [e.ENAME], [e.EMPno]), filter(nil), rowset=256
6 - output([e.MGR], [e.ENAME], [e.EMPno]), filter(nil), rowset=256
access([e.MGR], [e.ENAME], [e.EMPno]), partitions(p0)
is_index_back=false, is_global_index=false,
@ -3318,11 +3351,12 @@ Outputs & filters:
access([e.JOB], [e.ENAME], [e.MGR], [e.EMPno]), partitions(p0)
is_index_back=false, is_global_index=false, filter_before_indexback[false],
range_key([e.__pk_increment]), range(MIN ; MAX)always true
3 - output([e.ENAME], [e.MGR], [e.EMPno]), filter(nil), rowset=256
3 - output([column_conv(VARCHAR,utf8mb4_general_ci,length:30,NULL,e.ENAME)], [column_conv(DECIMAL,PS:(4,0),NULL,e.MGR)], [column_conv(DECIMAL,PS:(10,0),
NULL,e.EMPno)]), filter(nil), rowset=256
equal_conds([r.empno = e.MGR]), other_conds(nil)
merge_directions([ASC])
4 - output([e.ENAME], [e.MGR], [e.EMPno]), filter(nil), rowset=256
5 - output([e.ENAME], [e.MGR], [e.EMPno]), filter(nil), rowset=256
4 - output([e.MGR], [e.ENAME], [e.EMPno]), filter(nil), rowset=256
5 - output([e.MGR], [e.ENAME], [e.EMPno]), filter(nil), rowset=256
sort_keys([e.MGR, ASC])
6 - output([e.MGR], [e.ENAME], [e.EMPno]), filter(nil), rowset=256
access([e.MGR], [e.ENAME], [e.EMPno]), partitions(p0)
@ -3403,7 +3437,8 @@ Outputs & filters:
access([e.JOB], [e.ENAME], [e.MGR], [e.EMPno]), partitions(p0)
is_index_back=false, is_global_index=false, filter_before_indexback[false],
range_key([e.__pk_increment]), range(MIN ; MAX)always true
3 - output([e.ENAME], [e.MGR], [e.EMPno]), filter(nil), rowset=256
3 - output([column_conv(VARCHAR,utf8mb4_general_ci,length:30,NULL,e.ENAME)], [column_conv(DECIMAL,PS:(4,0),NULL,e.MGR)], [column_conv(DECIMAL,PS:(10,0),
NULL,e.EMPno)]), filter(nil), rowset=256
equal_conds([r.empno = e.MGR]), other_conds(nil)
4 - output([e.MGR], [e.ENAME], [e.EMPno]), filter(nil), rowset=256
access([e.MGR], [e.ENAME], [e.EMPno]), partitions(p0)
@ -3496,10 +3531,11 @@ Outputs & filters:
access([d.SAL]), partitions(p0)
is_index_back=false, is_global_index=false,
range_key([d.__pk_increment]), range(MIN ; MAX)always true
6 - output([e.ENAME], [e.MGR], [e.EMPno]), filter(nil), rowset=256
6 - output([column_conv(VARCHAR,utf8mb4_general_ci,length:30,NULL,e.ENAME)], [column_conv(DECIMAL,PS:(4,0),NULL,e.MGR)], [column_conv(DECIMAL,PS:(10,0),
NULL,e.EMPno)]), filter(nil), rowset=256
equal_conds([r.empno = e.MGR]), other_conds(nil)
7 - output([e.ENAME], [e.MGR], [e.EMPno]), filter(nil), rowset=256
8 - output([e.ENAME], [e.MGR], [e.EMPno]), filter(nil), rowset=256
7 - output([e.MGR], [e.ENAME], [e.EMPno]), filter(nil), rowset=256
8 - output([e.MGR], [e.ENAME], [e.EMPno]), filter(nil), rowset=256
equal_conds([e.SAL = d.SAL]), other_conds(nil)
9 - output([d.SAL]), filter(nil), rowset=256
access([d.SAL]), partitions(p0)
@ -3627,7 +3663,8 @@ Outputs & filters:
access([e.JOB], [e.ENAME], [e.MGR], [e.EMPno]), partitions(p0)
is_index_back=false, is_global_index=false, filter_before_indexback[false],
range_key([e.__pk_increment]), range(MIN ; MAX)always true
3 - output([e.ENAME], [e.MGR], [e.EMPno]), filter(nil), rowset=256
3 - output([column_conv(VARCHAR,utf8mb4_general_ci,length:30,NULL,e.ENAME)], [column_conv(DECIMAL,PS:(4,0),NULL,e.MGR)], [column_conv(DECIMAL,PS:(10,0),
NULL,e.EMPno)]), filter(nil), rowset=256
equal_conds([e.MGR = r.empno]), other_conds(nil)
4 - output([e.MGR], [e.ENAME], [e.EMPno]), filter(nil), rowset=256
access([e.MGR], [e.ENAME], [e.EMPno]), partitions(p0)
@ -3707,7 +3744,8 @@ Outputs & filters:
access([e.JOB], [e.ENAME], [e.MGR], [e.EMPno]), partitions(p0)
is_index_back=false, is_global_index=false, filter_before_indexback[false],
range_key([e.__pk_increment]), range(MIN ; MAX)always true
3 - output([e.ENAME], [e.MGR], [e.EMPno]), filter(nil), rowset=256
3 - output([column_conv(VARCHAR,utf8mb4_general_ci,length:30,NULL,e.ENAME)], [column_conv(DECIMAL,PS:(4,0),NULL,e.MGR)], [column_conv(DECIMAL,PS:(10,0),
NULL,e.EMPno)]), filter(nil), rowset=256
equal_conds([r.empno = e.MGR]), other_conds(nil)
4 - output([e.MGR], [e.ENAME], [e.EMPno]), filter(nil), rowset=256
access([e.MGR], [e.ENAME], [e.EMPno]), partitions(p0)
@ -3810,9 +3848,10 @@ Outputs & filters:
access([n2.empno]), partitions(p0)
is_index_back=false, is_global_index=false,
range_key([n2.__pk_increment]), range(MIN ; MAX)always true
8 - output([r.empno], [e.MGR], [r.iters + 1], [r.sal + e.SAL]), filter(nil), rowset=256
8 - output([column_conv(DECIMAL,PS:(10,0),NULL,r.empno)], [column_conv(DECIMAL,PS:(4,0),NULL,e.MGR)], [column_conv(BIGINT,PS:(1,0),NULL,r.iters + 1)],
[column_conv(DECIMAL,PS:(7,2),NULL,r.sal + e.SAL)]), filter(nil), rowset=256
equal_conds([e.MGR = cast(n.empno, DECIMAL(-1, -1))]), other_conds(nil)
9 - output([r.empno], [e.MGR], [r.iters], [r.sal], [e.SAL]), filter(nil), rowset=256
9 - output([e.MGR], [r.empno], [r.iters], [r.sal], [e.SAL]), filter(nil), rowset=256
equal_conds([r.mgr = e.EMPno]), other_conds(nil)
10 - output([r.mgr], [r.empno], [r.iters], [r.sal]), filter(nil), rowset=256
access([r.mgr], [r.empno], [r.iters], [r.sal])
@ -3915,9 +3954,10 @@ Outputs & filters:
access([n2.empno]), partitions(p0)
is_index_back=false, is_global_index=false,
range_key([n2.__pk_increment]), range(MIN ; MAX)always true
8 - output([r.empno], [e.MGR], [r.iters + 1], [r.sal + e.SAL]), filter(nil), rowset=256
8 - output([column_conv(DECIMAL,PS:(10,0),NULL,r.empno)], [column_conv(DECIMAL,PS:(4,0),NULL,e.MGR)], [column_conv(BIGINT,PS:(1,0),NULL,r.iters + 1)],
[column_conv(DECIMAL,PS:(7,2),NULL,r.sal + e.SAL)]), filter(nil), rowset=256
equal_conds([e.MGR = cast(n.empno, DECIMAL(-1, -1))]), other_conds(nil)
9 - output([r.empno], [e.MGR], [e.SAL], [r.iters], [r.sal]), filter(nil), rowset=256
9 - output([e.MGR], [e.SAL], [r.empno], [r.iters], [r.sal]), filter(nil), rowset=256
equal_conds([e.EMPno = r.mgr]), other_conds(nil)
10 - output([e.EMPno], [e.MGR], [e.SAL]), filter([e.EMPno < e.MGR]), rowset=256
access([e.EMPno], [e.MGR], [e.SAL]), partitions(p0)
@ -4021,7 +4061,8 @@ Outputs & filters:
access([n2.empno]), partitions(p0)
is_index_back=false, is_global_index=false,
range_key([n2.__pk_increment]), range(MIN ; MAX)always true
8 - output([r.empno], [e.MGR], [r.iters + 1], [r.sal + e.SAL]), filter(nil), rowset=256
8 - output([column_conv(DECIMAL,PS:(10,0),NULL,r.empno)], [column_conv(DECIMAL,PS:(4,0),NULL,e.MGR)], [column_conv(BIGINT,PS:(1,0),NULL,r.iters + 1)],
[column_conv(DECIMAL,PS:(7,2),NULL,r.sal + e.SAL)]), filter(nil), rowset=256
equal_conds([e.EMPno = r.mgr]), other_conds(nil)
9 - output([e.MGR], [e.EMPno], [e.SAL]), filter(nil), rowset=256
10 - output([e.MGR], [e.EMPno], [e.SAL]), filter(nil), rowset=256
@ -4128,7 +4169,8 @@ Outputs & filters:
access([n2.empno]), partitions(p0)
is_index_back=false, is_global_index=false,
range_key([n2.__pk_increment]), range(MIN ; MAX)always true
8 - output([r.empno], [e.MGR], [r.iters + 1], [r.sal + e.SAL]), filter(nil), rowset=256
8 - output([column_conv(DECIMAL,PS:(10,0),NULL,r.empno)], [column_conv(DECIMAL,PS:(4,0),NULL,e.MGR)], [column_conv(BIGINT,PS:(1,0),NULL,r.iters + 1)],
[column_conv(DECIMAL,PS:(7,2),NULL,r.sal + e.SAL)]), filter(nil), rowset=256
equal_conds([e.EMPno = r.mgr]), other_conds(nil)
9 - output([e.MGR], [e.EMPno], [e.SAL]), filter(nil), rowset=256
10 - output([e.MGR], [e.EMPno], [e.SAL]), filter(nil), rowset=256
@ -4212,7 +4254,8 @@ Outputs & filters:
access([e.JOB], [e.ENAME], [e.MGR], [e.EMPno]), partitions(p0)
is_index_back=false, is_global_index=false, filter_before_indexback[false],
range_key([e.__pk_increment]), range(MIN ; MAX)always true
3 - output([e.ENAME], [e.MGR], [e.EMPno]), filter(nil), rowset=256
3 - output([column_conv(VARCHAR,utf8mb4_general_ci,length:30,NULL,e.ENAME)], [column_conv(DECIMAL,PS:(4,0),NULL,e.MGR)], [column_conv(DECIMAL,PS:(10,0),
NULL,e.EMPno)]), filter(nil), rowset=256
equal_conds([r.empno = e.MGR]), other_conds(nil)
4 - output([r.empno]), filter(nil), rowset=256
access([r.empno])
@ -4292,7 +4335,8 @@ Outputs & filters:
access([e.JOB], [e.ENAME], [e.MGR], [e.EMPno]), partitions(p0)
is_index_back=false, is_global_index=false, filter_before_indexback[false],
range_key([e.__pk_increment]), range(MIN ; MAX)always true
3 - output([e.ENAME], [e.MGR], [e.EMPno]), filter(nil), rowset=256
3 - output([column_conv(VARCHAR,utf8mb4_general_ci,length:30,NULL,e.ENAME)], [column_conv(DECIMAL,PS:(4,0),NULL,e.MGR)], [column_conv(DECIMAL,PS:(10,0),
NULL,e.EMPno)]), filter(nil), rowset=256
equal_conds([e.MGR = r.empno]), other_conds(nil)
4 - output([e.MGR], [e.ENAME], [e.EMPno]), filter(nil), rowset=256
access([e.MGR], [e.ENAME], [e.EMPno]), partitions(p0)
@ -4395,9 +4439,10 @@ Outputs & filters:
access([n2.empno]), partitions(p0)
is_index_back=false, is_global_index=false,
range_key([n2.__pk_increment]), range(MIN ; MAX)always true
8 - output([r.empno], [e.MGR], [r.iters + 1], [r.sal + e.SAL]), filter(nil), rowset=256
8 - output([column_conv(DECIMAL,PS:(10,0),NULL,r.empno)], [column_conv(DECIMAL,PS:(4,0),NULL,e.MGR)], [column_conv(BIGINT,PS:(1,0),NULL,r.iters + 1)],
[column_conv(DECIMAL,PS:(7,2),NULL,r.sal + e.SAL)]), filter(nil), rowset=256
equal_conds([cast(n.empno, DECIMAL(-1, -1)) = e.MGR], [r.mgr = e.EMPno]), other_conds(nil)
9 - output([r.empno], [r.mgr], [r.iters], [r.sal], [n.empno]), filter(nil), rowset=256
9 - output([r.mgr], [r.empno], [r.iters], [r.sal], [n.empno]), filter(nil), rowset=256
conds(nil), nl_params_(nil), use_batch=false
10 - output([r.mgr], [r.empno], [r.iters], [r.sal]), filter(nil), rowset=256
access([r.mgr], [r.empno], [r.iters], [r.sal])
@ -4502,9 +4547,10 @@ Outputs & filters:
access([n2.empno]), partitions(p0)
is_index_back=false, is_global_index=false,
range_key([n2.__pk_increment]), range(MIN ; MAX)always true
8 - output([r.empno], [e.MGR], [r.iters + 1], [r.sal + e.SAL]), filter(nil), rowset=256
8 - output([column_conv(DECIMAL,PS:(10,0),NULL,r.empno)], [column_conv(DECIMAL,PS:(4,0),NULL,e.MGR)], [column_conv(BIGINT,PS:(1,0),NULL,r.iters + 1)],
[column_conv(DECIMAL,PS:(7,2),NULL,r.sal + e.SAL)]), filter(nil), rowset=256
equal_conds([r.mgr = e.EMPno], [cast(n.empno, DECIMAL(-1, -1)) = e.MGR]), other_conds(nil)
9 - output([r.empno], [r.mgr], [r.iters], [r.sal], [n.empno]), filter(nil), rowset=256
9 - output([r.mgr], [r.empno], [r.iters], [r.sal], [n.empno]), filter(nil), rowset=256
conds(nil), nl_params_(nil), use_batch=false
10 - output([r.mgr], [r.empno], [r.iters], [r.sal]), filter(nil), rowset=256
access([r.mgr], [r.empno], [r.iters], [r.sal])
@ -4585,7 +4631,8 @@ Outputs & filters:
access([e.JOB], [e.ENAME], [e.MGR], [e.EMPno]), partitions(p0)
is_index_back=false, is_global_index=false, filter_before_indexback[false],
range_key([e.__pk_increment]), range(MIN ; MAX)always true
3 - output([e.ENAME], [e.MGR], [e.EMPno]), filter(nil), rowset=256
3 - output([column_conv(VARCHAR,utf8mb4_general_ci,length:30,NULL,e.ENAME)], [column_conv(DECIMAL,PS:(4,0),NULL,e.MGR)], [column_conv(DECIMAL,PS:(10,0),
NULL,e.EMPno)]), filter(nil), rowset=256
equal_conds([r.empno = e.MGR]), other_conds(nil)
4 - output([e.MGR], [e.ENAME], [e.EMPno]), filter(nil), rowset=256
access([e.MGR], [e.ENAME], [e.EMPno]), partitions(p0)
@ -4664,7 +4711,8 @@ Outputs & filters:
access([e.JOB], [e.ENAME], [e.MGR], [e.EMPno]), partitions(p0)
is_index_back=false, is_global_index=false, filter_before_indexback[false],
range_key([e.__pk_increment]), range(MIN ; MAX)always true
3 - output([e.ENAME], [e.MGR], [e.EMPno]), filter(nil), rowset=256
3 - output([column_conv(VARCHAR,utf8mb4_general_ci,length:30,NULL,e.ENAME)], [column_conv(DECIMAL,PS:(4,0),NULL,e.MGR)], [column_conv(DECIMAL,PS:(10,0),
NULL,e.EMPno)]), filter(nil), rowset=256
equal_conds([r.empno = e.MGR]), other_conds(nil)
4 - output([e.MGR], [e.EMPno], [e.ENAME]), filter([e.EMPno < e.MGR]), rowset=256
access([e.MGR], [e.EMPno], [e.ENAME]), partitions(p0)
@ -4799,12 +4847,13 @@ Outputs & filters:
access([n2.empno]), partitions(p0)
is_index_back=false, is_global_index=false,
range_key([n2.__pk_increment]), range(MIN ; MAX)always true
8 - output([r.empno], [e.MGR], [r.iters + 1], [r.sal + e.SAL]), filter(nil), rowset=256
8 - output([column_conv(DECIMAL,PS:(10,0),NULL,r.empno)], [column_conv(DECIMAL,PS:(4,0),NULL,e.MGR)], [column_conv(BIGINT,PS:(1,0),NULL,r.iters + 1)],
[column_conv(DECIMAL,PS:(7,2),NULL,r.sal + e.SAL)]), filter(nil), rowset=256
conds([e.EMPno > VIEW1.c1]), nl_params_(nil), use_batch=false
9 - output([r.empno], [e.MGR], [e.EMPno], [e.SAL], [r.iters], [r.sal]), filter(nil), rowset=256
9 - output([e.EMPno], [e.MGR], [e.SAL], [r.empno], [r.iters], [r.sal]), filter(nil), rowset=256
equal_conds([e.EMPno = r.mgr]), other_conds(nil)
10 - output([e.MGR], [e.EMPno], [e.SAL]), filter(nil), rowset=256
11 - output([e.MGR], [e.EMPno], [e.SAL]), filter(nil), rowset=256
10 - output([e.EMPno], [e.MGR], [e.SAL]), filter(nil), rowset=256
11 - output([e.EMPno], [e.MGR], [e.SAL]), filter(nil), rowset=256
equal_conds([cast(n.empno, DECIMAL(-1, -1)) = e.MGR]), other_conds(nil)
12 - output([n.empno]), filter(nil), rowset=256
access([n.empno]), partitions(p0)
@ -4918,14 +4967,15 @@ Outputs & filters:
access([n2.empno]), partitions(p0)
is_index_back=false, is_global_index=false,
range_key([n2.__pk_increment]), range(MIN ; MAX)always true
8 - output([r.empno], [e.MGR], [r.iters + 1], [r.sal + e.SAL]), filter(nil), rowset=256
8 - output([column_conv(DECIMAL,PS:(10,0),NULL,r.empno)], [column_conv(DECIMAL,PS:(4,0),NULL,e.MGR)], [column_conv(BIGINT,PS:(1,0),NULL,r.iters + 1)],
[column_conv(DECIMAL,PS:(7,2),NULL,r.sal + e.SAL)]), filter(nil), rowset=256
conds([e.EMPno > VIEW1.c1]), nl_params_(nil), use_batch=false
9 - output([r.empno], [e.MGR], [e.EMPno], [e.SAL], [r.iters], [r.sal]), filter(nil), rowset=256
9 - output([e.EMPno], [e.MGR], [e.SAL], [r.empno], [r.iters], [r.sal]), filter(nil), rowset=256
conds(nil), nl_params_(nil), use_batch=false
10 - output([r.empno], [e.MGR], [e.EMPno], [e.SAL], [r.iters], [r.sal]), filter(nil), rowset=256
10 - output([e.EMPno], [e.MGR], [e.SAL], [r.empno], [r.iters], [r.sal]), filter(nil), rowset=256
equal_conds([e.EMPno = r.mgr]), other_conds(nil)
11 - output([e.MGR], [e.EMPno], [e.SAL]), filter(nil), rowset=256
12 - output([e.MGR], [e.EMPno], [e.SAL]), filter(nil), rowset=256
11 - output([e.EMPno], [e.MGR], [e.SAL]), filter(nil), rowset=256
12 - output([e.EMPno], [e.MGR], [e.SAL]), filter(nil), rowset=256
equal_conds([cast(n.empno, DECIMAL(-1, -1)) = e.MGR]), other_conds(nil)
13 - output([n.empno]), filter(nil), rowset=256
access([n.empno]), partitions(p0)

View File

@ -139,7 +139,7 @@ with RECURSIVE t4(a) as (select 1 from dual union all select a+1 from t4 where a
##############################
## PART 2.1 定义列名重复
with RECURSIVE cte(a,a) as (select 1,1 from dual union all select a+1, a+1 from cte where a+1 < 10) select * from cte;
ERROR HY000: duplicate name found in column alias list for WITH clause
ERROR 42S21: Duplicate column name 'a'
## PART 2.2.1 定义列数量与查询产生列一致或不一致
with RECURSIVE cte(a,b) as (select 1,1 from dual union all select a+1, a+1 from cte where a+1 < 10) select * from cte;
@ -973,24 +973,42 @@ with RECURSIVE cte(a) as (select 1 from dual union all select 2 from dual), cte_
## 非常的复杂
## 递归cte只能有两个入口
with RECURSIVE cte(n) AS (select 1 from dual UNION ALL select n+1 from cte where n < 3 UNION ALL select 2 from dual) select * from cte;
ERROR HY000: UNION ALL operation in recursive WITH clause must have only two branches
ERROR HY000: More than one recursive query blocks of Common Table Expression not supported
## 递归必须包含union all
with RECURSIVE cte(n) AS ( select 1 from cte) select * from cte;
ERROR HY000: recursive WITH clause must use a UNION ALL operation
ERROR HY000: Recursive Common Table Expression should contain a UNION ALL
set @@ob_query_timeout=1000000;
with RECURSIVE cte(n) AS ( select 1 from dual UNION ALL select sum(n+1) from cte) select * from cte;
ERROR HY000: Recursive Common Table Expression can contain neither aggregation nor window functions in recursive query block
ERROR HY000: ORDER BY / LIMIT / SELECT DISTINCT / HAVING / WINDOW FUNCTION / GROUP BY in recursive query block of Common Table Expression not supported
set @@ob_query_timeout=10000000;
##递归查询只允许有两个入口
with RECURSIVE cte(n) AS (select 1 from dual UNION ALL select n+1 from cte where n < 3 union all select n+1 from cte where n < 2) select * from cte;
ERROR HY000: UNION ALL operation in recursive WITH clause must have only two branches
ERROR HY000: More than one recursive query blocks of Common Table Expression not supported
with RECURSIVE cte(n) as (select 1 from dual union all select c1 from t1 union all (with RECURSIVE cte(n) as (select c1 from t1) select * from cte)) select * from cte;
ERROR HY000: cycle detected while executing recursive WITH query
+------+
| n |
+------+
| 1 |
| 1 |
| 4 |
| 7 |
| 10 |
| 13 |
| 16 |
| 19 |
| 1 |
| 4 |
| 7 |
| 10 |
| 13 |
| 16 |
| 19 |
+------+
with RECURSIVE cte(n) as (select n from (select 1 from dual union all select n+1 from cte) tmp) select * from cte;
ERROR HY000: In recursive query block of Recursive Common Table Expression, the recursive table must be referenced only once, and not in any subquery
@ -1826,15 +1844,18 @@ Outputs & filters:
4 - output([UNION([1])], [UNION([2])], [UNION([3])]), filter(nil), rowset=256
5 - output([1], [1], [1]), filter(nil)
values({1, 1, 1})
6 - output([cte1.a + 1], [cte1.b + 1], [cte1.c + 1]), filter([cte1.a < 10]), rowset=256
6 - output([column_conv(BIGINT,PS:(1,0),NULL,cte1.a + 1)], [column_conv(BIGINT,PS:(1,0),NULL,cte1.b + 1)], [column_conv(BIGINT,PS:(1,0),NULL,cte1.c +
1)]), filter([cte1.a < 10]), rowset=256
access([cte1.a], [cte1.b], [cte1.c])
is_index_back=false, is_global_index=false, filter_before_indexback[false],
range_key(nil), range(MIN ; MAX)
7 - output([cte2.a + 1], [cte2.b + 1], [cte2.c + 1]), filter([cte2.a < 10]), rowset=256
7 - output([column_conv(BIGINT,PS:(1,0),NULL,cte2.a + 1)], [column_conv(BIGINT,PS:(1,0),NULL,cte2.b + 1)], [column_conv(BIGINT,PS:(1,0),NULL,cte2.c +
1)]), filter([cte2.a < 10]), rowset=256
access([cte2.a], [cte2.b], [cte2.c])
is_index_back=false, is_global_index=false, filter_before_indexback[false],
range_key(nil), range(MIN ; MAX)
8 - output([cte3.a + 1], [cte3.b + 1], [cte3.c + 1]), filter(nil), rowset=256
8 - output([column_conv(BIGINT,PS:(1,0),NULL,cte3.a + 1)], [column_conv(BIGINT,PS:(1,0),NULL,cte3.b + 1)], [column_conv(BIGINT,PS:(1,0),NULL,cte3.c +
1)]), filter(nil), rowset=256
conds([cte3.a < cte2.b]), nl_params_(nil), use_batch=false
9 - output([cte3.a], [cte3.b], [cte3.c]), filter([cte3.a < 10]), rowset=256
access([cte3.a], [cte3.b], [cte3.c])
@ -1847,11 +1868,13 @@ Outputs & filters:
13 - output([UNION([1])], [UNION([2])], [UNION([3])]), filter(nil), rowset=256
14 - output([1], [1], [1]), filter(nil)
values({1, 1, 1})
15 - output([cte1.a + 1], [cte1.b + 1], [cte1.c + 1]), filter([cte1.a < 10]), rowset=256
15 - output([column_conv(BIGINT,PS:(1,0),NULL,cte1.a + 1)], [column_conv(BIGINT,PS:(1,0),NULL,cte1.b + 1)], [column_conv(BIGINT,PS:(1,0),NULL,cte1.c +
1)]), filter([cte1.a < 10]), rowset=256
access([cte1.a], [cte1.b], [cte1.c])
is_index_back=false, is_global_index=false, filter_before_indexback[false],
range_key(nil), range(MIN ; MAX)
16 - output([cte2.a + 1], [cte2.b + 1], [cte2.c + 1]), filter([cte2.a < 10]), rowset=256
16 - output([column_conv(BIGINT,PS:(1,0),NULL,cte2.a + 1)], [column_conv(BIGINT,PS:(1,0),NULL,cte2.b + 1)], [column_conv(BIGINT,PS:(1,0),NULL,cte2.c +
1)]), filter([cte2.a < 10]), rowset=256
access([cte2.a], [cte2.b], [cte2.c])
is_index_back=false, is_global_index=false, filter_before_indexback[false],
range_key(nil), range(MIN ; MAX)
@ -1861,7 +1884,8 @@ Outputs & filters:
19 - output([UNION([1])], [UNION([2])], [UNION([3])]), filter(nil), rowset=256
20 - output([1], [1], [1]), filter(nil)
values({1, 1, 1})
21 - output([cte1.a + 1], [cte1.b + 1], [cte1.c + 1]), filter([cte1.a < 10]), rowset=256
21 - output([column_conv(BIGINT,PS:(1,0),NULL,cte1.a + 1)], [column_conv(BIGINT,PS:(1,0),NULL,cte1.b + 1)], [column_conv(BIGINT,PS:(1,0),NULL,cte1.c +
1)]), filter([cte1.a < 10]), rowset=256
access([cte1.a], [cte1.b], [cte1.c])
is_index_back=false, is_global_index=false, filter_before_indexback[false],
range_key(nil), range(MIN ; MAX)

View File

@ -52,7 +52,7 @@ WITH rw (ename, mgr, empno, job) AS
SELECT ename, empno, mgr, job
FROM rw
WHERE job = 'PRESIDENT' ;
ERROR 42S02: Table doesn't exist
ERROR 42S02: Table 'cte_st.rw' doesn't exist
WITH rw (ename, mgr, empno, job) AS
(
@ -66,6 +66,6 @@ WITH rw (ename, mgr, empno, job) AS
SELECT /*+ :HINT: */ ename, empno, mgr, job
FROM rw
WHERE job = 'PRESIDENT' ;
ERROR 42S02: Table doesn't exist
ERROR 42S02: Table 'cte_st.rw' doesn't exist
drop database cte_st;

View File

@ -110,7 +110,7 @@ WITH t4 as (select 1 from dual) select * from t4;
--echo ##############################
--echo ## PART 2.1 定义列名重复
--error 5751
--error 1060
with cte(a,a) as (select 1,1 from dual) select * from cte;
--echo ## PART 2.2.1 定义列数量与查询产生列一致或不一致

View File

@ -15,7 +15,7 @@ with cte(a,b) as (select 1 from dual) select * from cte;
--error 1146
with cte(a,b) as (with cte2(a,b) as (select 1,1 from dual) select a,b from cte) select * from cte;
--error 5751
--error 1060
with cte(a,a) as (select 1 from dual) select * from cte;
--error 1146

View File

@ -256,7 +256,7 @@ with RECURSIVE qn (foo, bar) as (select 1,1 from dual) select * from qn;
--error 1060
with RECURSIVE qn as (select 1,1 from t1) select * from qn;
with RECURSIVE qn (foo, bar) as (select 1,1 from t1) select * from qn;
--error 5751
--error 1060
with RECURSIVE qn (foo, foo) as (select 1,2 from dual) select * from qn;
--echo # Derived tables support this too
@ -1029,7 +1029,7 @@ create table insert_t (c1 int, c2 int, c3 int);
create table t4(id int, value char(10), parent_id int);
with RECURSIVE t4(a) as (select 1 from dual union all select a+1 from t4 where a+1 < 10) select * from t4;
--error 5751
--error 1060
with RECURSIVE cte(a,a) as (select 1,1 from dual union all select a+1, a+1 from cte where a+1 < 10) select * from cte;
with RECURSIVE cte(a,b) as (select 1,1 from dual union all select a+1, a+1 from cte where a+1 < 10) select * from cte;
--error 1353
@ -1103,8 +1103,8 @@ with RECURSIVE cte(n) AS ( select 1 from dual UNION ALL select sum(n+1) from cte
set @@ob_query_timeout=10000000;
--error 5743
with RECURSIVE cte(n) AS (select 1 from dual UNION ALL select n+1 from cte where n < 3 union all select n+1 from cte where n < 2) select * from cte;
--error 5746
with RECURSIVE cte(n) as (select 1 from dual union all select c1 from t1 union all (with RECURSIVE cte(n) as (select c1 from t1) select * from cte)) select * from cte;
--error 1406
with RECURSIVE cte(n) as (select '1' from dual union all select n+1 from cte where n < 100) select * from cte;
--error 3577

View File

@ -135,7 +135,7 @@ with RECURSIVE t4(a) as (select 1 from dual union all select a+1 from t4 where a
##############################
## PART 2.1 定义列名重复
--error 5751
--error 1060
with RECURSIVE cte(a,a) as (select 1,1 from dual union all select a+1, a+1 from cte where a+1 < 10) select * from cte;
## PART 2.2.1 定义列数量与查询产生列一致或不一致
@ -251,7 +251,6 @@ set @@ob_query_timeout=10000000;
--error 5743
with RECURSIVE cte(n) AS (select 1 from dual UNION ALL select n+1 from cte where n < 3 union all select n+1 from cte where n < 2) select * from cte;
--error 5746
with RECURSIVE cte(n) as (select 1 from dual union all select c1 from t1 union all (with RECURSIVE cte(n) as (select c1 from t1) select * from cte)) select * from cte;
--error 3577