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


##########
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:
   The official document can't find currently, but i found some relate source 
code from 
https://github.com/mysql/mysql-server/blob/5.7/sql-common/my_time.c#L1783
   
   <img width="652" alt="image" 
src="https://user-images.githubusercontent.com/101622833/231629876-ab01d0ec-b15d-44a5-9d85-329def80aeb9.png";>
   
   the first bit sign seem not related to time 



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