Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 344445 - Unneccessary check for line terminators in the DDL generation code
Summary: Unneccessary check for line terminators in the DDL generation code
Status: RESOLVED FIXED
Alias: None
Product: Data Tools
Classification: Tools
Component: DDL Generation (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 1.9.2   Edit
Assignee: Brian Payton CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-05-02 08:49 EDT by David CLA
Modified: 2011-09-29 19:43 EDT (History)
2 users (show)

See Also:


Attachments
Patch attachment - version 1 (1.19 KB, patch)
2011-05-04 07:32 EDT, David CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description David CLA 2011-05-02 08:49:18 EDT
Build Identifier:   Eclipse 3.4.0, I20080617-2000

There is a method 'generateDDL()' in FEWizard.java in the following locations in the eclipse code.

org.eclipse.datatools.sqltools.ddlgen.ui >> org.eclipse.datatools.sqltools.ddlgen.internal.ui >> org.eclipse.datatools.sqltools.ddlgen.internal.ui.wizards

For some unknown reasons there is a check in the start of this method, that changes the platform specific new line [in case of windows => \n\r] to \n for databases like DB2 UDB, DB2 Z and Oracle.

This results in the \n\r being added as the line breaks and in notepad, does not display properly. This DDL does not also execute with databases because of this line breaks forcing a syntax error.

The solution for this would be remove the check in start of this method.

Reproducible: Always
Comment 1 David CLA 2011-05-02 08:50:03 EDT
I will be attaching a patch for this ASAP.
Comment 2 Brian Fitzpatrick CLA 2011-05-02 09:28:41 EDT
Brian, I'm going to guess this comes to you for now?
Comment 3 David CLA 2011-05-04 07:32:23 EDT
Created attachment 194696 [details]
Patch attachment - version 1
Comment 4 David CLA 2011-05-04 07:32:58 EDT
Please use 'Patch Attachment - version 1'
Comment 5 David CLA 2011-09-29 01:59:42 EDT
Hi Brian,

When are going to push the code in to DTP?

If you close the bugzilla defect I will close IDA defect.

Please let me know on the same.

Thanks,
David.
Comment 6 Brian Payton CLA 2011-09-29 15:46:22 EDT
Thanks for the ping.  I will go ahead and put this fix into
Comment 7 Brian Payton CLA 2011-09-29 15:46:58 EDT
(sorry) ... the 1.9.2 stream.
Comment 8 Brian Payton CLA 2011-09-29 16:24:25 EDT
FYI, I'm having some problem applying this patch (but not because of anything wrong with the patch itself).  When I bring this plugin org.eclipse.datatools.sqltools.ddlgen.ui into my workspace from Git, it comes in with the plugin name org.eclipse.datatools.sqltools.ddlgen.internal.ui.  So the patch doesn't apply due to the plugin name mismatch.  I'm investigating the problem.
Comment 9 Brian Payton CLA 2011-09-29 19:04:00 EDT
I've fixed the plugin name problem.  (See bug 359486.)
Comment 11 Brian Payton CLA 2011-09-29 19:43:05 EDT
By the way, I removed the commented-out code for the commit.