This Bugzilla instance is deprecated, and most Eclipse projects now use GitHub or Eclipse GitLab. Please see the deprecation plan for details.
Bug 214519 - Allow appending strings to CREATE TABLE statements (Allow MySQL engine=InnoDB)
Summary: Allow appending strings to CREATE TABLE statements (Allow MySQL engine=InnoDB)
Status: RESOLVED FIXED
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: Eclipselink (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows XP
: P5 enhancement with 4 votes (vote)
Target Milestone: ---   Edit
Assignee: Nobody - feel free to take it CLA
QA Contact:
URL:
Whiteboard:
Keywords:
: 259039 (view as bug list)
Depends on:
Blocks:
 
Reported: 2008-01-07 13:25 EST by Tom Ware CLA
Modified: 2022-06-09 10:21 EDT (History)
5 users (show)

See Also:


Attachments
proposed changes (18.19 KB, patch)
2010-10-08 16:16 EDT, Chris Delahunt CLA
no flags Details | Diff
proposed fix with testing (37.45 KB, patch)
2010-10-26 11:31 EDT, Chris Delahunt CLA
no flags Details | Diff
proposed patch with testing (39.38 KB, patch)
2010-11-16 13:36 EST, Chris Delahunt CLA
no flags Details | Diff
patch with tests (40.14 KB, patch)
2010-11-17 09:21 EST, Chris Delahunt CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Tom Ware CLA 2008-01-07 13:25:13 EST
It would be useful to allow SQL to be appended to the end of CREATE TABLE statements.

One use for this is as follows:

By default, MySQL 5 installs with a non-transactional engine as the default engine on Unix servers.  When this engine is enabled, database transactions do not work for tables that are created with default syntax.

Tables that are transactional can be created by appending "engine=InnoDB" to the end of the CREATE TABLE statement.

e.g. CREATE TABLE MyTable (id INTEGER) engine=InnoDB

This functionality would be useful to anyone that wanted to make use of transactions on a MySQL server they could not control and could potentially allow other similar features to be used on other databases.

Because this feature does not currently exist, we are forced to require any MySQL database we run our testing on to have InnoDB as the default engine.  This potentially causes problems in a community such as Eclipse because the EclipseLink group will not necessarily be able to own the servers testing is running on.
Comment 1 Doug Clarke CLA 2008-07-07 13:32:00 EDT
Changed version to unspecified
Comment 2 Tom Ware CLA 2009-04-16 11:00:37 EDT
Updating priority due to revised bug categorization process.  See the following page for details:

http://wiki.eclipse.org/EclipseLink/Development/Bugs/Guidelines#Priority_and_Target_Milestone 

If you feel the updated priority is incorrect, please send an email to eclipselink-users@eclipse.org.
Comment 3 Chris Delahunt CLA 2010-10-06 14:44:41 EDT
Design doc available at:
http://wiki.eclipse.org/EclipseLink/DesignDocs/214519
feedback appreciated
Comment 4 Chris Delahunt CLA 2010-10-08 16:16:40 EDT
Created attachment 180517 [details]
proposed changes
Comment 5 Chris Delahunt CLA 2010-10-26 11:31:56 EDT
Created attachment 181741 [details]
proposed fix with testing
Comment 6 Chris Delahunt CLA 2010-11-16 13:36:07 EST
Created attachment 183254 [details]
proposed patch with testing
Comment 7 Chris Delahunt CLA 2010-11-17 09:21:21 EST
Created attachment 183294 [details]
patch with tests
Comment 8 Chris Delahunt CLA 2010-11-17 15:07:12 EST
checked into 2.2 at revision 8512
reviewed by James Sutherland

Adds creation-suffix tag to eclipselink-orm.xml tables, and a new "eclipselink.ddl-generation.table-creation-suffix" persistence property, both of which allow string values 
to be appended to CREATE TABLE statements.
Comment 9 Tom Ware CLA 2010-11-18 14:23:14 EST
*** Bug 259039 has been marked as a duplicate of this bug. ***
Comment 10 Karen Butzke CLA 2010-12-06 14:05:28 EST
Chris,
Should a corresponding annotation be created for this feature? I know you can't just add an element to the existing javax.persistence table annotations, but maybe a new @CreationSuffix annotation? I was under the impression that EclipseLink is trying to have the same xml and annotation metadata available.
Comment 11 Chris Delahunt CLA 2011-03-28 10:35:31 EDT
EclipseLink is trying to have the same xml and annotation metadata available, but there are a few exceptions.  Implementing this one as an annotation would require yet another EclipseLink specific annotation.  It would have added confusion and complexity, as such an annotation would only benifit DDL generation, but still have to contain most of the information already avaible in the @Table annotation.   It was decided to leave this out of this feature, as it could be added in later if there was a demand or need for it.
Comment 12 Eclipse Webmaster CLA 2022-06-09 10:21:45 EDT
The Eclipselink project has moved to Github: https://github.com/eclipse-ee4j/eclipselink