Open
Description
Oracle8iDialect may not name all temporary tables with HT_ prefix. Some may be prefixed with T_ instead.
This bug was reported to hibernate:
https://hibernate.atlassian.net/browse/HHH-9290
The buggy code of hibernate is as follows:
public String generateTemporaryTableName(String baseTableName) {
final String name = super.generateTemporaryTableName( baseTableName );
return name.length() > 30 ? name.substring( 1, 30 ) : name;
}
The fixed code is as follows:
public String generateTemporaryTableName(String baseTableName) {
final String name = super.generateTemporaryTableName( baseTableName );
return name.length() > 30 ? name.substring( 0, 30 ) : name;
}
The latest NHibernate is identical to the buggy code:
public override string GenerateTemporaryTableName(String baseTableName)
{
string name = base.GenerateTemporaryTableName(baseTableName);
return name.Length > 30 ? name.Substring(1, (30) - (1)) : name;
}
As a result, NHibernate can have the identical bug but leave it unfixed.
Activity
[-]Oracle8iDialect may not name tempory tables HT_ prefix[/-][+]Oracle8iDialect may not name tempory tables with HT_ prefix[/+][-]Oracle8iDialect may not name tempory tables with HT_ prefix[/-][+]Oracle8iDialect may not name temporary tables with HT_ prefix[/+]fredericDelaporte commentedon Dec 24, 2023
Excepted the name discrepancy for some tables, has this bug any other effect? (Does the
HT_
orT_
prefix has any special treatment with Oracle? Looking at the documentation, is does not seem so.)The possible breaking change for this change is in case the database already has some other table with a name which would match the renamed temporary table: it may cause a name conflict that was previously avoided through the bug.