[hibernate-issues] [Hibernate-JIRA] Commented: (HHH-2806) Enhanced TableGenerator is not cluster-safe on MySQL (does not use correct table type)

Matt Solnit (JIRA) noreply at atlassian.com
Thu Aug 23 21:52:56 EDT 2007


    [ http://opensource.atlassian.com/projects/hibernate/browse/HHH-2806?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_27935 ] 

Matt Solnit commented on HHH-2806:
----------------------------------

OK, fair enough.  This definitely caught me off-guard though.  The MySQL installation out-of-the-box will use MyISAM as the default table type.

> Enhanced TableGenerator is not cluster-safe on MySQL (does not use correct table type)
> --------------------------------------------------------------------------------------
>
>                 Key: HHH-2806
>                 URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-2806
>             Project: Hibernate3
>          Issue Type: Bug
>          Components: core
>    Affects Versions: 3.2.5
>         Environment: Mac OS X 10.4.10 (Intel), Java 1.5.0_07, MySQL 5.0.24a
>            Reporter: Matt Solnit
>
> The org.hibernate.id.enanced.TableGenerator.sqlCreateStrings() method does not include a call to Dialect.getTableTypeString().  This means that on MySQL, it will +always+ use MyISAM, even if the Hibernate dialect is "MySQL5InnoDBDialect".
> The result is that the FOR UPDATE lock has no effect, and the generator is not cluster-safe.  In other words, multiple Hibernate applications can receive the same ID and get a primary key violation.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        



More information about the hibernate-issues mailing list