Commit cccad802 authored by unknown's avatar unknown
Browse files

Added a test case for bug #20293 "group by cuts off value from time_format"

parent 0c10457e
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -1207,3 +1207,7 @@ SET NAMES DEFAULT;
select str_to_date('10:00 PM', '%h:%i %p') + INTERVAL 10 MINUTE;
str_to_date('10:00 PM', '%h:%i %p') + INTERVAL 10 MINUTE
NULL
SELECT TIME_FORMAT(SEC_TO_TIME(a),"%H:%i:%s") FROM (SELECT 3020399 AS a UNION SELECT 3020398 ) x GROUP BY 1;
TIME_FORMAT(SEC_TO_TIME(a),"%H:%i:%s")
838:59:58
838:59:59
+8 −0
Original line number Diff line number Diff line
@@ -713,3 +713,11 @@ SET NAMES DEFAULT;
#

select str_to_date('10:00 PM', '%h:%i %p') + INTERVAL 10 MINUTE;


#
# Bug #20293: group by cuts off value from time_format
#
# Check if using GROUP BY with TIME_FORMAT() produces correct results

SELECT TIME_FORMAT(SEC_TO_TIME(a),"%H:%i:%s") FROM (SELECT 3020399 AS a UNION SELECT 3020398 ) x GROUP BY 1;