Commit e5a9a17b authored by unknown's avatar unknown

Merge polly.local:/tmp/maint/bug20293/my51-bug20293

into  polly.local:/home/kaa/src/maint/mysql-5.1-maint


mysql-test/r/func_time.result:
  Manual merge.
mysql-test/t/func_time.test:
  Manual merge.
parents feff0058 aeb16245
...@@ -1218,6 +1218,10 @@ t1 t2 SEC_TO_TIME( TIME_TO_SEC( t2 ) - TIME_TO_SEC( t1 ) ) QUARTER(d) ...@@ -1218,6 +1218,10 @@ t1 t2 SEC_TO_TIME( TIME_TO_SEC( t2 ) - TIME_TO_SEC( t1 ) ) QUARTER(d)
11:00:00 11:15:00 00:15:00 1 11:00:00 11:15:00 00:15:00 1
10:00:00 NULL NULL NULL 10:00:00 NULL NULL NULL
DROP TABLE t1; DROP TABLE t1;
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
End of 5.0 tests End of 5.0 tests
select date_sub("0050-01-01 00:00:01",INTERVAL 2 SECOND); select date_sub("0050-01-01 00:00:01",INTERVAL 2 SECOND);
date_sub("0050-01-01 00:00:01",INTERVAL 2 SECOND) date_sub("0050-01-01 00:00:01",INTERVAL 2 SECOND)
......
...@@ -724,6 +724,13 @@ SELECT t1, t2, SEC_TO_TIME( TIME_TO_SEC( t2 ) - TIME_TO_SEC( t1 ) ), QUARTER(d) ...@@ -724,6 +724,13 @@ SELECT t1, t2, SEC_TO_TIME( TIME_TO_SEC( t2 ) - TIME_TO_SEC( t1 ) ), QUARTER(d)
SELECT t1, t2, SEC_TO_TIME( TIME_TO_SEC( t2 ) - TIME_TO_SEC( t1 ) ), QUARTER(d) SELECT t1, t2, SEC_TO_TIME( TIME_TO_SEC( t2 ) - TIME_TO_SEC( t1 ) ), QUARTER(d)
FROM t1 ORDER BY a DESC; FROM t1 ORDER BY a DESC;
DROP TABLE t1; DROP TABLE t1;
#
# 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;
--echo End of 5.0 tests --echo End of 5.0 tests
# #
......
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