ashwin konale created NIFI-5515:
-----------------------------------
Summary: [CaptureChangeMysql] Cannot get real value of primitive
type when column type is unsigned.
Key: NIFI-5515
URL: https://issues.apache.org/jira/browse/NIFI-5515
Project: Apache NiFi
Issue Type: Bug
Components: Extensions
Affects Versions: 1.6.0
Reporter: ashwin konale
*Processor: CaptureChangeMysql*
When mysql column type is of unsigned primitive type, CaptureChangeMysql is not
able to read the data properly when the value overflows. I investigated a bit
and came across this
([https://github.com/shyiko/mysql-binlog-connector-java/issues/104|https://github.com/shyiko/mysql-binlog-connector-java/issues/104]).
The library which is internally being used in CaptureChangeMysql Processor
([https://github.com/shyiko/mysql-binlog-connector-java|https://github.com/shyiko/mysql-binlog-connector-java])
does not handle this case and its upto consumer to handle it. More description
can be found in the link.
*Issue summary Eg.*
Column type : unsigned tinyint
Actual value : 128
Value from CaptureChangeMysql: -128 (Because its still 8bits storage and
mostsignificant bit is identified as sign from java.)
*Possible solution:*
Column types are read and stored Distributed Map Cache Client so we should be
able to do these conversions.
Nifi version : 1.6.0
Mysql version : 5.7.22-log
Binlog type. : Row-based logging
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)