[ODBC-82] Indicator buffer is set to SQL_NULL_DATA when date field has value '0000-00-00'. Created: 2017-01-30 Updated: 2018-11-04 Resolved: 2018-11-04 |
|
| Status: | Closed |
| Project: | MariaDB Connector/ODBC |
| Component/s: | General |
| Affects Version/s: | 2.0.13 |
| Fix Version/s: | N/A |
| Type: | Bug | Priority: | Major |
| Reporter: | kriti suwalka | Assignee: | Lawrin Novitsky |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Environment: |
Windows-64bit |
||
| Description |
|
If we bind a date column with value '0000-00-00' (of aurora database via MariaDB ODBC driver) to SQL_C_TIMESTAMP in a data buffer, it populates the data buffer with correct value but incorrectly sets indicator buffer to SQL_NULL_DATA(-1). Same issue can be seen for all date data types datetime, timestamp, date and time. |
| Comments |
| Comment by Lawrin Novitsky [ 2017-02-23 ] |
|
The reason here is that ODBC doesn't allow date 0000-00-00. Unlike all flavors of mysql server. You can look here here then or directly here. However, 00:00:00 is legitimate value for time type. |
| Comment by kriti suwalka [ 2017-03-13 ] |
|
For time field also, same issue is observed. |
| Comment by Lawrin Novitsky [ 2017-03-13 ] |
|
For time I have this fixed already. |
| Comment by kriti suwalka [ 2017-05-15 ] |
|
In that case, could you please resolve the JIRA and let us know which version of driver will have this fix? |
| Comment by Lawrin Novitsky [ 2017-05-15 ] |
|
2.0.14 has it (https://downloads.mariadb.com/Connectors/odbc/connector-odbc-2.0.14/) |
| Comment by Lawrin Novitsky [ 2018-11-04 ] |
|
I think it's ok to close it by now |