summaryrefslogtreecommitdiff
path: root/mysql-test/t/innodb_mysql.test
diff options
context:
space:
mode:
authorsergefp@mysql.com <>2006-08-21 14:20:03 +0400
committersergefp@mysql.com <>2006-08-21 14:20:03 +0400
commite3bdd6c6c20aeda1b3206a9a8b61958e06c50ad3 (patch)
treedd7b64569f5ea86ea24467f7a119f80b0e99ee3d /mysql-test/t/innodb_mysql.test
parent270629a1589c1f813d79406389e4690270ace073 (diff)
downloadmariadb-git-e3bdd6c6c20aeda1b3206a9a8b61958e06c50ad3.tar.gz
Fix by Georgi Kodinov:
Bug #18744 Test 'join_outer' fails if "classic" configuration in 5.0 - moved an InnoDB dependent test to the appropriate file
Diffstat (limited to 'mysql-test/t/innodb_mysql.test')
-rw-r--r--mysql-test/t/innodb_mysql.test20
1 files changed, 20 insertions, 0 deletions
diff --git a/mysql-test/t/innodb_mysql.test b/mysql-test/t/innodb_mysql.test
index a2d1edbd4a1..59dbe5e96d4 100644
--- a/mysql-test/t/innodb_mysql.test
+++ b/mysql-test/t/innodb_mysql.test
@@ -282,3 +282,23 @@ explain select distinct f1 a, f1 b from t1;
explain select distinct f1, f2 from t1;
drop table t1;
+#
+# Test for bug #17164: ORed FALSE blocked conversion of outer join into join
+#
+
+CREATE TABLE t1 (id int(11) NOT NULL PRIMARY KEY, name varchar(20),
+ INDEX (name)) ENGINE=InnoDB;
+CREATE TABLE t2 (id int(11) NOT NULL PRIMARY KEY, fkey int(11),
+ FOREIGN KEY (fkey) REFERENCES t2(id)) ENGINE=InnoDB;
+INSERT INTO t1 VALUES (1,'A1'),(2,'A2'),(3,'B');
+INSERT INTO t2 VALUES (1,1),(2,2),(3,2),(4,3),(5,3);
+
+EXPLAIN
+SELECT COUNT(*) FROM t2 LEFT JOIN t1 ON t2.fkey = t1.id
+ WHERE t1.name LIKE 'A%';
+
+EXPLAIN
+SELECT COUNT(*) FROM t2 LEFT JOIN t1 ON t2.fkey = t1.id
+ WHERE t1.name LIKE 'A%' OR FALSE;
+
+DROP TABLE t1,t2;