Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
MariaDB
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
MariaDB
Commits
d0e973a3
Commit
d0e973a3
authored
May 10, 2016
by
Galina Shalygina
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed merge problems to allow mysql-test suite 'main' to pass
parent
f516b966
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
26 additions
and
20 deletions
+26
-20
mysql-test/r/cte_nonrecursive.result
mysql-test/r/cte_nonrecursive.result
+10
-7
mysql-test/t/cte_nonrecursive.test
mysql-test/t/cte_nonrecursive.test
+10
-7
mysql-test/t/cte_recursive.test
mysql-test/t/cte_recursive.test
+1
-1
sql/share/errmsg-utf8.txt
sql/share/errmsg-utf8.txt
+0
-3
sql/sql_derived.cc
sql/sql_derived.cc
+4
-1
sql/sql_union.cc
sql/sql_union.cc
+1
-1
No files found.
mysql-test/r/cte_nonrecursive.result
View file @
d0e973a3
...
...
@@ -691,24 +691,27 @@ with recursive t as (select * from s where a>2),
s as (select a from t1,r where t1.a>r.c),
r as (select c from t,t2 where t.a=t2.c)
select * from r where r.c<7;
ERROR HY000: Recursive queries in WITH clause are not supported yet
with t as (select * from s where a>2),
ERROR HY000: No anchors for recursive WITH element 't'
with recursive
t as (select * from s where a>2),
s as (select a from t1,r where t1.a>r.c),
r as (select c from t,t2 where t.a=t2.c)
select * from r where r.c<7;
ERROR HY000: Recursive queries in WITH clause are not supported yet
with t as (select * from t1
ERROR HY000: No anchors for recursive WITH element 't'
with recursive
t as (select * from t1
where a in (select c from s where b<='ccc') and b>'b'),
s as (select * from t1,t2
where t1.a=t2.c and t1.c in (select a from t where a<5))
select * from s where s.b>'aaa';
ERROR HY000: Recursive queries in WITH clause are not supported yet
with t as (select * from t1 where b>'aaa' and b <='d')
ERROR HY000: No anchors for recursive WITH element 't'
with recursive
t as (select * from t1 where b>'aaa' and b <='d')
select t.b from t,t2
where t.a=t2.c and
t2.c in (with s as (select t1.a from s,t1 where t1.a=s.a and t1.b<'c')
select * from s);
ERROR HY000:
Recursive queries in WITH clause are not supported yet
ERROR HY000:
No anchors for recursive WITH element 's'
#erroneous definition of unreferenced with table t
with t as (select count(*) from t1 where d>='f' group by a)
select t1.b from t2,t1 where t1.a = t2.c;
...
...
mysql-test/t/cte_nonrecursive.test
View file @
d0e973a3
...
...
@@ -376,27 +376,30 @@ with recursive
s
as
(
select
a
from
t1
where
b
>=
'd'
)
select
*
from
t
,
s
where
t
.
a
=
s
.
a
;
--
ERROR
ER_RECURSIVE_
QUERY_IN_WITH_CLAUSE
--
ERROR
ER_RECURSIVE_
WITHOUT_ANCHORS
with
recursive
t
as
(
select
*
from
s
where
a
>
2
),
s
as
(
select
a
from
t1
,
r
where
t1
.
a
>
r
.
c
),
r
as
(
select
c
from
t
,
t2
where
t
.
a
=
t2
.
c
)
select
*
from
r
where
r
.
c
<
7
;
--
ERROR
ER_RECURSIVE_QUERY_IN_WITH_CLAUSE
with
t
as
(
select
*
from
s
where
a
>
2
),
--
ERROR
ER_RECURSIVE_WITHOUT_ANCHORS
with
recursive
t
as
(
select
*
from
s
where
a
>
2
),
s
as
(
select
a
from
t1
,
r
where
t1
.
a
>
r
.
c
),
r
as
(
select
c
from
t
,
t2
where
t
.
a
=
t2
.
c
)
select
*
from
r
where
r
.
c
<
7
;
--
ERROR
ER_RECURSIVE_QUERY_IN_WITH_CLAUSE
with
t
as
(
select
*
from
t1
--
ERROR
ER_RECURSIVE_WITHOUT_ANCHORS
with
recursive
t
as
(
select
*
from
t1
where
a
in
(
select
c
from
s
where
b
<=
'ccc'
)
and
b
>
'b'
),
s
as
(
select
*
from
t1
,
t2
where
t1
.
a
=
t2
.
c
and
t1
.
c
in
(
select
a
from
t
where
a
<
5
))
select
*
from
s
where
s
.
b
>
'aaa'
;
--
ERROR
ER_RECURSIVE_QUERY_IN_WITH_CLAUSE
with
t
as
(
select
*
from
t1
where
b
>
'aaa'
and
b
<=
'd'
)
--
ERROR
ER_RECURSIVE_WITHOUT_ANCHORS
with
recursive
t
as
(
select
*
from
t1
where
b
>
'aaa'
and
b
<=
'd'
)
select
t
.
b
from
t
,
t2
where
t
.
a
=
t2
.
c
and
t2
.
c
in
(
with
s
as
(
select
t1
.
a
from
s
,
t1
where
t1
.
a
=
s
.
a
and
t1
.
b
<
'c'
)
...
...
mysql-test/t/cte_recursive.test
View file @
d0e973a3
...
...
@@ -4,7 +4,7 @@ insert into t1 values
insert
into
t1
values
(
3
,
'eee'
),
(
7
,
'bb'
),
(
1
,
'fff'
),
(
4
,
'ggg'
);
--
ERROR
1984
--
ERROR
ER_RECURSIVE_WITHOUT_ANCHORS
with
recursive
a1
(
a
,
b
)
as
(
select
*
from
t1
where
t1
.
a
>
3
...
...
sql/share/errmsg-utf8.txt
View file @
d0e973a3
...
...
@@ -7152,13 +7152,10 @@ ER_DUP_QUERY_NAME
eng "Duplicate query name in WITH clause"
ER_WRONG_ORDER_IN_WITH_CLAUSE
eng "The definition of the table '%s' refers to the table '%s' defined later in a non-recursive WITH clause"
ER_RECURSIVE_QUERY_IN_WITH_CLAUSE
eng "Recursive queries in WITH clause are not supported yet"
ER_RECURSIVE_WITHOUT_ANCHORS
eng "No anchors for recursive WITH element '%s'"
ER_REF_TO_RECURSIVE_WITH_TABLE_IN_DERIVED
eng "Reference to recursive WITH table '%s' in materiazed derived"
#
# Internal errors, not used
#
...
...
sql/sql_derived.cc
View file @
d0e973a3
...
...
@@ -636,6 +636,9 @@ bool mysql_derived_prepare(THD *thd, LEX *lex, TABLE_LIST *derived)
bool
res
=
FALSE
;
DBUG_PRINT
(
"enter"
,
(
"unit 0x%lx"
,
(
ulong
)
unit
));
if
(
!
unit
)
DBUG_RETURN
(
FALSE
);
SELECT_LEX
*
first_select
=
unit
->
first_select
();
if
(
unit
->
prepared
&&
derived
->
is_recursive_with_table
()
&&
...
...
@@ -665,7 +668,7 @@ bool mysql_derived_prepare(THD *thd, LEX *lex, TABLE_LIST *derived)
}
// Skip already prepared views/DT
if
(
!
unit
||
unit
->
prepared
||
if
(
unit
->
prepared
||
(
derived
->
merged_for_insert
&&
!
(
derived
->
is_multitable
()
&&
(
thd
->
lex
->
sql_command
==
SQLCOM_UPDATE_MULTI
||
...
...
sql/sql_union.cc
View file @
d0e973a3
...
...
@@ -1285,7 +1285,7 @@ bool st_select_lex_unit::cleanup()
if
(
with_element
&&
with_element
->
is_recursive
)
with_element
->
mark_as_cleaned
();
if
(
union_result
&&
!
(
with_element
->
is_recursive
))
if
(
union_result
&&
!
(
with_element
&&
with_element
->
is_recursive
))
{
delete
union_result
;
union_result
=
0
;
// Safety
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment