~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to tests/t/join_outer_innodb.test

  • Committer: Patrick Galbraith
  • Date: 2008-07-24 16:57:40 UTC
  • mto: (202.2.4 rename-mysql-to-drizzle)
  • mto: This revision was merged to the branch mainline in revision 212.
  • Revision ID: patg@ishvara-20080724165740-x58yw6zs6d9o17lf
Most everything working with client rename
mysqlslap test still fails... can't connect to the server

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
#
2
 
# test of left outer join for tests that depends on innodb
3
 
#
4
 
 
5
 
--source include/have_innodb.inc
6
 
 
7
 
#
8
 
# Test for bug #17164: ORed FALSE blocked conversion of outer join into join
9
 
10
 
 
11
 
CREATE TABLE t1 (id int NOT NULL PRIMARY KEY, name varchar(20),
12
 
                 INDEX (name)) ENGINE=InnoDB;
13
 
CREATE TABLE t2 (id int NOT NULL PRIMARY KEY, fkey int,
14
 
                 FOREIGN KEY (fkey) REFERENCES t2(id)) ENGINE=InnoDB;
15
 
INSERT INTO t1 VALUES (1,'A1'),(2,'A2'),(3,'B');
16
 
INSERT INTO t2 VALUES (1,1),(2,2),(3,2),(4,3),(5,3);
17
 
 
18
 
EXPLAIN
19
 
SELECT COUNT(*) FROM t2 LEFT JOIN t1 ON t2.fkey = t1.id 
20
 
  WHERE t1.name LIKE 'A%';
21
 
 
22
 
EXPLAIN
23
 
SELECT COUNT(*) FROM t2 LEFT JOIN t1 ON t2.fkey = t1.id 
24
 
  WHERE t1.name LIKE 'A%' OR FALSE;
25
 
 
26
 
DROP TABLE t1,t2;