[ODBC-166] Incorect Display Size for decimal column Created: 2018-07-24  Updated: 2018-07-24  Resolved: 2018-07-24

Status: Closed
Project: MariaDB Connector/ODBC
Component/s: General
Affects Version/s: 2.0.17, 3.0.5
Fix Version/s: 3.0.6, 2.0.18

Type: Bug Priority: Major
Reporter: Lawrin Novitsky Assignee: Lawrin Novitsky
Resolution: Fixed Votes: 0
Labels: None


 Description   

To repeat.
OK_SIMPLE_STMT(Stmt, "SELECT cast('123456789.5678' as decimal(20,4))");

CHECK_STMT_RC(Stmt, SQLColAttribute(Stmt, 1, SQL_COLUMN_DISPLAY_SIZE, NULL, 0, NULL, &Size));
/* 20(precision) + sign + decimal point */
is_num(Size, 22);

For some reason connector erroneously returned constant value for decimal types.


Generated at Thu Feb 08 03:26:42 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.