~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to tests/t/join.test

  • Committer: Brian Aker
  • Date: 2009-07-11 19:23:04 UTC
  • mfrom: (1089.1.14 merge)
  • Revision ID: brian@gaz-20090711192304-ootijyl5yf9jq9kd
Merge Brian

Show diffs side-by-side

added added

removed removed

Lines of Context:
67
67
  count int DEFAULT '0' NOT NULL,
68
68
  qty int,
69
69
  phone char(1) DEFAULT '' NOT NULL,
70
 
  timestamp datetime DEFAULT '0000-00-00 00:00:00' NOT NULL,
 
70
  timestamp datetime,
71
71
  PRIMARY KEY (id),
72
72
  KEY token (token(15)),
73
73
  KEY timestamp (timestamp),
145
145
# TEST LEFT JOIN with DATE columns
146
146
#
147
147
 
148
 
CREATE TABLE t1 (d DATE NOT NULL);
149
 
CREATE TABLE t2 (d DATE NOT NULL);
150
 
INSERT INTO t1 (d) VALUES ('2001-08-01'),('0000-00-00');
 
148
CREATE TABLE t1 (d DATE);
 
149
CREATE TABLE t2 (d DATE);
 
150
INSERT INTO t1 (d) VALUES ('2001-08-01'),(NULL);
151
151
SELECT * FROM t1 LEFT JOIN t2 USING (d) WHERE t2.d IS NULL;
152
152
SELECT * FROM t1 LEFT JOIN t2 USING (d) WHERE d IS NULL;
153
153
SELECT * from t1 WHERE t1.d IS NULL;
243
243
) ENGINE=MyISAM;
244
244
INSERT INTO t1 VALUES (12,5,'Percent','Cost',-1,0,-1,-1),(14,4,'Percent','Cost',-1,0,-1,-1),(18,5,'Percent','Cost',-1,0,-1,-1),(19,4,'Percent','Cost',-1,0,-1,-1),(20,5,'Percent','Cost',100,-1,22,291),(21,5,'Percent','Cost',100,-1,18,291),(22,1,'Percent','Cost',100,-1,6,291),(23,1,'Percent','Cost',100,-1,21,291),(24,1,'Percent','Cost',100,-1,9,291),(25,1,'Percent','Cost',100,-1,4,291),(26,1,'Percent','Cost',100,-1,20,291),(27,4,'Percent','Cost',100,-1,7,202),(28,1,'Percent','Cost',50,-1,-1,137),(29,2,'Percent','Cost',100,-1,4,354),(30,2,'Percent','Cost',100,-1,9,137),(93,2,'Cost','Cost',-1,10000000,-1,-1);
245
245
CREATE TABLE t2 (
246
 
  id int unsigned NOT NULL auto_increment,
 
246
  id int NOT NULL auto_increment,
247
247
  name varchar(255) default NULL,
248
248
  PRIMARY KEY  (id)
249
249
) ENGINE=MyISAM;