[hibernate-issues] [Hibernate-JIRA] Updated: (HHH-3153) CLONE -dropIndex doesn't cound on Dialect
Ohad Bruker (JIRA)
noreply at atlassian.com
Mon Mar 3 18:09:33 EST 2008
[ http://opensource.atlassian.com/projects/hibernate/browse/HHH-3153?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Ohad Bruker updated HHH-3153:
-----------------------------
Attachment: HHH-3153.patch
This patch produces an appropriate drop index string for each dialect.
It fixes invalid drop index DDL for Oracle, HSQL, MySQL databases.
I have tested it on the following databases:
MS-SQL 2000(and default): DROP INDEX table_name.index_name
Oracle 9i, 10g: DROP INDEX index_name
HSQL: DROP INDEX index_name
MySQL 5.0: DROP INDEX index_name ON table_name
> CLONE -dropIndex doesn't cound on Dialect
> -----------------------------------------
>
> Key: HHH-3153
> URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-3153
> Project: Hibernate3
> Issue Type: Bug
> Components: core
> Affects Versions: 3.2.5
> Environment: Hibernate 2.1.6, MySql 4.??
> Reporter: Ohad Bruker
> Attachments: HHH-3153.patch
>
>
> In class net.sf.hibernate.mapping.Index method
> sqlDropString(Dialect dialect)
> doesn't count on dialect, and always makes name of index qualified:
> return "drop index " + StringHelper.qualify( table.getQualifiedName(dialect), name);
> This will fail at least in case of MySql DB, because it doesn't understand {tablename}.{indexname} constructions, but {indexname} only.
> I propose next edition:
> return "drop index " + (dialect.qualifyIndexName() ? StringHelper.qualify( table.getQualifiedName(dialect), name) : name);
> Is it suitable?
--
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