diff options
author | unknown <msvensson@pilot.blaudden> | 2007-03-21 14:30:47 +0100 |
---|---|---|
committer | unknown <msvensson@pilot.blaudden> | 2007-03-21 14:30:47 +0100 |
commit | 2176fef44694e7980c39c536640a62b87517994d (patch) | |
tree | fc91790b327404a804ed62021d2a2491d2092551 /mysql-test/r/select.result | |
parent | 971f15f83f13dd61d967fffc8d305c3a2ff8f6d1 (diff) | |
parent | 20554a6c356f8badcc55213f2f4a0f5d9933fa70 (diff) | |
download | mariadb-git-2176fef44694e7980c39c536640a62b87517994d.tar.gz |
Merge bk-internal:/home/bk/mysql-5.0-maint
into pilot.blaudden:/home/msvensson/mysql/mysql-5.0-maint
BitKeeper/etc/ignore:
auto-union
BitKeeper/deleted/.del-init_db.sql~e2b8d0c8390e8023:
Auto merged
BitKeeper/deleted/.del-test_db.sql:
Auto merged
mysql-test/install_test_db.sh:
Auto merged
mysql-test/mysql-test-run.pl:
Auto merged
scripts/make_binary_distribution.sh:
Auto merged
sql/mysql_priv.h:
Auto merged
sql/sql_acl.h:
Auto merged
netware/Makefile.am:
Manual merge
Diffstat (limited to 'mysql-test/r/select.result')
-rw-r--r-- | mysql-test/r/select.result | 47 |
1 files changed, 47 insertions, 0 deletions
diff --git a/mysql-test/r/select.result b/mysql-test/r/select.result index c3132a1b5f6..31d15981d93 100644 --- a/mysql-test/r/select.result +++ b/mysql-test/r/select.result @@ -3628,6 +3628,15 @@ id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE t2 range si,ai si 5 NULL 2 Using where 1 SIMPLE t3 eq_ref PRIMARY,ci PRIMARY 4 test.t2.a 1 Using where DROP TABLE t1,t2,t3; +CREATE TABLE t1 (a INT, b INT, KEY (a)); +INSERT INTO t1 VALUES (1,1),(2,2); +EXPLAIN SELECT 1 FROM t1 WHERE a = 1; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 ref a a 5 const 1 Using where; Using index +EXPLAIN SELECT 1 FROM t1 IGNORE INDEX FOR JOIN (a) WHERE a = 1; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 ALL NULL NULL NULL NULL 2 Using where +DROP TABLE t1; CREATE TABLE t1 ( f1 int primary key, f2 int, f3 int, f4 int, f5 int, f6 int, checked_out int); CREATE TABLE t2 ( f11 int PRIMARY KEY ); INSERT INTO t1 VALUES (1,1,1,0,0,0,0),(2,1,1,3,8,1,0),(3,1,1,4,12,1,0); @@ -3933,4 +3942,42 @@ cc cc 7 aa aa 2 aa aa 2 DROP TABLE t1,t2; +CREATE TABLE t1 ( +access_id int NOT NULL default '0', +name varchar(20) default NULL, +rank int NOT NULL default '0', +KEY idx (access_id) +); +CREATE TABLE t2 ( +faq_group_id int NOT NULL default '0', +faq_id int NOT NULL default '0', +access_id int default NULL, +UNIQUE KEY idx1 (faq_id), +KEY idx2 (faq_group_id,faq_id) +); +INSERT INTO t1 VALUES +(1,'Everyone',2),(2,'Help',3),(3,'Technical Support',1),(4,'Chat User',4); +INSERT INTO t2 VALUES +(261,265,1),(490,494,1); +SELECT t2.faq_id +FROM t1 INNER JOIN t2 IGNORE INDEX (idx1) +ON (t1.access_id = t2.access_id) +LEFT JOIN t2 t +ON (t.faq_group_id = t2.faq_group_id AND +find_in_set(t.access_id, '1,4') < find_in_set(t2.access_id, '1,4')) +WHERE +t2.access_id IN (1,4) AND t.access_id IS NULL AND t2.faq_id in (265); +faq_id +265 +SELECT t2.faq_id +FROM t1 INNER JOIN t2 +ON (t1.access_id = t2.access_id) +LEFT JOIN t2 t +ON (t.faq_group_id = t2.faq_group_id AND +find_in_set(t.access_id, '1,4') < find_in_set(t2.access_id, '1,4')) +WHERE +t2.access_id IN (1,4) AND t.access_id IS NULL AND t2.faq_id in (265); +faq_id +265 +DROP TABLE t1,t2; End of 5.0 tests |