사용자 도구

사이트 도구


database:mysql:5.6

차이

문서의 선택한 두 판 사이의 차이를 보여줍니다.

차이 보기로 링크

양쪽 이전 판 이전 판
다음 판
이전 판
마지막 판 양쪽 다음 판
database:mysql:5.6 [2022/02/11 11:32]
kwon37xi [fractional seconds 반올림 문제 해결책]
database:mysql:5.6 [2022/02/11 13:05]
kwon37xi [fractional seconds 반올림 문제 해결책]
줄 37: 줄 37:
   * [[https://gist.github.com/kwon37xi/9205428|MySQL 5.6의 DATETIME ms 반올림 버그와 구버전 JDBC 드라이버의 ms 절삭 버그 조합]]   * [[https://gist.github.com/kwon37xi/9205428|MySQL 5.6의 DATETIME ms 반올림 버그와 구버전 JDBC 드라이버의 ms 절삭 버그 조합]]
   * [[https://dev.mysql.com/doc/relnotes/connector-j/5.1/en/news-5-1-37.html|MySql Connector/J 5.1.37]] 에 **'' sendFractionalSeconds=true|false''** 프라퍼티가 추가 되었다. 이를 통해 JDBC Driver 차원에서 fractional seconds를 전송하지 않게 ''false'' 옵션을 지정하면 ''datetime(0)''에서도 반올림 현상을 막을 수 있다.   * [[https://dev.mysql.com/doc/relnotes/connector-j/5.1/en/news-5-1-37.html|MySql Connector/J 5.1.37]] 에 **'' sendFractionalSeconds=true|false''** 프라퍼티가 추가 되었다. 이를 통해 JDBC Driver 차원에서 fractional seconds를 전송하지 않게 ''false'' 옵션을 지정하면 ''datetime(0)''에서도 반올림 현상을 막을 수 있다.
-> A new connection property, sendFractionalSeconds=true|false, has been introduced. It controls whether fractional seconds in timestamps are to be truncated on the client side or to be sent to the server side for truncation there. See the entry for the new property in [[https://dev.mysql.com/doc/connector-j/5.1/en/connector-j-reference-configuration-properties.html|Configuration Properties for Connector/J]] for details. Thanks to Kwon Nam Son for contributing the code. (Bug #21304726, Bug #77449)+ 
 +> A new connection property, sendFractionalSeconds=true|false, has been introduced. It controls whether fractional seconds in timestamps are to be truncated on the client side or to be sent to the server side for truncation there. See the entry for the new property in [[https://dev.mysql.com/doc/connector-j/5.1/en/connector-j-reference-configuration-properties.html|Configuration Properties for Connector/J]] for details. Thanks to **Kwon Nam Son** for contributing the code. (Bug #21304726, Bug #77449)
  
   * 혹시나 ''true|false''간의 성능차이가 매우 큰지 여부를 테스트해 보았는데, 차이 거의 없었다. [[https://github.com/kwon37xi/mysql-jdbc-send-fractional-seconds|mysql-jdbc-send-fractional-seconds performance test]]   * 혹시나 ''true|false''간의 성능차이가 매우 큰지 여부를 테스트해 보았는데, 차이 거의 없었다. [[https://github.com/kwon37xi/mysql-jdbc-send-fractional-seconds|mysql-jdbc-send-fractional-seconds performance test]]
 +  * [[https://github.com/mysql/mysql-connector-j/commit/8a7a7e8b85b6893c2dd2cca25cfae59a81a148b3| Fix for Bug#77449 (21304726) Add 'truncateFractionalSeconds=true|false' property (contribution).]]
 +  * [[https://bugs.mysql.com/bug.php?id=77449|MySQL Bugs: #77449: Add 'truncateFractionalSeconds=true|false' property (contribution)]]
   * [[database:mariadb|MariaDB]] Connector/J의 경우 ''useFractionalSeconds=false''로 지정하면 millisecond를 전송하지 않는다.   * [[database:mariadb|MariaDB]] Connector/J의 경우 ''useFractionalSeconds=false''로 지정하면 millisecond를 전송하지 않는다.
 +  * [[https://dev.mysql.com/doc/connector-j/8.0/en/ch06s06s02.html|MySQL :: MySQL Connector/J 8.0 Developer Guide :: 6.6.2 Fractional Seconds]]
database/mysql/5.6.txt · 마지막으로 수정됨: 2022/03/15 10:59 저자 kwon37xi