diff options
author | unknown <bell@laptop.sanja.is.com.ua> | 2003-10-11 17:41:15 +0300 |
---|---|---|
committer | unknown <bell@laptop.sanja.is.com.ua> | 2003-10-11 17:41:15 +0300 |
commit | 87ce2aa098dcc1a8f3511ff07260638c83bf62c0 (patch) | |
tree | 30867fa7fa3151d4972556261ae0d4dd193fa75b /mysql-test/t | |
parent | e41e9e55128f02ca64b49a0eb9390768e0efe3ce (diff) | |
download | mariadb-git-87ce2aa098dcc1a8f3511ff07260638c83bf62c0.tar.gz |
more resonable errors about name resolving in subqueries (BUG#1483)
mysql-test/r/subselect.result:
more resonable errors about name resolving in subqueries
mysql-test/t/subselect.test:
more resonable errors about name resolving in subqueries
sql/item.cc:
more resonable errors about name resolving in subqueries
Diffstat (limited to 'mysql-test/t')
-rw-r--r-- | mysql-test/t/subselect.test | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/mysql-test/t/subselect.test b/mysql-test/t/subselect.test index 9ba91c7e0a6..ad18e1279df 100644 --- a/mysql-test/t/subselect.test +++ b/mysql-test/t/subselect.test @@ -693,7 +693,7 @@ INSERT INTO t1 VALUES (1); UPDATE t1 SET i=i+(SELECT MAX(i) FROM (SELECT 1) t) WHERE i=(SELECT MAX(i)); -- error 1111 UPDATE t1 SET i=i+1 WHERE i=(SELECT MAX(i)); --- error 1109 +-- error 1054 UPDATE t1 SET t.i=i+(SELECT MAX(i) FROM (SELECT 1) t); drop table t1; @@ -887,7 +887,7 @@ create table t1 (s1 int); create table t2 (s1 int); insert into t1 values (1); insert into t2 values (1); --- error 1109 +-- error 1054 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; @@ -965,3 +965,16 @@ insert into t2 values (2,2), (2,1), (3,3), (3,1); select * from t3 where a > all (select max(b) from t2 group by a); explain select * from t3 where a > all (select max(b) from t2 group by a); drop table if exists t2, t3; + +# +# unresolved field error +# +create table t1 (s1 int); +create table t2 (s1 int); +-- error 1054 +select * from t1 where (select count(*) from t2 where t1.s2) = 1; +-- error 1054 +select * from t1 where (select count(*) from t2 group by t1.s2) = 1; +-- error 1109 +select count(*) from t2 group by t1.s2; +drop table t1, t2;
\ No newline at end of file |