You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@nifi.apache.org by "Matt Burgess (Jira)" <ji...@apache.org> on 2023/01/03 16:09:00 UTC

[jira] [Commented] (NIFI-5515) [CaptureChangeMysql] Cannot get real value of primitive type when column type is unsigned.

    [ https://issues.apache.org/jira/browse/NIFI-5515?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17654083#comment-17654083 ] 

Matt Burgess commented on NIFI-5515:
------------------------------------

This information would have to be stored in the cache which would break compatibility. I recommend we ensure this capability works correctly in the CaptureChangeMySQLRecord processor under NIFI-4491.

> [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
>            Priority: Minor
>
> *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
(v8.20.10#820010)