mirror of
https://github.com/MariaDB/server.git
synced 2025-08-01 03:47:19 +03:00
Remove warnings and portability fixes
New global read lock code Fixed bug in DATETIME with WHERE optimization Made UNION code more general.
This commit is contained in:
@ -1210,7 +1210,7 @@ fld1 fld1
|
||||
companynr companyname
|
||||
table type possible_keys key key_len ref rows Extra
|
||||
t2 ALL NULL NULL NULL NULL 1199
|
||||
t4 eq_ref PRIMARY PRIMARY 1 t2.companynr 1 where used; Not exists
|
||||
t4 eq_ref PRIMARY PRIMARY 1 test.t2.companynr 1 where used; Not exists
|
||||
table type possible_keys key key_len ref rows Extra
|
||||
t4 ALL NULL NULL NULL NULL 12
|
||||
t2 ALL NULL NULL NULL NULL 1199 where used; Not exists
|
||||
|
@ -33,3 +33,5 @@ date_format(a,"%Y-%m-%d")=b right(a,6)=c+0 a=d+0
|
||||
1 1 1
|
||||
a
|
||||
0000-00-00 00:00:00
|
||||
id dt
|
||||
1 2001-08-14 00:00:00
|
||||
|
@ -56,5 +56,3 @@ t2 c 1
|
||||
t2 d 1
|
||||
t2 e 1
|
||||
t2 f 1
|
||||
table type possible_keys key key_len ref rows Extra
|
||||
t2 ALL NULL NULL NULL NULL 4
|
||||
|
@ -30,3 +30,12 @@ CREATE TABLE t1 (a datetime not null);
|
||||
insert into t1 values (0);
|
||||
select * from t1 where a is null;
|
||||
drop table t1;
|
||||
|
||||
#
|
||||
# Test with bug when propagating DATETIME to integer and WHERE optimization
|
||||
#
|
||||
|
||||
create table t1 (id int, dt datetime);
|
||||
insert into t1 values (1,"2001-08-14 00:00:00"),(2,"2001-08-15 00:00:00"),(3,"2001-08-16 00:00:00");
|
||||
select * from t1 where dt='2001-08-14 00:00:00' and dt = if(id=1,'2001-08-14 00:00:00','1999-08-15');
|
||||
drop table t1;
|
||||
|
@ -16,17 +16,28 @@ select 0,'#' union select a,b from t1 union all select a,b from t2 union select
|
||||
select a,b from t1 union select a,b from t1;
|
||||
select 't1',b,count(*) from t1 group by b UNION select 't2',b,count(*) from t2 group by b;
|
||||
|
||||
# Test some error conditions with UNION
|
||||
--error 1215
|
||||
explain select a,b from t1 union all select a,b from t2;
|
||||
|
||||
# Test some error conditions with UNION
|
||||
--error 1215
|
||||
select a,b from t1 into outfile 'skr' union select a,b from t2;
|
||||
|
||||
--error 1215
|
||||
select a,b from t1 order by a union select a,b from t2;
|
||||
|
||||
--error 1216
|
||||
create table t3 select a,b from t1 union select a from t2;
|
||||
|
||||
--error 1215
|
||||
insert into t3 select a from t1 order by a union select a from t2;
|
||||
|
||||
--error 1216
|
||||
select a,b from t1 union select a from t2;
|
||||
|
||||
# Test CREATE, INSERT and REPLACE
|
||||
create table t3 select a,b from t1 union all select a,b from t2;
|
||||
insert into t3 select a,b from t1 union all select a,b from t2;
|
||||
replace into t3 select a,b as c from t1 union all select a,b from t2;
|
||||
|
||||
drop table t1,t2,t3;
|
||||
|
Reference in New Issue
Block a user