From 72b5b4def8efa363969427f24d614d72905e648a Mon Sep 17 00:00:00 2001 From: Pinaki Poddar Date: Mon, 28 Jul 2008 17:29:15 +0000 Subject: [PATCH] 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 --- .../java/org/apache/openjpa/jdbc/sql/DBDictionary.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/DBDictionary.java b/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/DBDictionary.java index 92b1ed7c9..aa447ecec 100644 --- a/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/DBDictionary.java +++ b/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/DBDictionary.java @@ -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(")");