1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-30 16:24:05 +03:00

Fixed bug mdev-10875.

Now, after the implementation of mdev-8646
"Re-engineer the code for post-join operations"
create_sort_index() can be called for subqueries.
This commit is contained in:
Igor Babaev
2017-01-30 11:56:23 -08:00
parent 1d96b09890
commit 81c1abe8cf
3 changed files with 32 additions and 3 deletions

View File

@ -1426,3 +1426,19 @@ select * from v4;
drop view v1,v2,v3,v4;
drop table t0,t1;
--echo #
--echo # MDEV-10875: window function in subquery
--echo #
CREATE TABLE t1 (i INT);
INSERT INTO t1 VALUES (3),(1);
CREATE TABLE t2 (c VARCHAR(8));
INSERT INTO t2 VALUES ('foo'),('bar'),('foo');
SELECT COUNT(*) OVER (PARTITION BY c) FROM t2;
SELECT * FROM t1 WHERE i IN ( SELECT COUNT(*) OVER (PARTITION BY c) FROM t2 );
DROP TABLE t1, t2;