~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to tests/r/null_key.result

  • Committer: Monty Taylor
  • Date: 2011-02-13 17:26:39 UTC
  • mfrom: (2157.2.2 give-in-to-pkg-config)
  • mto: This revision was merged to the branch mainline in revision 2166.
  • Revision ID: mordred@inaugust.com-20110213172639-nhy7i72sfhoq13ms
Merged in pkg-config fixes.

Show diffs side-by-side

added added

removed removed

Lines of Context:
83
83
  KEY `b` (`b`)
84
84
) ENGINE=MyISAM COLLATE = utf8_general_ci
85
85
insert into t2 select * from t1;
86
 
alter table t1 modify b blob not null, add c int not null, drop key a, add unique key (a,b(20),c), drop key b, add key (b(10));
 
86
alter table t1 modify b blob not null, add c int DEFAULT 42 not null, drop key a, add unique key (a,b(20),c), drop key b, add key (b(10));
87
87
explain select * from t1 where a is null and b = 2;
88
88
id      select_type     table   type    possible_keys   key     key_len ref     rows    Extra
89
89
1       SIMPLE  t1      ref     a,b     a       5       const   X       Using where
125
125
1       SIMPLE  t1      range   b       b       12      NULL    X       Using where
126
126
select * from t1 where a is null;
127
127
a       b       c
128
 
NULL    7       0
129
 
NULL    9       0
130
 
NULL    9       0
 
128
NULL    7       42
 
129
NULL    9       42
 
130
NULL    9       42
131
131
select * from t1 where a is null and b = 7 and c=0;
132
132
a       b       c
133
 
NULL    7       0
134
133
select * from t1 where a<=>b limit 2;
135
134
a       b       c
136
 
1       1       0
137
 
2       2       0
 
135
1       1       42
 
136
2       2       42
138
137
select * from t1 where (a is null or a > 0 and a < 3) and b < 5 limit 3;
139
138
a       b       c
140
 
1       1       0
141
 
2       2       0
 
139
1       1       42
 
140
2       2       42
142
141
select * from t1 where (a is null or a > 0 and a < 3) and b > 7 limit 3;
143
142
a       b       c
144
 
NULL    9       0
145
 
NULL    9       0
 
143
NULL    9       42
 
144
NULL    9       42
146
145
select * from t1 where (a is null or a = 7) and b=7 and c=0;
147
146
a       b       c
148
 
7       7       0
149
 
NULL    7       0
150
147
select * from t1 where a is null and b=9 or a is null and b=7 limit 3;
151
148
a       b       c
152
 
NULL    7       0
153
 
NULL    9       0
154
 
NULL    9       0
 
149
NULL    7       42
 
150
NULL    9       42
 
151
NULL    9       42
155
152
select * from t1 where b like "6%";
156
153
a       b       c
157
 
6       6       0
 
154
6       6       42
158
155
drop table t1;
159
156
drop table t2;
160
157
create temporary table t1 (a int, b int not null,unique key (a,b),index(b)) engine=myisam;