mirror of
https://github.com/MariaDB/server.git
synced 2026-01-06 05:22:24 +03:00
MDEV-437 Microseconds: In time functions precision is calculated modulo 256
store the precision in uint, not uint8
This commit is contained in:
@@ -1897,3 +1897,5 @@ cast(greatest(cast("0-0-0" as date), cast("10:20:05" as time)) as datetime(6))
|
||||
select microsecond('12:00:00.123456'), microsecond('2009-12-31 23:59:59.000010');
|
||||
microsecond('12:00:00.123456') microsecond('2009-12-31 23:59:59.000010')
|
||||
123456 10
|
||||
select now(258);
|
||||
ERROR 42000: Too big precision 258 specified for 'now'. Maximum is 6.
|
||||
|
||||
@@ -1142,3 +1142,5 @@ select cast(greatest(cast("0-0-0" as date), cast("10:20:05" as time)) as datetim
|
||||
|
||||
select microsecond('12:00:00.123456'), microsecond('2009-12-31 23:59:59.000010');
|
||||
|
||||
--error ER_TOO_BIG_PRECISION
|
||||
select now(258);
|
||||
|
||||
@@ -582,8 +582,8 @@ public:
|
||||
calls.
|
||||
*/
|
||||
uint name_length; /* Length of name */
|
||||
uint decimals;
|
||||
int8 marker;
|
||||
uint8 decimals;
|
||||
bool maybe_null; /* If item may be null */
|
||||
bool in_rollup; /* If used in GROUP BY list
|
||||
of a query with ROLLUP */
|
||||
|
||||
Reference in New Issue
Block a user