diff options
author | Varun Gupta <varunraiko1803@gmail.com> | 2018-04-21 18:38:58 +0530 |
---|---|---|
committer | Varun Gupta <varunraiko1803@gmail.com> | 2018-04-21 18:41:14 +0530 |
commit | 6b1a8b2c722d74d9b3e990f9419a60eb2829f7ef (patch) | |
tree | f2e1753905630df763580b745ce83667214d9f1e /mysql-test/main/win_percentile.test | |
parent | c058117c6c857ecb41960bd705104adc42348645 (diff) | |
download | mariadb-git-6b1a8b2c722d74d9b3e990f9419a60eb2829f7ef.tar.gz |
MDEV-15846: Sever crashed with MEDIAN() window function
Fixed by MDEV-15902, just added the test case for this issue.
Diffstat (limited to 'mysql-test/main/win_percentile.test')
-rw-r--r-- | mysql-test/main/win_percentile.test | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/mysql-test/main/win_percentile.test b/mysql-test/main/win_percentile.test index 233b21d5f01..e39af8cfd39 100644 --- a/mysql-test/main/win_percentile.test +++ b/mysql-test/main/win_percentile.test @@ -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; |