Bug #68011 Invalid error message noDatetimeSync property instead of noDatetimeStringSync
Submitted: 2 Jan 2013 10:44 Modified: 1 Mar 2013 7:37
Reporter: Jarek Lipski Email Updates:
Status: Closed Impact on me:
None 
Category:Connector / J Severity:S3 (Non-critical)
Version:5.1.22 OS:Any
Assigned to: Alexander Soklakov CPU Architecture:Any
Tags: error message, noDatetimeStringSync

[2 Jan 2013 10:44] Jarek Lipski
Description:
When I specify both noDatetimeStringSync and useTimezone properties when configuring JDBC connector, I get the following error message: "Can't enable noDatetimeSync and useTimezone configuration properties at the same time". This is a bit confusing because there is no noDatetimeSync property, just noDatetimeStringSync property.

How to repeat:
Specify both noDatetimeStringSync and useTimezone properties when configuring JDBC connector. This results in invalid error message.

Suggested fix:
Fix the error message in ConnectionImpl.java, line 3419. The message should read:
"Can't enable noDatetimeStringSync and useTimezone configuration properties at the same time".
[2 Jan 2013 11:06] MySQL Verification Team
Verified:

if (getNoDatetimeStringSync() && getUseTimezone()) {
	throw SQLError.createSQLException(
	"Can't enable noDatetimeSync and useTimezone configuration "
	+ "properties at the same time",
SQLError.SQL_STATE_INVALID_CONNECTION_ATTRIBUTE, getExceptionInterceptor());
}
[1 Mar 2013 7:37] John Russell
Added to changelog for 5.1.24: 

When the connection options noDatetimeStringSync and useTimezone were
specified together, which is not allowed, the error message referred
to an incorrect option name noDatetimeSync.