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
457f3b99
Commit
457f3b99
authored
Sep 23, 2016
by
Igor Babaev
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added the test case for bug mdev-9941 that was fixed some time ago.
parent
4872ec61
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
70 additions
and
0 deletions
+70
-0
mysql-test/r/win.result
mysql-test/r/win.result
+43
-0
mysql-test/t/win.test
mysql-test/t/win.test
+27
-0
No files found.
mysql-test/r/win.result
View file @
457f3b99
...
@@ -2142,3 +2142,46 @@ pk a d sum_1 sum_2
...
@@ -2142,3 +2142,46 @@ pk a d sum_1 sum_2
10 2 0.800 1.700 2.400
10 2 0.800 1.700 2.400
11 2 0.900 0.900 2.800
11 2 0.900 0.900 2.800
drop table t1;
drop table t1;
#
# MDEV-9941: two window functions with compatible partitions
#
create table t1 (
a int,
b int,
c int
);
insert into t1 values
(10, 1, 1),
(10, 3, 10),
(10, 1, 10),
(10, 3, 100),
(10, 5, 1000),
(10, 1, 100);
explain format=json
select
a,b,c,
row_number() over (partition by a),
row_number() over (partition by a, b)
from t1;
EXPLAIN
{
"query_block": {
"select_id": 1,
"window_functions_computation": {
"sorts": {
"filesort": {
"sort_key": "t1.a, t1.b"
}
},
"temporary_table": {
"table": {
"table_name": "t1",
"access_type": "ALL",
"rows": 6,
"filtered": 100
}
}
}
}
}
drop table t1;
mysql-test/t/win.test
View file @
457f3b99
...
@@ -1310,3 +1310,30 @@ select pk, a, d,
...
@@ -1310,3 +1310,30 @@ select pk, a, d,
from
t1
;
from
t1
;
drop
table
t1
;
drop
table
t1
;
--
echo
#
--
echo
# MDEV-9941: two window functions with compatible partitions
--
echo
#
create
table
t1
(
a
int
,
b
int
,
c
int
);
insert
into
t1
values
(
10
,
1
,
1
),
(
10
,
3
,
10
),
(
10
,
1
,
10
),
(
10
,
3
,
100
),
(
10
,
5
,
1000
),
(
10
,
1
,
100
);
explain
format
=
json
select
a
,
b
,
c
,
row_number
()
over
(
partition
by
a
),
row_number
()
over
(
partition
by
a
,
b
)
from
t1
;
drop
table
t1
;
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