summaryrefslogtreecommitdiff
path: root/mysql-test/r
diff options
context:
space:
mode:
authorunknown <monty@hundin.mysql.fi>2002-10-17 11:39:11 +0300
committerunknown <monty@hundin.mysql.fi>2002-10-17 11:39:11 +0300
commit5d2e98ff5f29bbad52b7b57319ba0542b5d94d48 (patch)
treed161390278c18d0d52db3a76f4d39a24b7c29770 /mysql-test/r
parentf64428be11b4cf2006c8998b251195dfac565a36 (diff)
parent620b2e6e8b42d62cecec69b696c9781faa86d29e (diff)
downloadmariadb-git-5d2e98ff5f29bbad52b7b57319ba0542b5d94d48.tar.gz
merge
Docs/world.sql: Auto merged sql/mysql_priv.h: Auto merged sql/sql_parse.cc: Auto merged sql/sql_select.cc: Auto merged
Diffstat (limited to 'mysql-test/r')
-rw-r--r--mysql-test/r/heap_btree.result2
-rw-r--r--mysql-test/r/select.result10
-rw-r--r--mysql-test/r/subselect.result24
3 files changed, 31 insertions, 5 deletions
diff --git a/mysql-test/r/heap_btree.result b/mysql-test/r/heap_btree.result
index 0e8a32bd7b7..846a852738b 100644
--- a/mysql-test/r/heap_btree.result
+++ b/mysql-test/r/heap_btree.result
@@ -73,8 +73,8 @@ type=heap;
insert into t1 values (1,1),(2,2),(1,3),(2,4),(2,5),(2,6);
select * from t1 where x=1;
x y
-1 1
1 3
+1 1
select * from t1,t1 as t2 where t1.x=t2.y;
x y x y
1 1 1 1
diff --git a/mysql-test/r/select.result b/mysql-test/r/select.result
index 925f754f203..3a15e419fa5 100644
--- a/mysql-test/r/select.result
+++ b/mysql-test/r/select.result
@@ -3266,6 +3266,16 @@ select wss_type from t1 where wss_type =102935229216544093;
wss_type
102935229216544093
drop table t1;
+select 1+2,"aaaa",3.13*2.0 into @a,@b,@c;
+select @a;
+@a
+3
+select @b;
+@b
+aaaa
+select @c;
+@c
+6.26
create table t1 (a int not null auto_increment primary key);
insert into t1 values ();
insert into t1 values ();
diff --git a/mysql-test/r/subselect.result b/mysql-test/r/subselect.result
index c365c2ed434..2dcafe2c9cb 100644
--- a/mysql-test/r/subselect.result
+++ b/mysql-test/r/subselect.result
@@ -54,9 +54,9 @@ explain select * from t2 where t2.b=(select a from t3 order by 1 desc limit 1)
union (select * from t4 where t4.b=(select max(t2.a)*4 from t2) order by a);
id select_type table type possible_keys key key_len ref rows Extra
1 PRIMARY t2 ALL NULL NULL NULL NULL 2 where used
+2 SUBSELECT t3 ALL NULL NULL NULL NULL 3 Using filesort
3 UNION t4 ALL NULL NULL NULL NULL 3 where used; Using filesort
4 SUBSELECT t2 ALL NULL NULL NULL NULL 2
-2 SUBSELECT t3 ALL NULL NULL NULL NULL 3 Using filesort
select (select a from t3 where a<t2.a*4 order by 1 desc limit 1), a from t2;
(select a from t3 where a<t2.a*4 order by 1 desc limit 1) a
3 1
@@ -163,9 +163,7 @@ UNIQUE KEY `email` (`email`)
INSERT INTO inscrit (pseudo,email) VALUES ('joce','test');
INSERT INTO inscrit (pseudo,email) VALUES ('joce1','test1');
INSERT INTO inscrit (pseudo,email) VALUES ('2joce1','2test1');
-EXPLAIN SELECT pseudo,(SELECT email FROM inscrit WHERE pseudo=(SELECT
-pseudo FROM inscrit WHERE pseudo='joce')) FROM inscrit WHERE pseudo=(SELECT
-pseudo FROM inscrit WHERE pseudo='joce');
+EXPLAIN SELECT pseudo,(SELECT email FROM inscrit WHERE pseudo=(SELECT pseudo FROM inscrit WHERE pseudo='joce')) FROM inscrit WHERE pseudo=(SELECT pseudo FROM inscrit WHERE pseudo='joce');
id select_type table type possible_keys key key_len ref rows Extra
1 PRIMARY inscrit const PRIMARY PRIMARY 35 const 1
4 SUBSELECT inscrit const PRIMARY PRIMARY 35 const 1
@@ -183,3 +181,21 @@ joce
SELECT pseudo FROM inscrit WHERE pseudo=(SELECT pseudo FROM inscrit WHERE pseudo LIKE '%joce%');
Subselect returns more than 1 record
drop table if exists t1,t2,t3,t4,t5,attend,clinic,inscrit;
+drop table if exists searchconthardwarefr3;
+CREATE TABLE `searchconthardwarefr3` (
+`topic` mediumint(8) unsigned NOT NULL default '0',
+`date` date NOT NULL default '0000-00-00',
+`pseudo` varchar(35) character set latin1 NOT NULL default '',
+PRIMARY KEY (`pseudo`,`date`,`topic`),
+KEY `topic` (`topic`)
+) TYPE=MyISAM ROW_FORMAT=DYNAMIC;
+INSERT INTO searchconthardwarefr3 (topic,date,pseudo) VALUES
+('43506','2002-10-02','joce'),('40143','2002-08-03','joce');
+EXPLAIN SELECT DISTINCT date FROM searchconthardwarefr3 WHERE date='2002-08-03';
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE searchconthardwarefr3 index NULL PRIMARY 41 NULL 2 where used; Using index
+EXPLAIN SELECT (SELECT DISTINCT date FROM searchconthardwarefr3 WHERE date='2002-08-03');
+id select_type table type possible_keys key key_len ref rows Extra
+1 PRIMARY No tables used
+2 SUBSELECT searchconthardwarefr3 index NULL PRIMARY 41 NULL 2 where used; Using index
+drop table searchconthardwarefr3;