1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-30 16:24:05 +03:00

Merge bk@192.168.21.1:/usr/home/bk/mysql-5.0

into mysql.com:/home/hf/work/mysql-5.0.9551
This commit is contained in:
unknown
2005-11-03 16:19:46 +04:00
5 changed files with 72 additions and 1 deletions

View File

@ -3201,3 +3201,43 @@ a b c
select * from t1 join t2 straight_join t3 on (t1.a=t3.c);
a b c
drop table t1, t2 ,t3;
create table t1(f1 int, f2 date);
insert into t1 values(1,'2005-01-01'),(2,'2005-09-01'),(3,'2005-09-30'),
(4,'2005-10-01'),(5,'2005-12-30');
select * from t1 where f2 >= 0;
f1 f2
1 2005-01-01
2 2005-09-01
3 2005-09-30
4 2005-10-01
5 2005-12-30
select * from t1 where f2 >= '0000-00-00';
f1 f2
1 2005-01-01
2 2005-09-01
3 2005-09-30
4 2005-10-01
5 2005-12-30
select * from t1 where f2 >= '2005-09-31';
f1 f2
4 2005-10-01
5 2005-12-30
select * from t1 where f2 >= '2005-09-3a';
f1 f2
4 2005-10-01
5 2005-12-30
Warnings:
Warning 1292 Incorrect date value: '2005-09-3a' for column 'f2' at row 1
select * from t1 where f2 <= '2005-09-31';
f1 f2
1 2005-01-01
2 2005-09-01
3 2005-09-30
select * from t1 where f2 <= '2005-09-3a';
f1 f2
1 2005-01-01
2 2005-09-01
3 2005-09-30
Warnings:
Warning 1292 Incorrect date value: '2005-09-3a' for column 'f2' at row 1
drop table t1;

View File

@ -2711,3 +2711,21 @@ select * from t1 join t2 left join t3 on (t1.a=t3.c);
select * from t1 join t2 right join t3 on (t1.a=t3.c);
select * from t1 join t2 straight_join t3 on (t1.a=t3.c);
drop table t1, t2 ,t3;
#
# Bug #14093 Query takes a lot of time when date format is not valid
# fix optimizes execution. so here we just check that returned set is
# correct.
create table t1(f1 int, f2 date);
insert into t1 values(1,'2005-01-01'),(2,'2005-09-01'),(3,'2005-09-30'),
(4,'2005-10-01'),(5,'2005-12-30');
# should return all records
select * from t1 where f2 >= 0;
select * from t1 where f2 >= '0000-00-00';
# should return 4,5
select * from t1 where f2 >= '2005-09-31';
select * from t1 where f2 >= '2005-09-3a';
# should return 1,2,3
select * from t1 where f2 <= '2005-09-31';
select * from t1 where f2 <= '2005-09-3a';
drop table t1;