]
Tristan Tarrant reassigned ISPN-4290:
-------------------------------------
Assignee: (was: Mircea Markus)
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
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}