summaryrefslogtreecommitdiff
path: root/mysql-test/main/win.test
diff options
context:
space:
mode:
authorMarko Mäkelä <marko.makela@mariadb.com>2020-07-15 10:17:15 +0300
committerMarko Mäkelä <marko.makela@mariadb.com>2020-07-15 10:17:15 +0300
commit9936cfd531a49b0ba124c4eb38a6099ec420c7fd (patch)
tree52e3c6dd19846b7ff0d895c31e78bc1e781ca780 /mysql-test/main/win.test
parenta7634281aa64a549d19cd20ead7e80d0267271ee (diff)
parent8a0944080c950349aaf7c81bc8f8c63b262f98eb (diff)
downloadmariadb-git-9936cfd531a49b0ba124c4eb38a6099ec420c7fd.tar.gz
Merge 10.3 into 10.4
Diffstat (limited to 'mysql-test/main/win.test')
-rw-r--r--mysql-test/main/win.test25
1 files changed, 25 insertions, 0 deletions
diff --git a/mysql-test/main/win.test b/mysql-test/main/win.test
index a4b816e7136..7ef505fc3da 100644
--- a/mysql-test/main/win.test
+++ b/mysql-test/main/win.test
@@ -1,6 +1,7 @@
#
# Window Functions Tests
#
+--source include/have_sequence.inc
--disable_warnings
drop table if exists t1,t2;
@@ -2473,6 +2474,30 @@ SELECT FIRST_VALUE(MAX(a) OVER (PARTITION BY a)) OVER (ORDER BY a) AS x FROM t1
DROP TABLE t1;
--echo #
+--echo # MDEV-12059: Assertion `precision > 0' failed with a window function or window aggregate function
+--echo #
+
+CREATE TABLE t1 (d DECIMAL(1,0) UNSIGNED);
+INSERT INTO t1 VALUES (1),(2);
+SELECT MIN(d) OVER () FROM t1;
+DROP TABLE t1;
+
+--echo #
+--echo # MDEV-22463: Element_type &Bounds_checked_array<Item *>::operator[](size_t) [Element_type = Item *]:
+--echo # Assertion `n < m_size' failed
+--echo #
+
+CREATE TABLE t1 (a INT, b INT, c INT, d INT, e INT, f INT, g int, h INT, i INT);
+INSERT INTO t1 SELECT seq,seq,seq,seq, seq,seq,seq,seq,seq FROM seq_1_to_5;
+
+SELECT ROW_NUMBER() OVER w2 FROM t1 WINDOW w2 AS (PARTITION BY -1,0,1,2,3,4,5,6);
+--sorted_result
+SELECT a FROM t1 ORDER BY ROW_NUMBER() OVER (PARTITION BY -1,1,0,2,3,4,5,6,7,8);
+SELECT a,b FROM t1 WINDOW w2 AS (PARTITION BY -1,1,0,2,3,4);
+SELECT ROW_NUMBER() OVER w2 FROM t1 WINDOW w2 AS (PARTITION BY -1,0,1,2,3,4,5,6);
+DROP TABLE t1;
+
+--echo #
--echo # End of 10.2 tests
--echo #