~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to tests/r/null_key.result

  • Committer: Brian Aker
  • Date: 2009-07-12 00:49:18 UTC
  • mfrom: (1063.9.51 brian-tmp-fix)
  • Revision ID: brian@gaz-20090712004918-chprmyj387ex6l8a
Merge Stewart

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
drop table if exists t1,t2;
2
 
create table t1 (a int, b int not null,unique key (a,b),index(b)) engine=myisam;
 
2
create temporary table t1 (a int, b int not null,unique key (a,b),index(b)) engine=myisam;
3
3
insert ignore into t1 values (1,1),(2,2),(3,3),(4,4),(5,5),(6,6),(null,7),(9,9),(8,8),(7,7),(null,9),(null,9),(6,6);
4
4
explain select * from t1 where a is null;
5
5
id      select_type     table   type    possible_keys   key     key_len ref     rows    Extra
147
147
6       6       0
148
148
drop table t1;
149
149
drop table t2;
150
 
create table t1 (a int, b int not null,unique key (a,b),index(b)) engine=myisam;
 
150
create temporary table t1 (a int, b int not null,unique key (a,b),index(b)) engine=myisam;
151
151
alter table t1 modify b int null;
152
152
insert into t1 values (7,null), (8,null), (8,7);
153
153
explain select * from t1 where a = 7 and (b=7 or b is null);
222
222
a       a       b
223
223
7       7       NULL
224
224
drop table t1,t2;
225
 
CREATE TABLE t1 (
 
225
CREATE TEMPORARY TABLE t1 (
226
226
id int NOT NULL auto_increment,
227
227
uniq_id int default NULL,
228
228
PRIMARY KEY  (id),
229
229
UNIQUE KEY idx1 (uniq_id)
230
230
) ENGINE=MyISAM;
231
 
CREATE TABLE t2 (
 
231
CREATE TEMPORARY TABLE t2 (
232
232
id int NOT NULL auto_increment,
233
233
uniq_id int default NULL,
234
234
PRIMARY KEY  (id)
274
274
7       3
275
275
8       4
276
276
DROP table t1,t2;
277
 
CREATE TABLE `t1` (
 
277
CREATE TEMPORARY TABLE `t1` (
278
278
`order_id` char(32) NOT NULL default '',
279
279
`product_id` char(32) NOT NULL default '',
280
280
`product_type` int NOT NULL default '0',
281
281
PRIMARY KEY  (`order_id`,`product_id`,`product_type`)
282
282
) ENGINE=MyISAM;
283
 
CREATE TABLE `t2` (
 
283
CREATE TEMPORARY TABLE `t2` (
284
284
`order_id` char(32) NOT NULL default '',
285
285
`product_id` char(32) NOT NULL default '',
286
286
`product_type` int NOT NULL default '0',