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
6b1a8b2c
Commit
6b1a8b2c
authored
Apr 21, 2018
by
Varun Gupta
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
MDEV-15846: Sever crashed with MEDIAN() window function
Fixed by MDEV-15902, just added the test case for this issue.
parent
c058117c
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
19 additions
and
0 deletions
+19
-0
mysql-test/main/win_percentile.result
mysql-test/main/win_percentile.result
+9
-0
mysql-test/main/win_percentile.test
mysql-test/main/win_percentile.test
+10
-0
No files found.
mysql-test/main/win_percentile.result
View file @
6b1a8b2c
...
...
@@ -339,3 +339,12 @@ MEDIAN(f3) OVER ()
112.0000000000
112.0000000000
DROP TABLE t1;
#
# MDEV-15846: Sever crashed with MEDIAN() window function
#
CREATE TABLE t1 ( pk int PRIMARY KEY, a1 int, a2 int);
SELECT MEDIAN(`a1`) OVER (),
MEDIAN(`a2`) OVER (PARTITION BY `pk`)
FROM t1;
MEDIAN(`a1`) OVER () MEDIAN(`a2`) OVER (PARTITION BY `pk`)
DROP TABLE t1;
mysql-test/main/win_percentile.test
View file @
6b1a8b2c
...
...
@@ -115,5 +115,15 @@ INSERT INTO t1(f1,f2,f3,f4) VALUES
WITH
CTE
AS
(
SELECT
MIN
(
f3
)
OVER
()
FROM
t1
)
SELECT
MEDIAN
(
f3
)
OVER
()
FROM
t1
ORDER
BY
f1
,
f2
,
f3
,
f4
,
v1
;
DROP
TABLE
t1
;
--
echo
#
--
echo
# MDEV-15846: Sever crashed with MEDIAN() window function
--
echo
#
CREATE
TABLE
t1
(
pk
int
PRIMARY
KEY
,
a1
int
,
a2
int
);
SELECT
MEDIAN
(
`a1`
)
OVER
(),
MEDIAN
(
`a2`
)
OVER
(
PARTITION
BY
`pk`
)
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