Bug #91421 Allowed values for zeroDateTimeBehavior are incompatible with NetBeans
Submitted: 26 Jun 2018 10:29 Modified: 17 Sep 2018 20:55
Reporter: Alexander Soklakov Email Updates:
Status: Closed Impact on me:
None 
Category:Connector / J Severity:S2 (Serious)
Version:8.0.11 OS:Any
Assigned to: Alexander Soklakov CPU Architecture:Any

[26 Jun 2018 10:29] Alexander Soklakov
Description:
NetBeans has hardcoded "zeroDateTimeBehavior=convertToNull" value in MySQL admin connection configurator (see org-netbeans-modules-db-mysql.jar, org/netbeans/modules/db/mysql/util/DatabaseUtils.java) and doesn't provide any way to override that. Because of that it isn't possible to use Connector/J 8.0 for NetBeans MySQL admin connections, it accepts only "EXCEPTION", "ROUND" and "CONVERT_TO_NULL".

See also https://forums.mysql.com/read.php?39,665773,665773#msg-665773 and https://forums.mysql.com/read.php?39,667230,667230#msg-667230 discussions.

How to repeat:
Try to configure NetBeans admin connection to MySQL database with c/J 8.0.11.

Suggested fix:
Connector/J 8.0 should properly convert legacy values for zeroDateTimeBehavior into the new ones.
[17 Sep 2018 20:55] Daniel So
Posted by developer:
 
Added the following entry to the Connector/J 8.0.13 changelog:

"Connector/J now translates the legacy value of convertToNull for the connection property zeroDateTimeBehavior to CONVERT_TO_NULL. This allows applications or frameworks that use the legacy value (for example, NetBeans) to work with Connector/J 8.0."