empire-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From doeb...@apache.org
Subject svn commit: r1366304 - /empire-db/trunk/empire-db/src/main/java/org/apache/empire/db/oracle/DBCommandOracle.java
Date Fri, 27 Jul 2012 08:04:26 GMT
Author: doebele
Date: Fri Jul 27 08:04:25 2012
New Revision: 1366304

URL: http://svn.apache.org/viewvc?rev=1366304&view=rev
Log:
EMPIREDB-141
allow multiple Index hints for Oracle Commands

Modified:
    empire-db/trunk/empire-db/src/main/java/org/apache/empire/db/oracle/DBCommandOracle.java

Modified: empire-db/trunk/empire-db/src/main/java/org/apache/empire/db/oracle/DBCommandOracle.java
URL: http://svn.apache.org/viewvc/empire-db/trunk/empire-db/src/main/java/org/apache/empire/db/oracle/DBCommandOracle.java?rev=1366304&r1=1366303&r2=1366304&view=diff
==============================================================================
--- empire-db/trunk/empire-db/src/main/java/org/apache/empire/db/oracle/DBCommandOracle.java
(original)
+++ empire-db/trunk/empire-db/src/main/java/org/apache/empire/db/oracle/DBCommandOracle.java
Fri Jul 27 08:04:25 2012
@@ -81,7 +81,11 @@ public class DBCommandOracle extends DBC
         // Set Index Hint
         String tableAlias = index.getTable().getAlias();
         String indexName  = index.getName();
-        this.optimizerHint = "INDEX ("+tableAlias+" "+indexName+")";
+        String indexHint  = "INDEX ("+tableAlias+" "+indexName+")";
+        if (StringUtils.isNotEmpty(this.optimizerHint) && this.optimizerHint.indexOf(indexHint)<0)
+            this.optimizerHint = this.optimizerHint + " " + indexHint;
+        else
+            this.optimizerHint = indexHint;
     }
 
     /**



Mime
View raw message