db-derby-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rhille...@apache.org
Subject svn commit: r713721 - in /db/derby/code/trunk/java/engine/org/apache/derby: iapi/sql/conn/LanguageConnectionContext.java impl/sql/GenericStatement.java impl/sql/conn/GenericLanguageConnectionContext.java
Date Thu, 13 Nov 2008 13:35:00 GMT
Author: rhillegas
Date: Thu Nov 13 05:34:59 2008
New Revision: 713721

URL: http://svn.apache.org/viewvc?rev=713721&view=rev
Log:
DERBY-3946: Check in a bit of debug logic which allows us to run the parser standalone.

Modified:
    db/derby/code/trunk/java/engine/org/apache/derby/iapi/sql/conn/LanguageConnectionContext.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/GenericStatement.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/conn/GenericLanguageConnectionContext.java

Modified: db/derby/code/trunk/java/engine/org/apache/derby/iapi/sql/conn/LanguageConnectionContext.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/iapi/sql/conn/LanguageConnectionContext.java?rev=713721&r1=713720&r2=713721&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/iapi/sql/conn/LanguageConnectionContext.java
(original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/iapi/sql/conn/LanguageConnectionContext.java
Thu Nov 13 05:34:59 2008
@@ -1189,4 +1189,15 @@
 	 * @return new SQLSessionContext
 	 */
 	public SQLSessionContext createSQLSessionContext();
+
+	/**
+     * Debug method for remembering the last query tree.
+	 */
+    public  void    setLastQueryTree( Object queryTree );
+
+	/**
+     * Debug method for retrieving the last query tree.
+	 */
+    public  Object    getLastQueryTree();
+
 }

Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/GenericStatement.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/GenericStatement.java?rev=713721&r1=713720&r2=713721&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/GenericStatement.java (original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/GenericStatement.java Thu Nov
13 05:34:59 2008
@@ -290,6 +290,8 @@
 
 					if (SanityManager.DEBUG_ON("StopAfterParsing")) 
 					{
+                        lcc.setLastQueryTree( qt );
+                        
 						throw StandardException.newException(SQLState.LANG_STOP_AFTER_PARSING);
 					}
 				}

Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/conn/GenericLanguageConnectionContext.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/conn/GenericLanguageConnectionContext.java?rev=713721&r1=713720&r2=713721&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/conn/GenericLanguageConnectionContext.java
(original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/conn/GenericLanguageConnectionContext.java
Thu Nov 13 05:34:59 2008
@@ -135,6 +135,8 @@
 	private final int instanceNumber;
 	private String drdaID;
 	private String dbname;
+
+    private Object lastQueryTree; // for debugging
     
 	/**
 	The transaction to use within this language connection context.  It may
@@ -613,6 +615,10 @@
 		getCurrentSQLSessionContext().setRole(null);
 	}
 
+    // debug methods
+    public  void    setLastQueryTree( Object queryTree ) { lastQueryTree = queryTree; }
+    public  Object    getLastQueryTree() { return lastQueryTree; }
+
 	/**
 	 * Drop all the declared global temporary tables associated with this connection. This gets
called
 	 * when a getConnection() is done on a PooledConnection. This will ensure all the temporary
tables



Mime
View raw message