mirror of
https://github.com/MariaDB/server.git
synced 2025-01-17 12:32:27 +01:00
MDEV-15846: Sever crashed with MEDIAN() window function
Fixed by MDEV-15902, just added the test case for this issue.
This commit is contained in:
parent
c058117c6c
commit
6b1a8b2c72
2 changed files with 20 additions and 1 deletions
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue