diff options
Diffstat (limited to 'mysql-test/t/subselect.test')
-rw-r--r-- | mysql-test/t/subselect.test | 22 |
1 files changed, 12 insertions, 10 deletions
diff --git a/mysql-test/t/subselect.test b/mysql-test/t/subselect.test index a53415e4ffd..c6cc82e5f92 100644 --- a/mysql-test/t/subselect.test +++ b/mysql-test/t/subselect.test @@ -820,16 +820,6 @@ insert into t3 values (3,3), (2,2), (1,1); select a,(select count(distinct t1.b) as sum from t1,t2 where t1.a=t2.a and t2.b > 0 and t1.a <= t3.b group by t1.a order by sum limit 1) from t3; drop table t1,t2,t3; -create table t1 (a char(10) character set koi8r collate koi8r_bin); -create table t2 select (select a from t1); -show create table t2; -drop table t1,t2; - -CREATE TABLE t1 -(s1 CHAR(5) COLLATE latin1_german1_ci, - s2 CHAR(5) COLLATE latin1_swedish_ci); ---error 1265 -SELECT * FROM t1 WHERE s1 = (SELECT s2 FROM t1); drop table t1; # @@ -841,3 +831,15 @@ insert into t1 values (1); insert into t2 values (1); select * from t1 where exists (select s1 from t2 having max(t2.s1)=t1.s1); drop table t1,t2; +# +# update subquery with wrong field (to force name resolving +# in UPDATE name space) +# +create table t1 (s1 int); +create table t2 (s1 int); +insert into t1 values (1); +insert into t2 values (1); +-- error 1109 +update t1 set s1 = s1 + 1 where 1 = (select x.s1 as A from t2 WHERE t2.s1 > t1.s1 order by A); +DROP TABLE t1, t2; + |