Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 354811

Summary: Empty SQL Results when column conversion fails
Product: [Tools] Data Tools Reporter: Matthew Buckett <buckett>
Component: SQL Results ViewAssignee: dtp.sqldevtools-inbox <dtp.sqldevtools-inbox>
Status: NEW --- QA Contact:
Severity: normal    
Priority: P3    
Version: unspecified   
Target Milestone: ---   
Hardware: Macintosh   
OS: Mac OS X - Carbon (unsup.)   
Whiteboard:
Attachments:
Description Flags
Stack trace in the Eclipse logs when the error occurs. none

Description Matthew Buckett CLA 2011-08-16 07:07:34 EDT
Build Identifier: 20110615-0604

I was connecting to a MySQL database with DTP and attempting to select sample data from tables was failing. Looking in the logs I was getting a stack trace, the message in the logs was:

 java.sql.SQLException: Cannot convert value '0000-00-00 00:00:00' from column 8 to TIMESTAMP.

there was visible error in Eclipse. I was using the latest MySQL Connector 5.1.17. There is some discussion about this on stackoverflow:

http://stackoverflow.com/questions/782823/handling-datetime-values-0000-00-00-000000-in-jdbc

and the workaround I used was to append "?zeroDateTimeBehavior=convertToNull" to my connection URL, however it would be good if the results viewer coped with this error internally and still displayed the result.



Reproducible: Always
Comment 1 Matthew Buckett CLA 2011-08-16 07:08:54 EDT
Created attachment 201559 [details]
Stack trace in the Eclipse logs when the error occurs.