summaryrefslogtreecommitdiff
path: root/mysql-test/main/win.test
diff options
context:
space:
mode:
authorMarko Mäkelä <marko.makela@mariadb.com>2019-08-16 10:51:20 +0300
committerMarko Mäkelä <marko.makela@mariadb.com>2019-08-16 10:51:20 +0300
commitc221bcdce7714a74b89a02de941e8d8df2994ce3 (patch)
tree87a4e2d595ea3cc1465f212f26a9b9030655aa0c /mysql-test/main/win.test
parent3bbf008096fc997556459442bc2503c504248345 (diff)
parent395e1dcd176bbf0fcdb5d156bc58604590245a26 (diff)
downloadmariadb-git-c221bcdce7714a74b89a02de941e8d8df2994ce3.tar.gz
Merge 10.3 into 10.4
Diffstat (limited to 'mysql-test/main/win.test')
-rw-r--r--mysql-test/main/win.test23
1 files changed, 23 insertions, 0 deletions
diff --git a/mysql-test/main/win.test b/mysql-test/main/win.test
index 01b8f17b0f2..3d5fb2240de 100644
--- a/mysql-test/main/win.test
+++ b/mysql-test/main/win.test
@@ -2359,6 +2359,29 @@ INSERT INTO t1 VALUES ('00:00:01'),('00:00:02');
SELECT *, LEAD(d) OVER (ORDER BY d) AS x FROM t1;
DROP TABLE t1;
+
+--echo #
+--echo # MDEV-20351 Window function BIT_OR() OVER (..) return a wrong data type
+--echo #
+CREATE TABLE t1 (pk INT, a INT, b BIGINT UNSIGNED);
+INSERT INTO t1 VALUES (1, 0, 1), (2, 0, 18446744073709551615);
+
+CREATE TABLE t2 AS
+SELECT pk, a, bit_or(b) AS bit_or FROM t1 GROUP BY pk;
+SHOW CREATE TABLE t2;
+SELECT * FROM t1;
+DROP TABLE t2;
+
+CREATE OR REPLACE TABLE t2 AS
+SELECT pk, a, BIT_OR(b) OVER (PARTITION BY a ORDER BY pk ROWS BETWEEN 1 PRECEDING AND 1 FOLLOWING) AS bit_or
+ FROM t1;
+SHOW CREATE TABLE t2;
+SELECT * FROM t2;
+DROP TABLE t2;
+
+DROP TABLE t1;
+
+
--echo #
--echo # End of 10.3 tests
--echo #