summaryrefslogtreecommitdiff
path: root/mysql-test/r/subselect4.result
diff options
context:
space:
mode:
authorSergei Golubchik <sergii@pisem.net>2014-02-26 15:28:07 +0100
committerSergei Golubchik <sergii@pisem.net>2014-02-26 15:28:07 +0100
commit0dc23679c867629ded5f9534d2ab6e8edf238aa0 (patch)
tree9cf966507fa2ef0fd17932b600d051df5f7bd2e5 /mysql-test/r/subselect4.result
parent6efa5efa7dd112b6ac2efdd84235a13cca51c4d4 (diff)
parent0b9a0a3517ca2b75655f3af5c372cf333d3d5fe2 (diff)
downloadmariadb-git-0dc23679c867629ded5f9534d2ab6e8edf238aa0.tar.gz
10.0-base merge
Diffstat (limited to 'mysql-test/r/subselect4.result')
-rw-r--r--mysql-test/r/subselect4.result27
1 files changed, 27 insertions, 0 deletions
diff --git a/mysql-test/r/subselect4.result b/mysql-test/r/subselect4.result
index 2c826cc9172..66d3fa6214a 100644
--- a/mysql-test/r/subselect4.result
+++ b/mysql-test/r/subselect4.result
@@ -2304,6 +2304,33 @@ WHERE a='r' AND (c,b) NOT IN (SELECT c,b FROM t2 WHERE (c,b)=(t.c,t.b));
a b c d
DROP TABLE t1, t2;
#
+# MDEV-5468: assertion failure with a simplified condition in subselect
+#
+CREATE TABLE t1 (a int, b int) ENGINE=MyISAM;
+INSERT INTO t1 VALUES (1,1);
+CREATE TABLE t2 ( pk int PRIMARY KEY, c INT) ENGINE=MyISAM;
+INSERT INTO t2 VALUES (1,4), (2,6);
+SELECT ( SELECT MAX(b) FROM t1, t2 WHERE pk = a AND b < from_sq.c ) AS select_sq,
+COUNT( DISTINCT from_sq.c )
+FROM ( SELECT DISTINCT t2_1.* FROM t2 AS t2_1, t2 AS t2_2 ) AS from_sq
+GROUP BY select_sq ;
+select_sq COUNT( DISTINCT from_sq.c )
+1 2
+DROP TABLE t1,t2;
+CREATE TABLE t1 (id int, a2 char(2), a3 char(3)) ENGINE=MyISAM;
+INSERT INTO t1 VALUES (1,'BE','BEL');
+CREATE TABLE t2 (id int, a2 char(2), a3 char(3)) ENGINE=MyISAM;
+INSERT INTO t2 VALUES (1,'BE','BEL'), (2,'MX','MEX');
+CREATE VIEW v2 AS SELECT DISTINCT * FROM t2;
+SELECT * FROM t1 AS outer_t1, v2
+WHERE v2.a3 = outer_t1.a3
+AND EXISTS ( SELECT * FROM t1 WHERE a2 < v2.a2 AND id = outer_t1.id )
+AND outer_t1.a3 < 'J'
+ORDER BY v2.id;
+id a2 a3 id a2 a3
+DROP VIEW v2;
+DROP TABLE t1,t2;
+#
# MDEV-3899 Valgrind warnings (blocks are definitely lost) in filesort on IN subquery with SUM and DISTINCT
#
CREATE TABLE t1 (a INT) ENGINE=MyISAM;