[hibernate-issues] [Hibernate-JIRA] Commented: (HHH-3686) Sybase - QueryCacheTest.testQueryCacheInvalidation fails

Gail Badner (JIRA) noreply at atlassian.com
Mon Apr 20 21:47:17 EDT 2009


    [ http://opensource.atlassian.com/projects/hibernate/browse/HHH-3686?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=32936#action_32936 ] 

Gail Badner commented on HHH-3686:
----------------------------------

I have verified that DatabaseMetaData can be used to determine if string comparisons are case-sensitive on Sybase. However, it appears that dialects do not use information from DatabaseMetaData directly (because it can only get that information from SessionFactoryImplementor.getSettings() and Dialect does not have access to it???).

Instead Dialect explicitly overrides the value or indicates that the value obtained from DatabaseMetaData should be used. 

Dialect.performTemporaryTableDDLInIsolation(), for example, has the possible return values:
  Boolean.TRUE - Unequivocally, perform the temporary table DDL in isolation.
  Boolean.FALSE - Unequivocally, do not perform the temporary table DDL in isolation.
  null - defer to the JDBC driver response in regards to java.sql.DatabaseMetaData.dataDefinitionCausesTransactionCommit()

In order to use the same convention, the API for Dialect.areStringComparisonsCaseInsensitive() would need to be changed to return a Boolean (instead of a boolean).

Should this be done? If so, should null be returned by default? I don't know if Hibernate can rely on DatabaseMetaData for all dialects, so this may break something.

I would think there would be other DB platforms that allow configuring strings as either case-sensitive or case-insensitive. 

Dialect.areStringComparisonsCaseInsensitive() only appears to be used by unit tests. Should the dialect simply return the default (true for Sybase), assuming that the DB was not configured differently?

> Sybase - QueryCacheTest.testQueryCacheInvalidation fails
> --------------------------------------------------------
>
>                 Key: HHH-3686
>                 URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-3686
>             Project: Hibernate Core
>          Issue Type: Bug
>            Reporter: Gail Badner
>            Assignee: Gail Badner
>
> QueryCacheTest.testQueryCacheInvalidation fails because SybaseDialect.areStringComparisonsCaseInsensitive(). returns false and the test machine is actually configured for case-insensitive string comparisons.
> By default, Sybase string comparisons are case-insensitive.
> It may be possible to determine which is configured by looking at DatabaseMetaData to return the appropriate value for SybaseDialect.areStringComparisonsCaseInsensitive().

-- 
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