[ODBC-211] SQLDescribeCol return precision=0 for field type decimal(1,0), it makes otl return wrong field value when otl_stream buf size is bigger than 1 Created: 2019-01-20 Updated: 2019-07-23 Resolved: 2019-05-02 |
|
| Status: | Closed |
| Project: | MariaDB Connector/ODBC |
| Component/s: | General |
| Affects Version/s: | None |
| Fix Version/s: | 2.0.19, 3.0.9, 3.1.2 |
| Type: | Bug | Priority: | Major |
| Reporter: | Cai Zhejun | Assignee: | Lawrin Novitsky |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Environment: |
linux+otl_v4+mariadb-connector-odbc-3.0.8-ga+mariadb-10.2.12 |
||
| Description |
|
MADB_SetIrdRecord in ma_desc.c: if field type is MYSQL_TYPE_DECIMAL, the precision is Field->length-2, so field type decimal(1,0) will return precision=2-2=0, which makes otl buffer offset wrong. Test Case:
------
------ DATA:
-----
----- use otl to select f1,f2 from t1,result is wrong if otl_stream first param array_size is 1000: result is corrent, if otl_stream first param array_size is 1 Test Code: }catch(otl_exception& p) { cerr<<p.msg<<endl; cerr<<p.stm_text<<endl; cerr<<p.var_info<<endl; } db.logoff(); |
| Comments |
| Comment by Cai Zhejun [ 2019-02-15 ] |
|
Dear Lawrin, |
| Comment by Lawrin Novitsky [ 2019-02-15 ] |
|
Dear Cai, |
| Comment by Lawrin Novitsky [ 2019-05-02 ] |
|
In odbc-3.0, master and develop commit 832360f |