mariadb/mysql-test/main/cache_temporal_4265.result
Sergei Petrunia e709eb9bf7 Merge branch '10.2' into 10.3
# Conflicts:
#	mysql-test/suite/galera/r/MW-388.result
#	mysql-test/suite/galera/t/MW-388.test
#	mysql-test/suite/innodb/r/truncate_inject.result
#	mysql-test/suite/innodb/t/truncate_inject.test
#	mysql-test/suite/rpl/r/rpl_stop_slave.result
#	mysql-test/suite/rpl/t/rpl_stop_slave.test
#	sql/sp_head.cc
#	sql/sp_head.h
#	sql/sql_lex.cc
#	sql/sql_yacc.yy
#	storage/xtradb/buf/buf0dblwr.cc
2020-01-17 00:46:40 +03:00

22 lines
711 B
Text

create table t1 (a date);
insert t1 values ('2000-01-02'), ('2001-02-03'), ('2002-03-04');
SET STATEMENT debug_dbug='d,str_to_datetime_warn' for
select * from t1 where a > date_add('2000-01-01', interval 5 day);
a
2001-02-03
2002-03-04
Warnings:
Note 1003 2000-01-01
drop table t1;
create table t1 (id int not null, ut timestamp(6) not null);
insert into t1 values(1, '2001-01-01 00:00:00.2');
insert into t1 values(1, '2001-01-01 00:00:00.1');
select * from t1;
id ut
1 2001-01-01 00:00:00.200000
1 2001-01-01 00:00:00.100000
select (select max(m2.ut) from t1 m2 where m1.id <> 0) from t1 m1;
(select max(m2.ut) from t1 m2 where m1.id <> 0)
2001-01-01 00:00:00.200000
2001-01-01 00:00:00.200000
drop table t1;