1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-01 03:47:19 +03:00

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
This commit is contained in:
unknown
2002-06-19 17:52:44 +03:00
parent 454712d20e
commit c6a2ae17a0
8 changed files with 235 additions and 79 deletions

View File

@ -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

View File

@ -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;

View File

@ -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;