Bug #37342 | ODBC TIMESTAMP string format not handled properly by ODBC driver | ||
---|---|---|---|
Submitted: | 11 Jun 2008 13:25 | Modified: | 8 Jul 2008 9:54 |
Reporter: | Anders Karlsson | Email Updates: | |
Status: | Closed | Impact on me: | |
Category: | Connector / ODBC | Severity: | S3 (Non-critical) |
Version: | 5.1.4r1107 | OS: | Any |
Assigned to: | Jim Winstead | CPU Architecture: | Any |
[11 Jun 2008 13:25]
Anders Karlsson
[12 Jun 2008 9:18]
Tonci Grgin
Hi Anders and thanks for your report. When using date constants in SQL queries, the {d 'date value'} syntax is no longer needed for date comparisons. For example, the following query SELECT * FROM invoice WHERE invoice_date > {d '2008-06-01'} can now be written as SELECT * FROM invoice WHERE invoice_date > '2008-06-01' The main point being that ODBC standard changed in that way that it now allows dates and times SQL server can understand to be passed in form server understands (see http://msdn.microsoft.com/en-us/library/ms180878.aspx for example) thus your request seems obsolete to me. Anyway, if you would like, change severity to S4 "Feature request" and I can set it to verified then.
[12 Jun 2008 18:45]
Jim Winstead
Tonci, this happens when {dt '...'} is used as a parameter to a statement, not directly within the statement. It's a real bug.
[12 Jun 2008 18:45]
Jim Winstead
Fix problems with SQL_TYPE_TIME and SQL_TYPE_TIMESTAMP parameters
Attachment: bug37342.patch (text/plain), 3.46 KiB.
[13 Jun 2008 6:53]
Tonci Grgin
Thanks Jim.
[16 Jun 2008 6:01]
Jess Balint
Patch committed as rev 1119 and will be released in 5.1.5.
[8 Jul 2008 9:54]
Tony Bedford
An entry has been added to the 5.1.5 Changelog: ODBC TIMESTAMP string format is not handled properly by the MyODBC driver. When passing a TIMESTAMP or DATE to MyODBC, in the ODBC format: {d <date>} or {ts <timestamp>}, the string that represents this is copied once into the SQL statement, and then added again, as an escaped string.