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?
Like this entry? Subscribe to my blog.


Comments (moderation on)