[ODBC-152] Problem with SQLColumns / SQLFetchScroll Created: 2018-06-27 Updated: 2018-10-01 Resolved: 2018-10-01 |
|
| Status: | Closed |
| Project: | MariaDB Connector/ODBC |
| Component/s: | General |
| Affects Version/s: | 3.0.5 |
| Fix Version/s: | 3.0.7, 2.0.19 |
| Type: | Bug | Priority: | Major |
| Reporter: | Alexander Roskamp | Assignee: | Lawrin Novitsky |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Environment: |
Linux/64bit |
||
| Attachments: |
|
| Description |
|
With one of our tables at work we had problems with SQLColumns. If we executed a SQLColumns-Call of another before the call of this particular table, it was working. I found out that the Result-Set-Column SQL_DATA_TYPE was reporting different data-types (mediumtext vs. smallint). After some research, I managed to CAST this column explicitly to SIGNED (SMALLINT) so that our particular problem was getting solved. But I am sure that there is a better solution. Here is out table definition: CREATE TABLE IF NOT EXISTS `Putback_Source` ( ALTER TABLE `Putback_Source` — And here my diff:
|
| Comments |
| Comment by Lawrin Novitsky [ 2018-09-18 ] |
|
Thank you for your report and proposed problem solution. cast/convert solution would be good if not best solution, if it's result wasn't LONG, and not SMALLINT. Also, for future, if you have a patch for us, you can do a pull request on github |
| Comment by Lawrin Novitsky [ 2018-09-18 ] |
|
roskamp But what is the problem exactly? With which field and when? Maybe your solution actually makes sense, but I need to understand the problem to, at least. to have the test case for it. |
| Comment by Lawrin Novitsky [ 2018-09-18 ] |
|
Eventually I have pushed the requested change, as it looks reasonable. But I still would like to understand the problem to be able to add the test case |
| Comment by Alexander Roskamp [ 2018-09-20 ] |
|
I added a skeleton of a test-case and found out that the problem (Numeric value out of range) occurs when the column 'SQL_DATA_TYPE' is bound by SQLBindCol. In this file you can even activate debugging output of SQLDescribeCol and the data of the result-set. I hope that this test environment helps a bit. |
| Comment by Lawrin Novitsky [ 2018-10-01 ] |
|
The fix and the testcase have been pushed into odbc-3.0 as d49df3d |