mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
Fix '%h', '%I', and '%l' format specifiers in TIME_FORMAT()
to handle large time values as documented. (Bug #10590) mysql-test/r/func_time.result: Add new results mysql-test/t/func_time.test: Add new regression test sql/item_timefunc.cc: Fix handling of '%h', '%I', and '%l' format specifiers for TIME_FORMAT() to handle large time values correctly.
This commit is contained in:
@ -688,3 +688,6 @@ id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE NULL NULL NULL NULL NULL NULL NULL No tables used
|
||||
Warnings:
|
||||
Note 1003 select timestamp_diff(WEEK,_latin1'2001-02-01',_latin1'2001-05-01') AS `a1`,timestamp_diff(SECOND_FRAC,_latin1'2001-02-01 12:59:59.120000',_latin1'2001-05-01 12:58:58.119999') AS `a2`
|
||||
select time_format('100:00:00', '%H %k %h %I %l');
|
||||
time_format('100:00:00', '%H %k %h %I %l')
|
||||
100 100 04 04 4
|
||||
|
@ -336,3 +336,9 @@ DROP TABLE t1;
|
||||
|
||||
explain extended select timestampdiff(SQL_TSI_WEEK, '2001-02-01', '2001-05-01') as a1,
|
||||
timestampdiff(SQL_TSI_FRAC_SECOND, '2001-02-01 12:59:59.120000', '2001-05-01 12:58:58.119999') as a2;
|
||||
|
||||
#
|
||||
# Bug #10590: %h, %I, and %l format specifies should all return results in
|
||||
# the 0-11 range
|
||||
#
|
||||
select time_format('100:00:00', '%H %k %h %I %l');
|
||||
|
Reference in New Issue
Block a user