Commit 6a3c0007 authored by kaa@polly.local's avatar kaa@polly.local

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

parent b1a9115d
...@@ -1207,3 +1207,7 @@ SET NAMES DEFAULT; ...@@ -1207,3 +1207,7 @@ SET NAMES DEFAULT;
select str_to_date('10:00 PM', '%h:%i %p') + INTERVAL 10 MINUTE; 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 str_to_date('10:00 PM', '%h:%i %p') + INTERVAL 10 MINUTE
NULL 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
...@@ -713,3 +713,11 @@ SET NAMES DEFAULT; ...@@ -713,3 +713,11 @@ SET NAMES DEFAULT;
# #
select str_to_date('10:00 PM', '%h:%i %p') + INTERVAL 10 MINUTE; 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;
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment