summaryrefslogtreecommitdiff
path: root/mysql-test/suite/vcol/r/vcol_select_myisam.result
diff options
context:
space:
mode:
authorSergei Golubchik <sergii@pisem.net>2012-02-15 18:08:08 +0100
committerSergei Golubchik <sergii@pisem.net>2012-02-15 18:08:08 +0100
commit25609313ffbd9205e921d0793cf423f711d10ced (patch)
treef04a1c26fabcc5463aca51a860f03131e02d94f7 /mysql-test/suite/vcol/r/vcol_select_myisam.result
parent47a54a2e087a7c1fc861bcbc114c14987f492cfe (diff)
parent764eeeee74f999fe2107fc362236563be0025093 (diff)
downloadmariadb-git-25609313ffbd9205e921d0793cf423f711d10ced.tar.gz
5.3.4 merge
Diffstat (limited to 'mysql-test/suite/vcol/r/vcol_select_myisam.result')
-rw-r--r--mysql-test/suite/vcol/r/vcol_select_myisam.result30
1 files changed, 30 insertions, 0 deletions
diff --git a/mysql-test/suite/vcol/r/vcol_select_myisam.result b/mysql-test/suite/vcol/r/vcol_select_myisam.result
index d4868340ab5..934d047f6bf 100644
--- a/mysql-test/suite/vcol/r/vcol_select_myisam.result
+++ b/mysql-test/suite/vcol/r/vcol_select_myisam.result
@@ -265,3 +265,33 @@ NULL
explain select sum(c) from t1 group by b;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 ALL NULL NULL NULL NULL 5 Using temporary; Using filesort
+#
+# Bug #806057: join with USING over a virtual column
+#
+CREATE TABLE t1 (b int);
+INSERT INTO t1 VALUES (NULL),( 78), (185), (0), (154);
+CREATE TABLE t2 (a int, b int AS (a) VIRTUAL);
+INSERT INTO t2 VALUES (187,187), (9,9), (187,187);
+Warnings:
+Warning 1906 The value specified for computed column 'b' in table 't2' ignored
+Warning 1906 The value specified for computed column 'b' in table 't2' ignored
+Warning 1906 The value specified for computed column 'b' in table 't2' ignored
+EXPLAIN EXTENDED
+SELECT * FROM t1 JOIN t2 USING (b);
+id select_type table type possible_keys key key_len ref rows filtered Extra
+1 SIMPLE t2 ALL NULL NULL NULL NULL 3 100.00
+1 SIMPLE t1 ALL NULL NULL NULL NULL 5 100.00 Using where; Using join buffer (flat, BNL join)
+Warnings:
+Note 1003 select `test`.`t1`.`b` AS `b`,`test`.`t2`.`a` AS `a` from `test`.`t1` join `test`.`t2` where (`test`.`t1`.`b` = `test`.`t2`.`b`)
+SELECT * FROM t1 JOIN t2 USING (b);
+b a
+EXPLAIN EXTENDED
+SELECT * FROM t1 NATURAL JOIN t2;
+id select_type table type possible_keys key key_len ref rows filtered Extra
+1 SIMPLE t2 ALL NULL NULL NULL NULL 3 100.00
+1 SIMPLE t1 ALL NULL NULL NULL NULL 5 100.00 Using where; Using join buffer (flat, BNL join)
+Warnings:
+Note 1003 select `test`.`t1`.`b` AS `b`,`test`.`t2`.`a` AS `a` from `test`.`t1` join `test`.`t2` where (`test`.`t1`.`b` = `test`.`t2`.`b`)
+SELECT * FROM t1 NATURAL JOIN t2;
+b a
+DROP TABLE t1,t2;