sandynz commented on code in PR #25144:
URL: https://github.com/apache/shardingsphere/pull/25144#discussion_r1164107760


##########
db-protocol/mysql/src/main/java/org/apache/shardingsphere/db/protocol/mysql/packet/binlog/row/column/value/time/MySQLDatetime2BinlogProtocolValue.java:
##########
@@ -48,6 +48,9 @@ private long readDatetimeV2FromPayload(final 
MySQLPacketPayload payload) {
     
     private Serializable readDatetime(final MySQLBinlogColumnDef columnDef, 
final long datetime, final MySQLPacketPayload payload) {
         long datetimeWithoutSign = datetime & (0x8000000000L - 1);
+        if (0 == datetimeWithoutSign) {
+            return MySQLTimeValueUtils.DATETIME_OF_ZERO;
+        }

Review Comment:
   
https://dev.mysql.com/doc/internals/en/date-and-time-data-type-representation.html
 is not available now, refer to 
https://stackoverflow.com/questions/36937211/how-datetime-values-are-stored-in-mysql
 for more details.



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