jinpengSun opened a new issue #15984:
URL: https://github.com/apache/shardingsphere/issues/15984


   ## Bug Report
   Use  ShardingSphere-Proxy and Sharding-Scaling to synchronize MySQL data, 
and report an error when incrementally synchronizing data: Data truncation: Out 
of range value for column xx
   
   
   ### Which version of ShardingSphere did you use?
   version 4.1.1  Sharding-Scaling
   
   ### Which project did you use? ShardingSphere-JDBC or ShardingSphere-Proxy?
   project use ShardingSphere-Proxy
   
   ### Expected behavior
   incrementally synchronizing success
   
   ### Actual behavior
   incrementally synchronizing fail
   
   ### Reason analyze (If you can)
   MySQL column type smallint(6)
   MySQL column data value -1
   incrementally synchronizing fail 
   exception:
   
org.apache.shardingsphere.shardingscaling.core.exception.SyncTaskExecuteException:
 com.mysql.jdbc.MysqlDataTruncation: Data truncation: Data truncation: Out of 
range value for column 't1_c' at row 1
        at 
org.apache.shardingsphere.shardingscaling.core.execute.executor.writer.AbstractJDBCWriter.write(AbstractJDBCWriter.java:90)
        at 
org.apache.shardingsphere.shardingscaling.core.execute.executor.writer.AbstractJDBCWriter.run(AbstractJDBCWriter.java:72)
        at 
java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
        at java.util.concurrent.FutureTask.run$$$capture(FutureTask.java:266)
        at java.util.concurrent.FutureTask.run(FutureTask.java)
        at 
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
        at 
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
        at java.lang.Thread.run(Thread.java:748)
   Reading source code discovery:
   class: 
org.apache.shardingsphere.database.protocol.mysql.payload.MySQLPacketPayload
   method:
   public int readInt2() {
           return byteBuf.readShortLE() & 0xffff;
       }
   When &0ffff the byteBuf.readShortLE() value of method execution is - 1, 
65535 will be obtained, and an exception will occur: Data truncation: Out of 
range value。
   
   


-- 
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