diff options
author | Varun Gupta <varun.gupta@mariadb.com> | 2020-12-14 21:03:07 +0530 |
---|---|---|
committer | Varun Gupta <varun.gupta@mariadb.com> | 2020-12-18 12:54:33 +0530 |
commit | dc1f28e78c22fde6a6446445a6574ab0dd7fcf93 (patch) | |
tree | 44493f3c88404faa4925660ca5a8ee1769d52eb4 /mysql-test/t/win.test | |
parent | cc16977aa84edcca540fdef0db8af67479165aef (diff) | |
download | mariadb-git-10.2-wf.tar.gz |
MDEV-15296: wrong result with window function inside a subquery10.2-wf
Window Functions were treated as a constant in a dependent tables less subquery.
Made sure that the behaviour of window functions is same as the aggregate function
for dependent tables less subquery.
Also propagted Item::with_window_func for few missing cases.
Diffstat (limited to 'mysql-test/t/win.test')
-rw-r--r-- | mysql-test/t/win.test | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/mysql-test/t/win.test b/mysql-test/t/win.test index b1a8277c575..9d2c67bf478 100644 --- a/mysql-test/t/win.test +++ b/mysql-test/t/win.test @@ -2554,5 +2554,14 @@ SELECT 1 UNION SELECT a FROM t1 ORDER BY (row_number() over ()); DROP TABLE t1; --echo # +--echo # MDEV-15296: wrong result with window function inside a subquery +--echo # + +CREATE TABLE t1(a INT); +INSERT INTO t1 VALUES (1), (2); +SELECT (SELECT SUM(a) OVER (partition BY a)) FROM t1; +DROP TABLE t1; + +--echo # --echo # End of 10.2 tests --echo # |