Bug #13261 | zeroDateTimeBehavior property seems to be ignored | ||
---|---|---|---|
Submitted: | 16 Sep 2005 11:35 | Modified: | 23 Sep 2005 7:42 |
Reporter: | Gustav Oesgaard | Email Updates: | |
Status: | Not a Bug | Impact on me: | |
Category: | Connector / J | Severity: | S3 (Non-critical) |
Version: | 3.1.10 | OS: | Windows (Windows XP Professional) |
Assigned to: | CPU Architecture: | Any |
[16 Sep 2005 11:35]
Gustav Oesgaard
[16 Sep 2005 12:46]
Mark Matthews
This is tested in the testsuite, as well as we have users using this feature. What happens in either of the following situations: Call .setZeroDateTimeBehavior("...") on the MysqlDataSource or Use com.mysql.jdbc.Driver.connect(), with the given URL? I just tested this by swapping out the direct connection in our testsuite with the way you use a DataSource and it works for me, converting the dates to null as expected.
[16 Sep 2005 13:55]
Gustav Oesgaard
Thanks for quick response! The "Call .setZeroDateTimeBehavior("...") on the MysqlDataSource"-suggestion worked! I don't know how to perform your second suggestion (com.mysql.jdbc.Driver.connect()). I also noticed that using: connection = DriverManager.getConnection(url, username, password); with the property included in the URL worked!
[23 Sep 2005 7:42]
Gustav Oesgaard
Has to be set via accessor methods on the datasource (Call .setZeroDateTimeBehavior()) or by getting connection using "DriverManager.getConnection(url, username, password);". As I far as I understand, this wasn't a bug but a defined behavior that just wasn't documented. Will however be documented for 3.1.11.
[3 Apr 2008 14:23]
Stepan Koltsov
This is a bug actually. Fix, please.
[3 Apr 2008 20:28]
Bugs System
A patch for this bug has been committed. After review, it may be pushed to the relevant source trees for release in the next version. You can access the patch from: http://lists.mysql.com/commits/44888
[30 Jul 2008 14:53]
Bugs System
A patch for this bug has been committed. After review, it may be pushed to the relevant source trees for release in the next version. You can access the patch from: http://lists.mysql.com/commits/50724