MySQL JDBC 5.0.5 bug with TIME column and midnight

Coldfusion 8 comes bundled with the mysql commercial jdbc driver 5.0.5 (or it did with my install anyway).  I just ran into a bug that results in this error: java.sql.SQLException: Value '00:00:00 can not be represented as java.sql.Time

The bug is the date / time parsing interprets midnight (00:00:00) as illegal for the TIME type. 

Two ways to fix.

Update to 5.0.6 (I haven't tried this yet, but assume it would be just fine)

OR add "useFastDateParsing=false" to the connection string in the datasource.

I tried the "useFastDateParsing=false" and it worked perfectly.  No restarts of anything.  Not sure how that will affect performance though.  My quick tests show it running pretty quick still.  If I get time I will try with and without and time queries to see.  Ideally I would like to update the driver instead, but its Friday at 5:30 and I am not about to do that right now.

Which gets me thinking, how often would Adobe be updating these drivers?  Will the next updater fix this?  Or should we be doing that manually?

TweetBacks
Comments (Comment Moderation is enabled. Your comment will not appear until approved.)
Dan's Gravatar Thanks so much for this post. I had the same problem even though the CF8 upgrade migrated my CF7 "manually created" j connector. Not surprisingly, the "useFastDateParsing=false" didn't work on the old Datasources, but recreating them using the native CF8 MySQL 4/5 datatype with the "useFastDateParsing=false" connection string worked like a champ.
# Posted By Dan | 4/14/08 6:31 PM
MikeL's Gravatar Thanks! I had the same Coldfusion "java.sql.SQLException: Value '00:00:00 can not be represented as java.sql.Time" issue. Adding useFastDateParsing=false under the connection string in the advanced settings of the data source in the administrator fixed it. Granted, it doesn't address the larger issue with my CFAdmin having a bug, but for now my web app works again.
# Posted By MikeL | 9/25/09 2:50 PM
Angel B.'s Gravatar Hey thanks!! Had the same issue. useFastDateParsing=false is just sweet!!
# Posted By Angel B. | 1/21/10 11:31 PM
Sudhakar's Gravatar Thanks for the post, problem is resolved with the mysql driver update. but i didn't understand where i need to use the "useFastDateParsing=false", presently i'm using the datasource connection of commons-dbcp connection pooling BasicDataSource, it is not accepting because there is no getter/setter method for the property of useFastDateParsing. can any one help me to resolve the problem using this property.
# Posted By Sudhakar | 11/26/10 3:17 AM
Tim Brown's Gravatar Thank You, Thank You, Thank You! I was losing my mind as to what could be wrong with my code since everything was query paramed until i ran across this.
# Posted By Tim Brown | 2/10/11 9:33 AM

NAVIGATION

Home
About Me

RSS


Search

Subscribe

Enter your email address to subscribe to this blog.

Recent Entries

Google TV Review
Playbook - Developers It's Time To Get Started
cf.Objective 2011 - Speak Your Mind
Timesheets, Project Management, and Invoicing - FreshBooks Review
A New Phase of My Life

Recent Comments

OTA OK?
AnoraDD said: I get 18 of these exact sms's everyday! How do I get it to STOP?!? [More]

Coldfusion Hosting with Network Solutions
LIzm said: Ugh. I have a client who insists on hosting with them and two weeks after first contact, a very simp... [More]

IE nested list item whitespace solution: vertical-align:bottom
Lauren said: Thought I'd add to the thank yous... Thank you! [More]

OTA OK?
Rita said: Thank you, this was very helpful. [More]

OTA OK?
diggs said: Just got it today, T-Mobile. Thanks for the articale about it. [More]

Calendar

Sun Mon Tue Wed Thu Fri Sat
   1234
5 6 7 8 9 10 11
12 13 14 15 16 17 18
19 20 21 22 23 24 25
26 27 28 29    

Archives By Subject

blogs (31) [RSS]
books (4) [RSS]
Consulting (2) [RSS]
Crazy (39) [RSS]
DIY (8) [RSS]
Flex (3) [RSS]
games (10) [RSS]
GRRR (13) [RSS]
Ideas (11) [RSS]
Local (15) [RSS]
LOLpics (2) [RSS]
money (9) [RSS]
music (3) [RSS]
Personal (28) [RSS]
Photos (8) [RSS]
Politics (8) [RSS]
Projects (22) [RSS]
Review (20) [RSS]
RPM (9) [RSS]
Spam (16) [RSS]
Technology (69) [RSS]
Testing (3) [RSS]
TV (15) [RSS]
video (32) [RSS]
Web Dev (230) [RSS]
World of Warcraft (16) [RSS]