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

MDEV-27712 Reduce the size of Lex_length_and_dec_st from 16 to 8

User visible change:
Removing the length specified by user from error messages:
ER_TOO_BIG_SCALE and ER_TOO_BIG_PRECISION
as discussed with Sergei.
This commit is contained in:
Alexander Barkov
2022-02-09 17:59:38 +04:00
parent ab1a792571
commit d25b10fede
34 changed files with 367 additions and 175 deletions

View File

@ -24,9 +24,9 @@ select time_to_sec(sec_to_time(11111)), time_to_sec(sec_to_time(11111.22222));
time_to_sec(sec_to_time(11111)) 11111
time_to_sec(sec_to_time(11111.22222)) 11111.22222
select current_timestamp(7);
ERROR 42000: Too big precision 7 specified for 'current_timestamp'. Maximum is 6
ERROR 42000: Too big precision specified for 'current_timestamp'. Maximum is 6
select curtime(7);
ERROR 42000: Too big precision 7 specified for 'curtime'. Maximum is 6
ERROR 42000: Too big precision specified for 'curtime'. Maximum is 6
drop table if exists t1;
create table t1 select sec_to_time(12345), sec_to_time(12345.6789),
sec_to_time(1234567e-2), now(), curtime(0),
@ -161,7 +161,7 @@ select cast(cast(@a as time(2)) as time(6));
cast(cast(@a as time(2)) as time(6))
12:13:14.120000
select CAST(@a AS DATETIME(7));
ERROR 42000: Too big precision 7 specified for '@`a`'. Maximum is 6
ERROR 42000: Too big precision specified for '@`a`'. Maximum is 6
SELECT CONVERT_TZ('2011-01-02 12:00:00', '+00:00', '+03:00');
CONVERT_TZ('2011-01-02 12:00:00', '+00:00', '+03:00')
2011-01-02 15:00:00