db-derby-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rhille...@apache.org
Subject svn commit: r1479642 - in /db/derby/code/trunk: java/engine/org/apache/derby/catalog/ java/engine/org/apache/derby/impl/sql/ java/engine/org/apache/derby/impl/sql/compile/ java/engine/org/apache/derby/loc/ java/shared/org/apache/derby/shared/common/ref...
Date Mon, 06 May 2013 17:00:12 GMT
Author: rhillegas
Date: Mon May  6 17:00:12 2013
New Revision: 1479642

URL: http://svn.apache.org/r1479642
Log:
DERBY-6211: Move optimizer tracer from tools jar to engine jar.

Added:
    db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/OptimizerTracer.java
      - copied, changed from r1479553, db/derby/code/trunk/java/tools/org/apache/derby/impl/tools/optional/OptimizerTracer.java
Removed:
    db/derby/code/trunk/java/tools/org/apache/derby/impl/tools/optional/OptimizerTracer.java
Modified:
    db/derby/code/trunk/java/engine/org/apache/derby/catalog/Java5SystemProcedures.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/build.xml
    db/derby/code/trunk/java/engine/org/apache/derby/loc/messages.xml
    db/derby/code/trunk/java/shared/org/apache/derby/shared/common/reference/SQLState.java
    db/derby/code/trunk/java/tools/org/apache/derby/loc/toolsmessages.properties
    db/derby/code/trunk/tools/jar/extraDBMSclasses.properties
    db/derby/code/trunk/tools/jar/tools.properties

Modified: db/derby/code/trunk/java/engine/org/apache/derby/catalog/Java5SystemProcedures.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/catalog/Java5SystemProcedures.java?rev=1479642&r1=1479641&r2=1479642&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/catalog/Java5SystemProcedures.java (original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/catalog/Java5SystemProcedures.java Mon
May  6 17:00:12 2013
@@ -64,7 +64,7 @@ public  class   Java5SystemProcedures
     {
         { "databaseMetaData", "org.apache.derby.impl.tools.optional.DBMDWrapper" },
         { "foreignViews", "org.apache.derby.impl.tools.optional.ForeignDBViews" },
-        { "optimizerTracing", "org.apache.derby.impl.tools.optional.OptimizerTracer" },
+        { "optimizerTracing", "org.apache.derby.impl.sql.compile.OptimizerTracer" },
     };
 
     ///////////////////////////////////////////////////////////////////////////////////

Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/build.xml
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/build.xml?rev=1479642&r1=1479641&r2=1479642&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/build.xml (original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/build.xml Mon May  6 17:00:12
2013
@@ -86,7 +86,9 @@
 
   </target>
 
-  <target name="compile" depends="parser">
+  <target name="compile" depends="compileCDC,compile6"/>
+
+  <target name="compileCDC" depends="parser">
     <javac
       source="1.4"
       target="1.4"
@@ -104,9 +106,31 @@
         <pathelement path="${compile.classpath}"/>
       </classpath>
       <include name="${derby.dir}/${cur.dir}/**"/>
+	  <exclude name="${derby.dir}/${cur.dir}/compile/OptimizerTracer.java"/>
     </javac>
     <copy file="${derby.engine.src.dir}/${derby.dir}/${cur.dir}/catalog/metadata_net.properties"
tofile="${out.dir}/org/apache/derby/impl/sql/catalog/metadata_net.properties"/>
   </target>
 
+  <target name="compile6" depends="compileCDC">
+    <javac
+      source="1.6"
+      target="1.6"
+      bootclasspath="${empty}"
+      nowarn="on"
+      debug="${debug}"
+      depend="${depend}"
+      deprecation="${deprecation}"
+      optimize="${optimize}"
+      proceed="${proceed}"
+      verbose="${verbose}"
+      srcdir="${derby.engine.src.dir}"
+      destdir="${out.dir}">
+      <classpath>
+        <pathelement path="${java16compile.classpath}"/>
+      </classpath>
+	  <include name="${derby.dir}/${cur.dir}/compile/OptimizerTracer.java"/>
+    </javac>
+  </target>
+
 </project>
 

Copied: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/OptimizerTracer.java
(from r1479553, db/derby/code/trunk/java/tools/org/apache/derby/impl/tools/optional/OptimizerTracer.java)
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/OptimizerTracer.java?p2=db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/OptimizerTracer.java&p1=db/derby/code/trunk/java/tools/org/apache/derby/impl/tools/optional/OptimizerTracer.java&r1=1479553&r2=1479642&rev=1479642&view=diff
==============================================================================
--- db/derby/code/trunk/java/tools/org/apache/derby/impl/tools/optional/OptimizerTracer.java
(original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/OptimizerTracer.java
Mon May  6 17:00:12 2013
@@ -1,6 +1,6 @@
 /*
 
-   Derby - Class org.apache.derby.impl.tools.optional.OptimizerTracer
+   Derby - Class org.apache.derby.impl.sql.compile.OptimizerTracer
 
    Licensed to the Apache Software Foundation (ASF) under one or more
    contributor license agreements.  See the NOTICE file distributed with
@@ -19,25 +19,23 @@
 
  */
 
-package org.apache.derby.impl.tools.optional;
+package org.apache.derby.impl.sql.compile;
 
 import java.io.PrintWriter;
 import java.sql.SQLException;
 
 import org.apache.derby.iapi.db.OptimizerTrace;
-import org.apache.derby.iapi.tools.i18n.LocalizedResource;
+import org.apache.derby.iapi.reference.SQLState;
+import org.apache.derby.iapi.services.i18n.MessageService;
 import org.apache.derby.iapi.services.loader.ClassFactory;
 import org.apache.derby.iapi.services.context.ContextService;
 import org.apache.derby.iapi.sql.compile.CompilerContext;
 import org.apache.derby.iapi.sql.compile.OptTrace;
 import org.apache.derby.iapi.sql.dictionary.OptionalTool;
 
-import org.apache.derby.impl.sql.compile.DefaultOptTrace;
-
 /**
  * <p>
- * OptionalTool to create wrapper functions and views for all of the user tables
- * in a foreign database.
+ * OptionalTool for tracing the Optimizer.
  * </p>
  */
 public	class   OptimizerTracer  implements OptionalTool
@@ -93,7 +91,7 @@ public	class   OptimizerTracer  implemen
         else if ( "custom".equals( configurationParameters[ 0 ] ) )
         {
             if ( configurationParameters.length != 2 )
-            { throw wrap( LocalizedResource.getMessage( "OT_BadLoadUnloadArgs" ) ); }
+            { throw wrap( MessageService.getTextMessage( SQLState.LANG_BAD_OPTIONAL_TOOL_ARGS
) ); }
 
             String  customOptTraceName = configurationParameters[ 1 ];
 
@@ -108,13 +106,13 @@ public	class   OptimizerTracer  implemen
             catch (IllegalAccessException cnfe) { throw cantInstantiate( customOptTraceName
); }
             catch (Throwable t) { throw wrap( t ); }
         }
-        else { throw wrap( LocalizedResource.getMessage( "OT_BadLoadUnloadArgs" ) ); }
+        else { throw wrap( MessageService.getTextMessage( SQLState.LANG_BAD_OPTIONAL_TOOL_ARGS
) ); }
                      
         OptimizerTrace.setOptimizerTracer( tracer );
     }
     private SQLException    cantInstantiate( String className )
     {
-        return wrap( LocalizedResource.getMessage( "OT_CantInstantiateClass", className )
);
+        return wrap( MessageService.getTextMessage( SQLState.LANG_CANT_INSTANTIATE_CLASS,
className ) );
     }
 
     /**

Modified: db/derby/code/trunk/java/engine/org/apache/derby/loc/messages.xml
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/loc/messages.xml?rev=1479642&r1=1479641&r2=1479642&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/loc/messages.xml (original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/loc/messages.xml Mon May  6 17:00:12
2013
@@ -3630,6 +3630,17 @@ Guide.
                 <arg>toolName</arg>
             </msg>
 
+            <msg>
+                <name>X0Y89.S</name>
+                <text>Bad arguments passed to SYSCS_UTIL.SYSCS_REGISTER_TOOL(). Please
consult the Reference Manual section which describes this system procedure.</text>
+            </msg>
+
+            <msg>
+                <name>X0Y90.S</name>
+                <text>Cannot create an instance of {0}. Maybe this class is not visible
on the classpath. Maybe it doesn not have a 0-arg constructor.</text>
+                <arg>className</arg>
+            </msg>
+
         </family>
 
 

Modified: db/derby/code/trunk/java/shared/org/apache/derby/shared/common/reference/SQLState.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/shared/org/apache/derby/shared/common/reference/SQLState.java?rev=1479642&r1=1479641&r2=1479642&view=diff
==============================================================================
--- db/derby/code/trunk/java/shared/org/apache/derby/shared/common/reference/SQLState.java
(original)
+++ db/derby/code/trunk/java/shared/org/apache/derby/shared/common/reference/SQLState.java
Mon May  6 17:00:12 2013
@@ -1388,6 +1388,8 @@ public interface SQLState {
 	String LANG_CANT_FLUSH_PREALLOCATOR                                = "X0Y86.S";
 	String LANG_BAD_UDA_OR_FUNCTION_NAME                                = "X0Y87.S";
 	String LANG_UNKNOWN_TOOL_NAME                                = "X0Y88.S";
+	String LANG_BAD_OPTIONAL_TOOL_ARGS                                = "X0Y89.S";
+	String LANG_CANT_INSTANTIATE_CLASS                                = "X0Y90.S";
 
 
 	// TEMPORARY EXECUTION RESTRICTIONS

Modified: db/derby/code/trunk/java/tools/org/apache/derby/loc/toolsmessages.properties
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/tools/org/apache/derby/loc/toolsmessages.properties?rev=1479642&r1=1479641&r2=1479642&view=diff
==============================================================================
--- db/derby/code/trunk/java/tools/org/apache/derby/loc/toolsmessages.properties (original)
+++ db/derby/code/trunk/java/tools/org/apache/derby/loc/toolsmessages.properties Mon May 
6 17:00:12 2013
@@ -406,5 +406,4 @@ OT_BadLoadUnloadArgs=Bad arguments passe
 # arg0 = a JDBC type ID from java.sql.Types
 # arg1 = the name of a foreign data type returned by java.sql.DatabaseMetaData.getColumns().getString(
6 )
 OT_UnknownForeignDataType=Unknown external data type. JDBC type = {0}, external type name
= {1}.
-OT_CantInstantiateClass=Cannot create an instance of {0}. Maybe this class is not visible
on the classpath. Maybe it doesn not have a 0-arg constructor.
 

Modified: db/derby/code/trunk/tools/jar/extraDBMSclasses.properties
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/tools/jar/extraDBMSclasses.properties?rev=1479642&r1=1479641&r2=1479642&view=diff
==============================================================================
--- db/derby/code/trunk/tools/jar/extraDBMSclasses.properties (original)
+++ db/derby/code/trunk/tools/jar/extraDBMSclasses.properties Mon May  6 17:00:12 2013
@@ -106,3 +106,6 @@ derby.module.store.cpf=org.apache.derby.
 
 derby.module.shared.threaddump=org.apache.derby.shared.common.sanity.ThreadDump
 derby.module.engine.threaddump=org.apache.derby.iapi.error.ThreadDump
+
+# optional tools
+derby.module.opttrace=org.apache.derby.impl.sql.compile.OptimizerTracer

Modified: db/derby/code/trunk/tools/jar/tools.properties
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/tools/jar/tools.properties?rev=1479642&r1=1479641&r2=1479642&view=diff
==============================================================================
--- db/derby/code/trunk/tools/jar/tools.properties (original)
+++ db/derby/code/trunk/tools/jar/tools.properties Mon May  6 17:00:12 2013
@@ -31,6 +31,5 @@ derby.module.SignatureChecker=org.apache
 derby.module.planexporter=org.apache.derby.tools.PlanExporter
 derby.module.dbmdwrapper=org.apache.derby.impl.tools.optional.DBMDWrapper
 derby.module.fdbv=org.apache.derby.impl.tools.optional.ForeignDBViews
-derby.module.opttrace=org.apache.derby.impl.tools.optional.OptimizerTracer
 
 



Mime
View raw message