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
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
mariadb
Commits
222acc63
Commit
222acc63
authored
Nov 13, 2013
by
Igor Babaev
Browse files
Options
Browse Files
Download
Plain Diff
Merge
parents
e4608eb3
ae40c720
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
35 additions
and
1 deletion
+35
-1
mysql-test/r/union.result
mysql-test/r/union.result
+15
-0
mysql-test/t/union.test
mysql-test/t/union.test
+19
-0
sql/sql_lex.cc
sql/sql_lex.cc
+1
-1
No files found.
mysql-test/r/union.result
View file @
222acc63
...
...
@@ -1724,3 +1724,18 @@ foo
1
deallocate prepare stmt1;
End of 5.1 tests
#
# mdev-5091: Asseirtion failure for UNION with ORDER BY
# in one of selects
#
CREATE TABLE t1 (i int, c char(1)) ENGINE=MyISAM;
INSERT INTO t1 VALUES (6,'b');
CREATE VIEW v1 AS SELECT * FROM t1;
( SELECT i FROM v1 GROUP BY i ORDER BY CONCAT( c, c ) LIMIT 1 )
UNION
( SELECT i FROM t1 );
i
6
DROP VIEW v1;
DROP TABLE t1;
End of 5.3 tests
mysql-test/t/union.test
View file @
222acc63
...
...
@@ -1210,3 +1210,22 @@ execute stmt1;
deallocate
prepare
stmt1
;
--
echo
End
of
5.1
tests
--
echo
#
--
echo
# mdev-5091: Asseirtion failure for UNION with ORDER BY
--
echo
# in one of selects
--
echo
#
CREATE
TABLE
t1
(
i
int
,
c
char
(
1
))
ENGINE
=
MyISAM
;
INSERT
INTO
t1
VALUES
(
6
,
'b'
);
CREATE
VIEW
v1
AS
SELECT
*
FROM
t1
;
(
SELECT
i
FROM
v1
GROUP
BY
i
ORDER
BY
CONCAT
(
c
,
c
)
LIMIT
1
)
UNION
(
SELECT
i
FROM
t1
);
DROP
VIEW
v1
;
DROP
TABLE
t1
;
--
echo
End
of
5.3
tests
sql/sql_lex.cc
View file @
222acc63
...
...
@@ -3534,7 +3534,7 @@ void SELECT_LEX::update_used_tables()
}
for
(
ORDER
*
order
=
group_list
.
first
;
order
;
order
=
order
->
next
)
(
*
order
->
item
)
->
update_used_tables
();
if
(
!
master_unit
()
->
is_union
()
)
if
(
master_unit
()
->
global_parameters
!=
this
)
{
for
(
ORDER
*
order
=
order_list
.
first
;
order
;
order
=
order
->
next
)
(
*
order
->
item
)
->
update_used_tables
();
...
...
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