mariadb/mysql-test/r/temporal_scale_4283.result
Sergei Golubchik 8f607aae12 MDEV-4283 Assertion `scale <= precision' fails in strings/decimal.c
with decimals=NOT_FIXED_DEC it is possible to have 'decimals' larger
than 'max_length', it's not an error for temporal functions.
  
But when Item_func_numhybrid converts the value to DECIMAL_RESULT,
it must limit 'decimals' to be a valid scale of a decimal number.
2013-03-18 08:44:24 +01:00

12 lines
384 B
Text

create table t1 (a int);
insert into t1 values (4),(8);
select distinct 100 mod timestampadd( week, a, '2002-05-20' ) from t1;
100 mod timestampadd( week, a, '2002-05-20' )
100
drop table t1;
create table t1 (i int);
insert into t1 values (2),(4);
select distinct convert_tz( '2001-03-21', 'utc', 'met' ) mod i from t1;
convert_tz( '2001-03-21', 'utc', 'met' ) mod i
0
drop table t1;