sandynz commented on PR #24426:
URL: https://github.com/apache/shardingsphere/pull/24426#issuecomment-1451750433

   
   MySQL replication protocol handles BINARY/VARBINARY column as 
MYSQL_TYPE_VARCHAR(15) in TableMap columnDef, so binary string might be changed 
after `new String(byte[], charset)`. It cause pipeline incremental task failed 
on UDPATE.
   
   Example operation:
   ```
   mysql> update variants set title=now() where 
hex(id)='00003B0B29C6430ABB6D977D16AF5716';
   Query OK, 1 row affected (0.04 sec)
   
   In proxy log:
   
[ShardingSphere-pipeline-Incremental-j01010d6b5c310ae6e051841392fc2ae02872-1] 
o.a.s.d.p.c.i.DataSourceImporter - executeUpdate failed, updateCount=0, 
updateSql=UPDATE variants SET title = ? WHERE id = ?, 
updatedColumns=[title=[B@2d1567f2], conditionColumns=[id=;)�C
   �m�}�W]
   ```
   
   VARBINARY column is MYSQL_TYPE_VARCHAR type:
   
![图片](https://user-images.githubusercontent.com/42492540/222421445-03813271-6df7-4ea0-80fb-17c78d2a4710.png)
   
   VARBINARY column value changed in String.bytes:
   
![图片](https://user-images.githubusercontent.com/42492540/222421852-37f03419-3164-4f00-b263-025cf21b7e8c.png)
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to