summaryrefslogtreecommitdiff
path: root/mysql-test/r
diff options
context:
space:
mode:
authorunknown <bell@sanja.is.com.ua>2002-11-28 19:29:26 +0200
committerunknown <bell@sanja.is.com.ua>2002-11-28 19:29:26 +0200
commit6f80b711692d99d5d197cece8fe978eab6f1f3ec (patch)
tree00a9de3df37ec79df37b41b63cb2971efe86b0a1 /mysql-test/r
parent5a1b9e1d05ec4c52e89df1adf40312a55f8b7d3f (diff)
downloadmariadb-git-6f80b711692d99d5d197cece8fe978eab6f1f3ec.tar.gz
fixed * without tables in IN bug
fixed sunction-test select in IN bug fixed unions in subselect bug include/mysqld_error.h: new warning mysql-test/r/subselect.result: test of * without tables in IN test of sunction-test select in IN test of unions in subselect mysql-test/t/subselect.test: test of * without tables in IN test of sunction-test select in IN test of unions in subselect sql/item.cc: fixed * substitution without tables sql/item_subselect.cc: fixed subselect rewriting with function-test subselect sql/item_subselect.h: mechanism for subselect removing sql/share/czech/errmsg.txt: new warning sql/share/danish/errmsg.txt: new warning sql/share/dutch/errmsg.txt: new warning sql/share/english/errmsg.txt: new warning sql/share/estonian/errmsg.txt: new warning sql/share/french/errmsg.txt: new warning sql/share/german/errmsg.txt: new warning sql/share/greek/errmsg.txt: new warning sql/share/hungarian/errmsg.txt: new warning sql/share/italian/errmsg.txt: new warning sql/share/japanese/errmsg.txt: new warning sql/share/korean/errmsg.txt: new warning sql/share/norwegian-ny/errmsg.txt: new warning sql/share/norwegian/errmsg.txt: new warning sql/share/polish/errmsg.txt: new warning sql/share/portuguese/errmsg.txt: new warning sql/share/romanian/errmsg.txt: new warning sql/share/russian/errmsg.txt: new warning sql/share/serbian/errmsg.txt: new warning sql/share/slovak/errmsg.txt: new warning sql/share/spanish/errmsg.txt: new warning sql/share/swedish/errmsg.txt: new warning sql/share/ukrainian/errmsg.txt: new warning sql/sql_base.cc: fixed case on no name field in UNION subselect sql/sql_lex.cc: mechanisp of removing single subselect for optimisation purposes sql/sql_lex.h: mechanisp of removing single subselect for optimisation purposes sql/sql_parse.cc: error handling sql/sql_union.cc: fixed unions in subselect sql/sql_yacc.yy: fixed Lex->describe flag appearence
Diffstat (limited to 'mysql-test/r')
-rw-r--r--mysql-test/r/subselect.result27
1 files changed, 27 insertions, 0 deletions
diff --git a/mysql-test/r/subselect.result b/mysql-test/r/subselect.result
index 990c313686a..21ff3876f7c 100644
--- a/mysql-test/r/subselect.result
+++ b/mysql-test/r/subselect.result
@@ -513,3 +513,30 @@ x y
4 2
2 1
drop table t1, t2;
+SELECT * FROM (SELECT 1) WHERE 1 IN (SELECT *);
+No tables used
+drop table if exists t;
+CREATE TABLE t (id int(11) default NULL, KEY id (id)) TYPE=MyISAM CHARSET=latin1;
+INSERT INTO t VALUES (1),(2);
+SELECT * FROM t WHERE id IN (SELECT 1);
+id
+1
+EXPLAIN SELECT * FROM t WHERE id IN (SELECT 1);
+id select_type table type possible_keys key key_len ref rows Extra
+1 PRIMARY t ref id id 5 const 1 Using where; Using index
+Warnings:
+Note 1246 Select 2 was reduced during optimisation
+SELECT * FROM t WHERE id IN (SELECT 1 UNION SELECT 3);
+id
+1
+EXPLAIN SELECT * FROM t WHERE id IN (SELECT 1 UNION SELECT 3);
+id select_type table type possible_keys key key_len ref rows Extra
+1 PRIMARY t index NULL id 5 NULL 2 Using where; Using index
+2 DEPENDENT SUBSELECT No tables used
+3 UNION No tables used
+SELECT * FROM t WHERE id IN (SELECT 5 UNION SELECT 3);
+id
+SELECT * FROM t WHERE id IN (SELECT 5 UNION SELECT 2);
+id
+2
+drop table if exists t;