mirror of
https://github.com/MariaDB/server.git
synced 2026-04-30 20:25:32 +02:00
lp:740173 5.1-micro reports incorrect Length metadata for TIME expressions
This commit is contained in:
parent
e2d71ef3e6
commit
8d2738367e
3 changed files with 15 additions and 1 deletions
|
|
@ -210,3 +210,9 @@ f1
|
|||
DROP VIEW v1;
|
||||
DROP TABLE t1;
|
||||
End of 5.0 tests
|
||||
select cast('01:01:01' as time), cast('01:01:01' as time(2));
|
||||
Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr
|
||||
def cast('01:01:01' as time) 11 9 8 Y 128 0 63
|
||||
def cast('01:01:01' as time(2)) 11 12 11 Y 128 2 63
|
||||
cast('01:01:01' as time) cast('01:01:01' as time(2))
|
||||
01:01:01 01:01:01.00
|
||||
|
|
|
|||
|
|
@ -143,3 +143,11 @@ DROP VIEW v1;
|
|||
DROP TABLE t1;
|
||||
|
||||
--echo End of 5.0 tests
|
||||
|
||||
--enable_metadata
|
||||
|
||||
#
|
||||
# lp:740173 5.1-micro reports incorrect Length metadata for TIME expressions
|
||||
#
|
||||
select cast('01:01:01' as time), cast('01:01:01' as time(2));
|
||||
|
||||
|
|
|
|||
|
|
@ -698,7 +698,7 @@ public:
|
|||
{
|
||||
collation.set(&my_charset_bin);
|
||||
maybe_null= 1;
|
||||
max_length= MAX_TIME_WIDTH;
|
||||
max_length= MIN_TIME_WIDTH;
|
||||
if (decimals == NOT_FIXED_DEC)
|
||||
decimals= args[0]->decimals;
|
||||
if (decimals && decimals != NOT_FIXED_DEC)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue