1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-29 05:21:33 +03:00

Merge mysql.com:/home/ram/work/b31249/b31249.5.0

into  mysql.com:/home/ram/work/b31249/b31249.5.1
This commit is contained in:
ramil/ram@ramil.myoffice.izhnet.ru
2007-10-09 16:21:27 +05:00
4 changed files with 52 additions and 5 deletions

View File

@ -436,6 +436,20 @@ f1
Warnings:
Warning 1292 Incorrect datetime value: '0000-00-00 45:44:44'
drop table t1;
create table t1 (a tinyint);
insert into t1 values (), (), ();
select sum(a) from t1 group by convert(a, datetime);
sum(a)
NULL
select convert(a, datetime) from t1;
Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr
def convert(a, datetime) 12 29 0 Y 128 6 63
convert(a, datetime)
NULL
NULL
NULL
drop table t1;
End of 5.0 tests
set @org_mode=@@sql_mode;
create table t1 (da date default '1962-03-03 23:33:34', dt datetime default '1962-03-03');
Warnings:

View File

@ -293,6 +293,19 @@ insert into t1 set f1 = '15:44:44';
select * from t1 where (convert(f1,datetime)) != 1;
drop table t1;
#
# Bug #31249: problem with convert(..., datetime)
#
create table t1 (a tinyint);
insert into t1 values (), (), ();
select sum(a) from t1 group by convert(a, datetime);
--enable_metadata
select convert(a, datetime) from t1;
--disable_metadata
drop table t1;
--echo End of 5.0 tests
#
# Test of storing datetime into date fields
#