[infinispan-issues] [JBoss JIRA] (ISPN-4290) jdbcStore oracle select sql with mixed case index name leads to table or view does not exist

Eric van Lydegraf (JIRA) issues at jboss.org
Wed May 14 12:16:00 EDT 2014


Eric van Lydegraf created ISPN-4290:
---------------------------------------

             Summary: jdbcStore oracle select sql with mixed case index name leads to table or view does not exist
                 Key: ISPN-4290
                 URL: https://issues.jboss.org/browse/ISPN-4290
             Project: Infinispan
          Issue Type: Bug
    Affects Versions: 6.0.2.Final
            Reporter: Eric van Lydegraf
            Assignee: Mircea Markus


This was discovered when adding JdbcStore to infinispan for hibernate-search lucene integration. The default cache names are mixed case.
e.g. 
            name="LuceneIndexesMetadata"

This leads to a syntax with select ... "LuceneIndexesMetadata".
In Oracle quotes on a table name mean exact match.
But most tools that will create the table (eg. liquibase, toad) do not put quotes
around the table name and hence is treated as all UPPERCASE in the database.
So then when infinispan tries to load the data, it fails on sql select with table or view does not exist.

The easy fix is to have the quote identifier return blank for oracle in TableManipulation class
line 454-466
{code}
  public String getIdentifierQuoteString() {
      if(identifierQuoteString == null){
         switch (getDatabaseType()) {
            case MYSQL:
               identifierQuoteString = "`";
               break;
            default:
               identifierQuoteString = "\"";
               break;
         }
      }
      return identifierQuoteString;
   }
{code}



--
This message was sent by Atlassian JIRA
(v6.2.3#6260)


More information about the infinispan-issues mailing list