Documentation Home
Connectors and APIs Manual
Download this Manual
PDF (US Ltr) - 4.1Mb
PDF (A4) - 4.1Mb Fractional Seconds

While a java.sql.TIME instance, according to the JDBC specification, is not supposed to contain fractional seconds by design, because java.sql.TIME is a wrapper around java.util.Date, it is possible to store fractional seconds in a java.sql.TIME instance. However, when Connector/J inserted a java.sql.TIME into the server as a MySQL TIME value, the fractional seconds were always truncated. To allow the fractional seconds to be sent to the server, a connection property, sendFractionalSecondsForTime, has been introduced in release 8.0.23: when the property is true (which is the default value), the fractional seconds for java.sql.TIME are sent to the server; otherwise, the fractional seconds are truncated.

Also, the connection property sendFractionalSeconds has become a global control for the sending of fractional seconds for ALL date-time types since release 8.0.23. As a result, if sendFractionalSeconds=false, fractional seconds are not sent irrespective of the value of sendFractionalSecondsForTime.