diff options
author | unknown <bell@sanja.is.com.ua> | 2002-06-19 17:52:44 +0300 |
---|---|---|
committer | unknown <bell@sanja.is.com.ua> | 2002-06-19 17:52:44 +0300 |
commit | c6a2ae17a01d1f93257ea1ce5af0513d870585b0 (patch) | |
tree | cc55f99d5599771fbb2ddecda5ce0467fd2ede67 /mysql-test | |
parent | 454712d20e89b34e2c45973f3d601f4720c3e471 (diff) | |
download | mariadb-git-c6a2ae17a01d1f93257ea1ce5af0513d870585b0.tar.gz |
EXISTS type of subselect
more correct parameters in result creation script
mysql-test/create-test-result:
more correct parameters in result creation script
mysql-test/r/subselect.result:
test of EXISTS
mysql-test/t/subselect.test:
test of EXISTS
sql/item_subselect.cc:
EXISTS type of subselect
sql/item_subselect.h:
EXISTS type of subselect
sql/sql_class.cc:
EXISTS type of subselect
sql/sql_class.h:
EXISTS type of subselect
sql/sql_yacc.yy:
EXISTS type of subselect
Diffstat (limited to 'mysql-test')
-rwxr-xr-x | mysql-test/create-test-result | 2 | ||||
-rw-r--r-- | mysql-test/r/subselect.result | 7 | ||||
-rw-r--r-- | mysql-test/t/subselect.test | 2 |
3 files changed, 10 insertions, 1 deletions
diff --git a/mysql-test/create-test-result b/mysql-test/create-test-result index bfd64f32fc5..a50b4c87641 100755 --- a/mysql-test/create-test-result +++ b/mysql-test/create-test-result @@ -32,7 +32,7 @@ result_file=$RESULT_DIR/$test_name.result touch $result_file echo "Running the test case against empty file, will fail, but don't worry" -./mysql-test-run --do-test=$test_name +./mysql-test-run --local $test_name reject_file=$result_file.reject diff --git a/mysql-test/r/subselect.result b/mysql-test/r/subselect.result index 2e40d0a92d8..37a66993ef2 100644 --- a/mysql-test/r/subselect.result +++ b/mysql-test/r/subselect.result @@ -67,4 +67,11 @@ b (select avg(t2.a+(select min(t3.a) from t3 where t3.a >= t4.a)) from t2) 8 7.5000 8 6.0000 9 5.5000 +select * from t3 where exists (select * from t2 where t2.b=t3.a); +a +7 +select * from t3 where not exists (select * from t2 where t2.b=t3.a); +a +6 +3 drop table t1,t2,t3,t4; diff --git a/mysql-test/t/subselect.test b/mysql-test/t/subselect.test index c94522fde8f..78300dc3e09 100644 --- a/mysql-test/t/subselect.test +++ b/mysql-test/t/subselect.test @@ -26,4 +26,6 @@ select * from t1 where t1.a=(select t2.a from t2 where t2.b=(select max(a) from select * from t1 where t1.a=(select t2.a from t2 where t2.b=(select max(a) from t3 where t3.a > t1.a) order by 1 desc limit 1); select * from t1 where t1.a=(select t2.a from t2 where t2.b=(select max(a) from t3 where t3.a < t1.a) order by 1 desc limit 1); select b,(select avg(t2.a+(select min(t3.a) from t3 where t3.a >= t4.a)) from t2) from t4; +select * from t3 where exists (select * from t2 where t2.b=t3.a); +select * from t3 where not exists (select * from t2 where t2.b=t3.a); drop table t1,t2,t3,t4; |