From 96f884c03a1d85ec550d15157f99ab70dd7cf19f Mon Sep 17 00:00:00 2001 From: unknown Date: Tue, 23 Aug 2005 22:29:05 +0300 Subject: [PATCH] Test for BUG#6495. The bug itself is fixed by WL#2486. mysql-test/r/select.result: Test for BUG#6495. mysql-test/t/select.test: Test for BUG#6495. --- mysql-test/r/select.result | 12 ++++++++++++ mysql-test/t/select.test | 13 +++++++++++++ 2 files changed, 25 insertions(+) diff --git a/mysql-test/r/select.result b/mysql-test/r/select.result index 47dbdd49db9..83682d87504 100644 --- a/mysql-test/r/select.result +++ b/mysql-test/r/select.result @@ -2875,3 +2875,15 @@ b a t1_val t2_val 1 1 1 1 1 2 2 1 drop table t1, t2, t3; +create table t1 (a char(1)); +create table t2 (a char(1)); +insert into t1 values ('a'),('b'),('c'); +insert into t2 values ('b'),('c'),('d'); +select a from t1 natural join t2; +a +b +c +select * from t1 natural join t2 where a = 'b'; +a +b +drop table t1, t2; diff --git a/mysql-test/t/select.test b/mysql-test/t/select.test index 21fc4c25e61..ebd382b1df1 100644 --- a/mysql-test/t/select.test +++ b/mysql-test/t/select.test @@ -2443,3 +2443,16 @@ insert into t3 values (1,1),(2,1),(3,1),(4,1); select * from t1 natural join t2 natural join t3; select * from t1 natural join t3 natural join t2; drop table t1, t2, t3; + + +# +# Bug #6495 Illogical requirement for column qualification in NATURAL join +# + +create table t1 (a char(1)); +create table t2 (a char(1)); +insert into t1 values ('a'),('b'),('c'); +insert into t2 values ('b'),('c'),('d'); +select a from t1 natural join t2; +select * from t1 natural join t2 where a = 'b'; +drop table t1, t2;