Skip to content

Add support for MYSQL_TYPE_NEWDECIMAL to Poco::Data::MySQL #154

@simon-graham

Description

@simon-graham

Data::MySQL does not fully support decimal types. I believe the only change necessary in the 1.5.x code is to add MYSQL_TYPE_NEWDECIMAL to the fieldType() function in /Data/MySQL/src/ResultMetadata.cpp.

We can see that MYSQL_TYPE_NEWDECIMAL is already present in the fieldSize() function, but missing from fieldType().

I believe that the correct meta type to map decimal to is FDT_STRING. All of the MySQL Server test cases seem to use strings for mapping decimals. For example, see test_decimal_bug here

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions