1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-27 18:02:13 +03:00

MDEV-16991 Rounding vs truncation for TIME, DATETIME, TIMESTAMP

This commit is contained in:
Alexander Barkov
2018-11-23 19:04:42 +04:00
parent 27f3329ff6
commit 4447a02cf1
59 changed files with 4774 additions and 398 deletions

View File

@ -476,10 +476,14 @@ select @@sql_mode;
@@sql_mode
REAL_AS_FLOAT,PIPES_AS_CONCAT,ANSI_QUOTES,IGNORE_SPACE,NO_TABLE_OPTIONS,ANSI
set sql_mode=2147483648*2*2*2;
ERROR 42000: Variable 'sql_mode' can't be set to the value of '17179869184'
select @@sql_mode;
@@sql_mode
REAL_AS_FLOAT,PIPES_AS_CONCAT,ANSI_QUOTES,IGNORE_SPACE,NO_TABLE_OPTIONS,ANSI
TIME_ROUND_FRACTIONAL
set sql_mode=2147483648*2*2*2*2;
ERROR 42000: Variable 'sql_mode' can't be set to the value of '34359738368'
select @@sql_mode;
@@sql_mode
TIME_ROUND_FRACTIONAL
set sql_mode=PAD_CHAR_TO_FULL_LENGTH;
create table t1 (a int auto_increment primary key, b char(5));
insert into t1 (b) values('a'),('b\t'),('c ');