summaryrefslogtreecommitdiff
path: root/mysql-test/suite/vcol/r
diff options
context:
space:
mode:
authorIgor Babaev <igor@askmonty.org>2012-02-01 15:48:02 -0800
committerIgor Babaev <igor@askmonty.org>2012-02-01 15:48:02 -0800
commit7b79d8a33f56d178c78209f910a0694807a63f8f (patch)
tree3d4a8131e8688c6599461bfce72bb87c718a53e4 /mysql-test/suite/vcol/r
parent7ed15e6e50aec65560d8988fc5713f1f489b6616 (diff)
parent81690cf326e09799ca77d9f7bc5601905b706548 (diff)
downloadmariadb-git-7b79d8a33f56d178c78209f910a0694807a63f8f.tar.gz
Merge 5.2->5.3 in preparation for the release of mariadb-5.3.4-rc.
Diffstat (limited to 'mysql-test/suite/vcol/r')
-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 3ad15009c76..ea3cbd3bc11 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;