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
c80f9a33
Commit
c80f9a33
authored
Sep 07, 2019
by
Galina Shalygina
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Changed handling of mergeable views/derived tables of one table.
parent
f089a900
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
9 additions
and
6 deletions
+9
-6
mysql-test/main/func_dep.result
mysql-test/main/func_dep.result
+5
-2
mysql-test/main/func_dep.test
mysql-test/main/func_dep.test
+0
-2
sql/sql_func_dep.cc
sql/sql_func_dep.cc
+4
-2
No files found.
mysql-test/main/func_dep.result
View file @
c80f9a33
...
...
@@ -4395,13 +4395,16 @@ FROM t1 LEFT JOIN (
SELECT t2.c,COALESCE(t2.c,2) as x FROM t2) AS d
ON 1
GROUP BY d.c;
ERROR 42000: Non-grouping field 'x' is used in SELECT list
c x
NULL 2
2 2
SELECT d.c,d.x
FROM t1 LEFT JOIN (
SELECT t2.c,COALESCE(t2.c,2) as x FROM t2) AS d
ON 0
GROUP BY d.c;
ERROR 42000: Non-grouping field 'x' is used in SELECT list
c x
NULL NULL
SELECT t1.a,d.c,d.x
FROM t1 LEFT JOIN (
SELECT t2.c,COALESCE(t2.c,2) as x FROM t2) AS d
...
...
mysql-test/main/func_dep.test
View file @
c80f9a33
...
...
@@ -3924,14 +3924,12 @@ FROM t1 LEFT JOIN (
ON
(
t1
.
a
>
0
)
GROUP
BY
d
.
c
;
--
error
ER_NON_GROUPING_FIELD_USED
SELECT
d
.
c
,
d
.
x
FROM
t1
LEFT
JOIN
(
SELECT
t2
.
c
,
COALESCE
(
t2
.
c
,
2
)
as
x
FROM
t2
)
AS
d
ON
1
GROUP
BY
d
.
c
;
--
error
ER_NON_GROUPING_FIELD_USED
SELECT
d
.
c
,
d
.
x
FROM
t1
LEFT
JOIN
(
SELECT
t2
.
c
,
COALESCE
(
t2
.
c
,
2
)
as
x
FROM
t2
)
AS
d
...
...
sql/sql_func_dep.cc
View file @
c80f9a33
...
...
@@ -825,7 +825,9 @@ bool expand_fdfs_with_join_tables_fields(FD_select_info *sl_info,
TABLE_LIST
*
tbl
=
dep_tabs
.
elem
(
i
);
if
(
!
tbl
->
on_expr
)
continue
;
if
(
tbl
->
nested_join
&&
expand_fdfs_with_join_tables_fields
(
sl_info
,
tbl
))
if
(
tbl
->
nested_join
&&
(
tbl
->
nested_join
->
join_list
.
elements
>
1
)
&&
expand_fdfs_with_join_tables_fields
(
sl_info
,
tbl
))
return
true
;
else
if
(
tbl
->
table
)
{
...
...
@@ -902,7 +904,7 @@ bool expand_fdfs_with_top_join_tables_fields(FD_select_info *sl_info)
TABLE_LIST
*
tbl
=
dep_tabs
.
elem
(
i
);
if
(
!
tbl
->
on_expr
)
continue
;
if
(
tbl
->
nested_join
)
if
(
tbl
->
nested_join
&&
(
tbl
->
nested_join
->
join_list
.
elements
>
1
)
)
{
if
(
tbl
->
outer_join
&
JOIN_TYPE_LEFT
)
sl_info
->
top_level
=
false
;
...
...
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