~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to tests/t/null_key.test

  • 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:
5
5
drop table if exists t1,t2;
6
6
--enable_warnings
7
7
 
8
 
create table t1 (a int, b int not null,unique key (a,b),index(b)) engine=myisam;
 
8
create temporary table t1 (a int, b int not null,unique key (a,b),index(b)) engine=myisam;
9
9
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);
10
10
explain select * from t1 where a is null;
11
11
explain select * from t1 where a is null and b = 2;
87
87
# @TODO Bug in the following RENAME...changing it out for now.
88
88
# rename table t2 to t1;
89
89
drop table t2;
90
 
create table t1 (a int, b int not null,unique key (a,b),index(b)) engine=myisam;
 
90
create temporary table t1 (a int, b int not null,unique key (a,b),index(b)) engine=myisam;
91
91
alter table t1 modify b int null;
92
92
insert into t1 values (7,null), (8,null), (8,7);
93
93
explain select * from t1 where a = 7 and (b=7 or b is null);
133
133
# The following failed for Matt Loschert
134
134
#
135
135
 
136
 
CREATE TABLE t1 (
 
136
CREATE TEMPORARY TABLE t1 (
137
137
  id int NOT NULL auto_increment,
138
138
  uniq_id int default NULL,
139
139
  PRIMARY KEY  (id),
140
140
  UNIQUE KEY idx1 (uniq_id)
141
141
) ENGINE=MyISAM;
142
142
 
143
 
CREATE TABLE t2 (
 
143
CREATE TEMPORARY TABLE t2 (
144
144
  id int NOT NULL auto_increment,
145
145
  uniq_id int default NULL,
146
146
  PRIMARY KEY  (id)
177
177
# This crashed MySQL 3.23.47
178
178
#
179
179
 
180
 
CREATE TABLE `t1` (
 
180
CREATE TEMPORARY TABLE `t1` (
181
181
  `order_id` char(32) NOT NULL default '',
182
182
  `product_id` char(32) NOT NULL default '',
183
183
  `product_type` int NOT NULL default '0',
184
184
  PRIMARY KEY  (`order_id`,`product_id`,`product_type`)
185
185
) ENGINE=MyISAM;
186
 
CREATE TABLE `t2` (
 
186
CREATE TEMPORARY TABLE `t2` (
187
187
  `order_id` char(32) NOT NULL default '',
188
188
  `product_id` char(32) NOT NULL default '',
189
189
  `product_type` int NOT NULL default '0',