Bug #67793 MySQL ODBC drivers incorrectly returns TIME columns, where value > '99:59:59'
| Submitted: | 3 Dec 2012 7:42 | Modified: | 23 Jul 2013 15:31 |
|---|---|---|---|
| Reporter: | [ name withheld ] | Email Updates: | |
| Status: | Closed | Impact on me: | |
| Category: | Connector / ODBC | Severity: | S2 (Serious) |
| Version: | 5.2.2 | OS: | Any |
| Assigned to: | Bogdan Degtyariov | CPU Architecture: | Any |
[3 Dec 2012 7:42]
[ name withheld ]
[6 Dec 2012 12:28]
[ name withheld ]
Problem may be in utility.c in function str_to_time_st:
ts->hour= digit(buff[0])*10+digit(buff[1]);
ts->minute= digit(buff[2])*10+digit(buff[3]);
ts->second= digit(buff[4])*10+digit(buff[5]);
here is hard coded, that hours are 2 digits only, but it is not ok.
[16 Jan 2013 11:18]
Bogdan Degtyariov
Verified using 5.2.3
[16 Jan 2013 11:53]
Bogdan Degtyariov
Patch and test case
Attachment: bug67793.patch (application/octet-stream, text), 2.40 KiB.
[20 Jun 2013 6:18]
Bogdan Degtyariov
Pushed to the revision 1149 of Connector/ODBC 5.2.
[23 Jul 2013 15:31]
Daniel So
Added an entry to the Connector/ODBC 5.2.6 changelog: When reading TIME column data using the SQLGetData method into the SQL_C_TYPE_TIME datatype, errors occured when the time string contained more than 6-digits (e.g., 120:53:44).
Portions of this website are copyright © 2001, 2002 The PHP Group
Page generated in 0.039 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.