You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ofbiz.apache.org by do...@apache.org on 2010/05/31 00:08:54 UTC

svn commit: r949627 - /ofbiz/trunk/framework/entity/src/org/ofbiz/entity/jdbc/DatabaseUtil.java

Author: doogie
Date: Sun May 30 22:08:54 2010
New Revision: 949627

URL: http://svn.apache.org/viewvc?rev=949627&view=rev
Log:
When fetching index info, if needsUpperCase is set, then the incoming tableName has been upper-cased. This means we have to convert it *back* to lower case when querying indices against the database.

Modified:
    ofbiz/trunk/framework/entity/src/org/ofbiz/entity/jdbc/DatabaseUtil.java

Modified: ofbiz/trunk/framework/entity/src/org/ofbiz/entity/jdbc/DatabaseUtil.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/entity/src/org/ofbiz/entity/jdbc/DatabaseUtil.java?rev=949627&r1=949626&r2=949627&view=diff
==============================================================================
--- ofbiz/trunk/framework/entity/src/org/ofbiz/entity/jdbc/DatabaseUtil.java (original)
+++ ofbiz/trunk/framework/entity/src/org/ofbiz/entity/jdbc/DatabaseUtil.java Sun May 30 22:08:54 2010
@@ -1547,7 +1547,7 @@ public class DatabaseUtil {
                 try {
                     // false for unique, we don't really use unique indexes
                     // true for approximate, don't really care if stats are up-to-date
-                    rsCols = dbData.getIndexInfo(null, lookupSchemaName, curTableName, false, true);
+                    rsCols = dbData.getIndexInfo(null, lookupSchemaName, needsUpperCase ? curTableName.toLowerCase() : curTableName, false, true);
                 } catch (Exception e) {
                     Debug.logWarning(e, "Error getting index info for table: " + curTableName + " using lookupSchemaName " + lookupSchemaName, module);
                 }