OPENJAP-664: Check length constraint onIndex name, not on the table on which index is created

git-svn-id: https://svn.apache.org/repos/asf/openjpa/trunk@680413 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Pinaki Poddar 2008-07-28 17:29:15 +00:00
parent 2254791f9b
commit 72b5b4def8
1 changed files with 4 additions and 4 deletions

View File

@ -3165,10 +3165,10 @@ public class DBDictionary
buf.append("CREATE ");
if (index.isUnique())
buf.append("UNIQUE ");
buf.append("INDEX ").append(index.getName());
String indexName = checkNameLength(getFullName(index.getTable(), false),
maxIndexNameLength, "long-index-name");
buf.append(" ON ").append(indexName);
String indexName = checkNameLength(index.getName(), maxIndexNameLength,
"long-index-name");
buf.append("INDEX ").append(indexName);
buf.append(" ON ").append(getFullName(index.getTable(), false));
buf.append(" (").append(Strings.join(index.getColumns(), ", ")).
append(")");