diff options
author | unknown <monty@mysql.com> | 2004-12-06 11:38:56 +0200 |
---|---|---|
committer | unknown <monty@mysql.com> | 2004-12-06 11:38:56 +0200 |
commit | 796bd7de96a1d1ec422708b90df5328388201c10 (patch) | |
tree | a7bb331b7dac7ac2b3cda915e99bb8c1333f4fec /mysql-test/t/subselect.test | |
parent | 289d3b2ee0f912dd4f128e1c61685d7bb170eb90 (diff) | |
parent | f8cdf570979c550ef04c53f691118ed2b1296a7c (diff) | |
download | mariadb-git-796bd7de96a1d1ec422708b90df5328388201c10.tar.gz |
Merge with 4.1
BitKeeper/etc/ignore:
auto-union
BitKeeper/etc/logging_ok:
auto-union
BUILD/SETUP.sh:
Auto merged
Build-tools/Do-compile:
Auto merged
client/mysqladmin.cc:
Auto merged
configure.in:
Auto merged
innobase/include/lock0lock.h:
Auto merged
innobase/os/os0file.c:
Auto merged
libmysqld/Makefile.am:
Auto merged
mysql-test/mysql-test-run.sh:
Auto merged
mysql-test/r/ctype_ucs.result:
Auto merged
mysql-test/r/heap.result:
Auto merged
mysql-test/r/insert_select.result:
Auto merged
mysql-test/r/lowercase_table3.result:
Auto merged
mysql-test/r/rpl_start_stop_slave.result:
Auto merged
mysql-test/r/subselect.result:
Auto merged
mysql-test/t/ctype_ucs.test:
Auto merged
mysql-test/t/rpl_until.test:
Auto merged
mysql-test/t/subselect.test:
Auto merged
ndb/src/kernel/blocks/dblqh/DblqhMain.cpp:
Auto merged
sql/field.cc:
Auto merged
sql/field.h:
Auto merged
sql/ha_myisam.h:
Auto merged
sql/handler.cc:
Auto merged
sql/handler.h:
Auto merged
sql/item.h:
Auto merged
sql/item_cmpfunc.cc:
Auto merged
sql/item_func.cc:
Auto merged
sql/lock.cc:
Auto merged
sql/log_event.h:
Auto merged
sql/mysql_priv.h:
Auto merged
sql/mysqld.cc:
Auto merged
sql/set_var.cc:
Auto merged
sql/slave.cc:
Auto merged
sql/slave.h:
Auto merged
sql/sql_acl.cc:
Auto merged
sql/sql_base.cc:
Auto merged
sql/sql_class.h:
Auto merged
sql/sql_db.cc:
Auto merged
sql/sql_delete.cc:
Auto merged
sql/sql_prepare.cc:
Auto merged
sql/sql_rename.cc:
Auto merged
sql/sql_select.cc:
Auto merged
sql/sql_show.cc:
Auto merged
sql/sql_update.cc:
Auto merged
sql/sql_yacc.yy:
Auto merged
sql/log_event.cc:
Merge with 4.1
Trivial cleanup
Diffstat (limited to 'mysql-test/t/subselect.test')
-rw-r--r-- | mysql-test/t/subselect.test | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/mysql-test/t/subselect.test b/mysql-test/t/subselect.test index 9cf9f13cfea..daef4c3e281 100644 --- a/mysql-test/t/subselect.test +++ b/mysql-test/t/subselect.test @@ -1306,3 +1306,38 @@ explain select a from t1 where c=2; do @a:= (select sum(a) from t1 where b > @b); explain select a from t1 where c=2; drop table t1; + +# +# Subselect in non-select command just after connection +# +connect (root,localhost,root,,test,$MASTER_MYPORT,$MASTER_MYSOCK); +connection root; +set @got_val= (SELECT 1 FROM (SELECT 'A' as my_col) as T1 ) ; + +# +# primary query with temporary table and subquery with groupping +# +create table t1 (a int, b int); +create table t2 (a int, b int); +insert into t1 values (1,1),(1,2),(1,3),(2,4),(2,5); +insert into t2 values (1,3),(2,1); +select distinct a,b, (select max(b) from t2 where t1.b=t2.a) from t1 order by t1.b; +drop table t1, t2; + +# +# subqueries with full text search +# +create table t1 (id int); +create table t2 (id int, body text, fulltext (body)); +insert into t1 values(1),(2),(3); +insert into t2 values (1,'test'), (2,'mysql'), (3,'test'), (4,'test'); +select count(distinct id) from t1 where id in (select id from t2 where match(body) against ('mysql' in boolean mode)); +drop table t2,t1; + +# +# Equal operation under row and empty subquery +# +create table t1 (s1 int,s2 int); +insert into t1 values (20,15); +select * from t1 where (('a',null) <=> (select 'a',s2 from t1 where s1 = 0)); +drop table t1; |