summaryrefslogtreecommitdiff
path: root/mysql-test/t
diff options
context:
space:
mode:
Diffstat (limited to 'mysql-test/t')
-rw-r--r--mysql-test/t/select.test14
1 files changed, 14 insertions, 0 deletions
diff --git a/mysql-test/t/select.test b/mysql-test/t/select.test
index fb04562a173..3d5ffd185ba 100644
--- a/mysql-test/t/select.test
+++ b/mysql-test/t/select.test
@@ -4211,3 +4211,17 @@ SELECT t2.f23 FROM
DROP TABLE t1,t2,t3,t4,t5,t6,t7;
--echo End of 5.1 tests
+
+--echo #
+--echo # BUG#776274: substitution of a single row table
+--echo #
+
+CREATE TABLE t1 (a int NOT NULL , b int);
+INSERT INTO t1 VALUES (2,2);
+
+SELECT * FROM t1 WHERE a = b;
+EXPLAIN
+SELECT * FROM t1 WHERE a = b;
+
+DROP TABLE t1;
+