Bug #20292 inconsistent range for time data type
| Submitted: | 6 Jun 2006 12:43 | Modified: | 6 Jun 2006 14:43 |
|---|---|---|---|
| Reporter: | Martin Friebe (Gold Quality Contributor) (OCA) | Email Updates: | |
| Status: | Duplicate | Impact on me: | |
| Category: | MySQL Server | Severity: | S3 (Non-critical) |
| Version: | 4.1.21-BK, 4.1.20 and 5.0.22 | OS: | Any (*) |
| Assigned to: | CPU Architecture: | Any |
[6 Jun 2006 12:43]
Martin Friebe
[6 Jun 2006 13:05]
Martin Friebe
A "group by" does also force the value into its limit select sec_to_time(a) from (select 3020399 as a UNION select 3020400 UNION select 4000000 UNION select 4000001) x; select sec_to_time(a) from (select 3020399 as a UNION select 3020400 UNION select 4000000 UNION select 4000001) x group by 1; select sec_to_time(a) from (select 3020399 as a UNION select 3020400 UNION select 4000000 UNION select 4000001) x; +----------------+ | sec_to_time(a) | +----------------+ | 838:59:59 | | 839:00:00 | | 1111:06:40 | | 1111:06:41 | +----------------+ 4 rows in set (0.00 sec) mysql> select sec_to_time(a) from (select 3020399 as a UNION select 3020400 UNION select 4000000 UNION select 4000001) x group by 1; +----------------+ | sec_to_time(a) | +----------------+ | 838:59:59 | +----------------+ 1 row in set, 3 warnings (0.00 sec) This is different as the subquery returns an integer, however I need to get the value from the subqgery as it does not work on a constant item select sec_to_time(3020399+1) from (select 1) x; show warnings; +------------------------+ | sec_to_time(3020399+1) | +------------------------+ | 839:00:00 | +------------------------+ 1 row in set (0.00 sec) Empty set (0.00 sec) mysql> select sec_to_time(3020399+1) from (select 1) x group by 1; show warnings; +------------------------+ | sec_to_time(3020399+1) | +------------------------+ | 839:00:00 | +------------------------+ 1 row in set (0.00 sec) Empty set (0.00 sec)
[6 Jun 2006 14:43]
Valeriy Kravchuk
Thank you for a problem report. Verified just as described with 4.1.21-BK build on Linux. As bug #20203 has assigned developer already, I'll mark this report as a duplicate of it.
Portions of this website are copyright © 2001, 2002 The PHP Group
Page generated in 0.042 sec. using MySQL 8.4.7-u6-cloud
Timestamp references displayed by the system are UTC.
Content reproduced on this site is the property of the
respective copyright holders.
It is not reviewed in advance
by Oracle and does not necessarily represent the opinion of
Oracle or any other party.