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
4fc1f2fb
Commit
4fc1f2fb
authored
Jul 22, 2017
by
Alexander Barkov
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/10.2' into bb-10.2-ext
parents
23290e42
2a1035b0
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
33 additions
and
3 deletions
+33
-3
mysql-test/r/win.result
mysql-test/r/win.result
+13
-0
mysql-test/t/win.test
mysql-test/t/win.test
+11
-0
sql/sql_lex.cc
sql/sql_lex.cc
+9
-3
No files found.
mysql-test/r/win.result
View file @
4fc1f2fb
...
...
@@ -3161,6 +3161,19 @@ SELECT ('bar',1) IN ( SELECT c, ROW_NUMBER() OVER (PARTITION BY c) FROM t1);
0
DROP TABLE t1;
#
# MDEV-13351: Server crashes in st_select_lex::set_explain_type upon UNION with window function
#
CREATE TABLE t1 (i INT);
INSERT INTO t1 VALUES (1),(2);
SELECT Nth_value(i,1) OVER() FROM t1
UNION ALL
( SELECT Nth_value(i,2) OVER() FROM t1 LIMIT 0 )
;
Nth_value(i,1) OVER()
1
1
DROP TABLE t1;
#
# Start of 10.3 tests
#
#
...
...
mysql-test/t/win.test
View file @
4fc1f2fb
...
...
@@ -1943,6 +1943,17 @@ INSERT IGNORE INTO t1 VALUES ('foo');
SELECT
(
'bar'
,
1
)
IN
(
SELECT
c
,
ROW_NUMBER
()
OVER
(
PARTITION
BY
c
)
FROM
t1
);
DROP
TABLE
t1
;
--
echo
#
--
echo
# MDEV-13351: Server crashes in st_select_lex::set_explain_type upon UNION with window function
--
echo
#
CREATE
TABLE
t1
(
i
INT
);
INSERT
INTO
t1
VALUES
(
1
),(
2
);
SELECT
Nth_value
(
i
,
1
)
OVER
()
FROM
t1
UNION
ALL
(
SELECT
Nth_value
(
i
,
2
)
OVER
()
FROM
t1
LIMIT
0
)
;
DROP
TABLE
t1
;
--
echo
#
--
echo
# Start of 10.3 tests
--
echo
#
...
...
sql/sql_lex.cc
View file @
4fc1f2fb
...
...
@@ -4507,10 +4507,16 @@ void st_select_lex::set_explain_type(bool on_the_fly)
if
(
join
)
{
bool
uses_cte
=
false
;
for
(
JOIN_TAB
*
tab
=
first_explain_order_tab
(
join
);
tab
;
tab
=
next_explain_order_tab
(
join
,
tab
))
for
(
JOIN_TAB
*
tab
=
first_linear_tab
(
join
,
WITHOUT_BUSH_ROOTS
,
WITH_CONST_TABLES
);
tab
;
tab
=
next_linear_tab
(
join
,
tab
,
WITHOUT_BUSH_ROOTS
))
{
if
(
tab
->
table
&&
tab
->
table
->
pos_in_table_list
->
with
)
/*
pos_in_table_list=NULL for e.g. post-join aggregation JOIN_TABs.
*/
if
(
tab
->
table
&&
tab
->
table
->
pos_in_table_list
&&
tab
->
table
->
pos_in_table_list
->
with
)
{
uses_cte
=
true
;
break
;
...
...
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