348
348
create table t1 (d date, dt datetime, t timestamp, c char(10));
349
349
insert into t1 values (null, null, null, null);
350
350
insert into t1 values ("0000-00-00", "0000-00-00", "0000-00-00", "0000-00-00");
352
352
select dayofyear("0000-00-00"),dayofyear(d),dayofyear(dt),dayofyear(t),dayofyear(c) from t1;
353
353
ERROR HY000: Received an invalid datetime value '0000-00-00'.
354
354
select dayofmonth("0000-00-00"),dayofmonth(d),dayofmonth(dt),dayofmonth(t),dayofmonth(c) from t1;