db-derby-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From d..@apache.org
Subject svn commit: r292876 [1/2] - in /db/derby/code/trunk/java: engine/org/apache/derby/diag/ engine/org/apache/derby/iapi/sql/ engine/org/apache/derby/iapi/sql/compile/ engine/org/apache/derby/iapi/sql/dictionary/ engine/org/apache/derby/impl/sql/ engine/or...
Date Fri, 30 Sep 2005 23:48:22 GMT
Author: djd
Date: Fri Sep 30 16:38:14 2005
New Revision: 292876

URL: http://svn.apache.org/viewcvs?rev=292876&view=rev
Log:
DERBY-571 Virtual Table Mapping for no argument Diagnostic tables
Add code to map from a table definition to a vti constuctor at compile
time. Only supported for no-argument virtual tables and limited
to table driven set of diagnostic tables, lock_table, transaction_table,
statment_cache and error_messages. Initial step towards a more
generalized application defined virtual table solution.

Modified:
    db/derby/code/trunk/java/engine/org/apache/derby/diag/StatementCache.java
    db/derby/code/trunk/java/engine/org/apache/derby/iapi/sql/Statement.java
    db/derby/code/trunk/java/engine/org/apache/derby/iapi/sql/compile/NodeFactory.java
    db/derby/code/trunk/java/engine/org/apache/derby/iapi/sql/dictionary/DataDictionary.java
    db/derby/code/trunk/java/engine/org/apache/derby/iapi/sql/dictionary/TableDescriptor.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/catalog/DataDictionaryImpl.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/DDLStatementNode.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/DMLModStatementNode.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/FromBaseTable.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/NodeFactoryImpl.java
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/DerbyNetClient/netxaPositive.out
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/DerbyNetClient/xaSimplePositive.out
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/EscalateLock.out
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/Rllmodule1.out
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/Rllmodule2.out
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/Rllmodule3.out
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/Rllmodule4.out
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/RowLockBasic.out
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/RowLockIso.out
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/TableLockBasic.out
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/TransactionTable.out
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/autoincrement.out
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/db2Compatibility.out
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/dcl.out
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/ddlTableLockMode.out
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/derby94.out
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/heapscan.out
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/jdk15/dcl.out
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/lockTable.out
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/lockTableVti.out
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/readlocks.out
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/releaseCompileLocks.out
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/rlliso2multi.out
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/rlliso3multi.out
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/stmtCache0.out
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/stmtCache1.out
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/triggerGeneral.out
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/update.out
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/updatelocks.out
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/updatelocksJDBC30.out
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/xaAnotherTest.out
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/xaMorph.out
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/xaOffline1.out
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/xaSimpleNegative.out
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/xaSimplePositive.out
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/xaStateTran.out
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/xab2354.out
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/xaAnotherTest.sql
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/xaMorph.sql
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/LockTableQuery.subsql
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/autoincrement.sql
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/db2Compatibility.sql
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/dcl_readOnly.sql
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/ddlTableLockMode.sql
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/releaseCompileLocks.sql
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/stmtCache0.sql
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/stmtCacheAliases.subsql
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/triggerGeneral.sql
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/update.sql
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/store/LockTableQuery.subsql
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/store/TransactionTable.sql
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/store/global_xactTable.view
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/store/lockTableVti.sql
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/store/xab2354.sql
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/storetests/derby94.sql

Modified: db/derby/code/trunk/java/engine/org/apache/derby/diag/StatementCache.java
URL: http://svn.apache.org/viewcvs/db/derby/code/trunk/java/engine/org/apache/derby/diag/StatementCache.java?rev=292876&r1=292875&r2=292876&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/diag/StatementCache.java (original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/diag/StatementCache.java Fri Sep 30 16:38:14 2005
@@ -158,7 +158,9 @@
 		wasNull = false;
 		switch (colId) {
 		case 4:
-			return currentPs.statement.getUnicode();
+			// was/is UniCode column, but since Derby 10.0 all
+			// statements are compiled and submitted as UniCode.
+			return true;
 		case 5:
 			return currentPs.isValid();
 		default:

Modified: db/derby/code/trunk/java/engine/org/apache/derby/iapi/sql/Statement.java
URL: http://svn.apache.org/viewcvs/db/derby/code/trunk/java/engine/org/apache/derby/iapi/sql/Statement.java?rev=292876&r1=292875&r2=292876&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/iapi/sql/Statement.java (original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/iapi/sql/Statement.java Fri Sep 30 16:38:14 2005
@@ -88,7 +88,4 @@
 	 *	@return the SQL string this statement is for.
 	 */
 	String getSource();
-
-	public boolean getUnicode();
-
 }

Modified: db/derby/code/trunk/java/engine/org/apache/derby/iapi/sql/compile/NodeFactory.java
URL: http://svn.apache.org/viewcvs/db/derby/code/trunk/java/engine/org/apache/derby/iapi/sql/compile/NodeFactory.java?rev=292876&r1=292875&r2=292876&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/iapi/sql/compile/NodeFactory.java (original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/iapi/sql/compile/NodeFactory.java Fri Sep 30 16:38:14 2005
@@ -20,9 +20,12 @@
 
 package org.apache.derby.iapi.sql.compile;
 
+import java.util.Properties;
+
 import org.apache.derby.iapi.services.context.ContextManager;
 
 import org.apache.derby.iapi.sql.dictionary.DataDictionary;
+import org.apache.derby.iapi.sql.dictionary.TableDescriptor;
 
 import org.apache.derby.iapi.error.StandardException;
 
@@ -31,6 +34,8 @@
  * manish - Wed Mar 28 13:05:19 PST 2001
  */
 import	org.apache.derby.impl.sql.compile.QueryTreeNode;
+import org.apache.derby.impl.sql.compile.ResultColumnList;
+import org.apache.derby.impl.sql.compile.ResultSetNode;
 
 /**
 	This is an interface for NodeFactories.
@@ -597,6 +602,27 @@
 		ContextManager cm)
 		throws StandardException;
 
+	
+	/**
+	 * Return a correctly configured node that represents
+	 * a scan from a VTI dervied from the TableDesciptor.
+	 * Used to convert from system diagnostic tables
+	 * to VTI scans.
+	 * @param td Table that is really a vti
+	 * @param vtiClass Java class name for virtual table
+	 * @param correlationName Correlation name of table clause
+	 * @param resultColumns Columns extracted from table.
+	 * @param tableProperties Properties being passed onto the table scan
+	 * @param cm Current context manager
+	 * @return
+	 */
+	public abstract ResultSetNode mapTableAsVTI(
+			TableDescriptor td,
+			String vtiClass,
+			String correlationName,
+			ResultColumnList resultColumns,
+			Properties tableProperties,		
+			ContextManager cm) throws StandardException;
 
 }
 

Modified: db/derby/code/trunk/java/engine/org/apache/derby/iapi/sql/dictionary/DataDictionary.java
URL: http://svn.apache.org/viewcvs/db/derby/code/trunk/java/engine/org/apache/derby/iapi/sql/dictionary/DataDictionary.java?rev=292876&r1=292875&r2=292876&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/iapi/sql/dictionary/DataDictionary.java (original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/iapi/sql/dictionary/DataDictionary.java Fri Sep 30 16:38:14 2005
@@ -1538,4 +1538,13 @@
 		@return True if the database has been upgraded to the required level, false otherwise.
 	*/
 	public boolean checkVersion(int majorVersion, String feature) throws StandardException;
+	
+	/**
+	 * Return the Java class to use for the VTI for
+	 * the virtual table. Assumes the descriptor is
+	 * of type TableDescriptor.VTI_TYPE.
+	 */
+	public String getVTIClass(TableDescriptor td)
+		throws StandardException;
+
 }	

Modified: db/derby/code/trunk/java/engine/org/apache/derby/iapi/sql/dictionary/TableDescriptor.java
URL: http://svn.apache.org/viewcvs/db/derby/code/trunk/java/engine/org/apache/derby/iapi/sql/dictionary/TableDescriptor.java?rev=292876&r1=292875&r2=292876&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/iapi/sql/dictionary/TableDescriptor.java (original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/iapi/sql/dictionary/TableDescriptor.java Fri Sep 30 16:38:14 2005
@@ -102,6 +102,7 @@
 	public static final int VIEW_TYPE = 2;
 	public static final int GLOBAL_TEMPORARY_TABLE_TYPE = 3;
 	public static final int SYNONYM_TYPE = 4;
+	public static final int VTI_TYPE = 5;
 
 	public static final char	ROW_LOCK_GRANULARITY = 'R';
 	public static final char	TABLE_LOCK_GRANULARITY = 'T';

Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/GenericStatement.java
URL: http://svn.apache.org/viewcvs/db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/GenericStatement.java?rev=292876&r1=292875&r2=292876&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 Fri Sep 30 16:38:14 2005
@@ -554,10 +554,6 @@
 		return statementText;
 	}
 
-	public boolean getUnicode() {
-		return true;
-	}
-
 	public String getCompilationSchema() {
 		return compilationSchema.getDescriptorName();
 	}

Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/catalog/DataDictionaryImpl.java
URL: http://svn.apache.org/viewcvs/db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/catalog/DataDictionaryImpl.java?rev=292876&r1=292875&r2=292876&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/catalog/DataDictionaryImpl.java (original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/catalog/DataDictionaryImpl.java Fri Sep 30 16:38:14 2005
@@ -25,8 +25,6 @@
 import org.apache.derby.iapi.reference.SQLState;
 import org.apache.derby.iapi.reference.Limits;
 
-import org.apache.derby.iapi.sql.compile.CompilerContext;
-
 import org.apache.derby.iapi.sql.dictionary.AliasDescriptor;
 import org.apache.derby.iapi.sql.dictionary.CatalogRowFactory;
 
@@ -1666,6 +1664,22 @@
 				: schema;
 
 		UUID schemaUUID = sd.getUUID();
+		
+		if (SchemaDescriptor.STD_SYSTEM_DIAG_SCHEMA_NAME.equals(
+				sd.getSchemaName()))
+		{
+			TableDescriptor td =
+				new TableDescriptor(this, tableName, sd,
+						TableDescriptor.VTI_TYPE,
+						TableDescriptor.DEFAULT_LOCK_GRANULARITY);
+			
+			// ensure a vti class exists
+			if (getVTIClass(td) != null)
+				return td;
+			
+			// otherwise just standard search
+		}
+				
 		TableKey tableKey = 	new TableKey(schemaUUID, tableName);
 
 		/* Only use the cache if we're in compile-only mode */
@@ -9426,6 +9440,37 @@
 
 	private static List newSList() {
 		return java.util.Collections.synchronizedList(new java.util.LinkedList());
+	}
+
+	private String[][] DIAG_VTI_CLASSES =
+	{
+			{"LOCK_TABLE", "org.apache.derby.diag.LockTable"},
+			{"STATEMENT_CACHE", "org.apache.derby.diag.StatementCache"},
+			{"TRANSACTION_TABLE", "org.apache.derby.diag.TransactionTable"},
+			{"ERROR_MESSAGES", "org.apache.derby.diag.ErrorMessages"},
+			
+			
+	};
+	
+	/**
+	 * @see org.apache.derby.iapi.sql.dictionary.DataDictionary#getVTIClass(org.apache.derby.iapi.sql.dictionary.TableDescriptor)
+	 */
+	public String getVTIClass(TableDescriptor td) throws StandardException {
+		
+		if (SanityManager.DEBUG)
+		{
+			if (td.getTableType() != TableDescriptor.VTI_TYPE)
+				SanityManager.THROWASSERT("getVTIClass: Invalid table type " + td);
+		}
+		
+		for (int i = 0; i < DIAG_VTI_CLASSES.length; i++)
+		{
+			String[] entry = DIAG_VTI_CLASSES[i];
+			if (entry[0].equals(td.getDescriptorName()))
+				return entry[1];	
+		}	
+		
+		return null;
 	}
 }
 

Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/DDLStatementNode.java
URL: http://svn.apache.org/viewcvs/db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/DDLStatementNode.java?rev=292876&r1=292875&r2=292876&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/DDLStatementNode.java (original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/DDLStatementNode.java Fri Sep 30 16:38:14 2005
@@ -282,6 +282,7 @@
 		String sqlState = null;
 
 		switch (td.getTableType()) {
+		case TableDescriptor.VTI_TYPE:
 		case TableDescriptor.SYSTEM_TABLE_TYPE:
 
 			/*

Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/DMLModStatementNode.java
URL: http://svn.apache.org/viewcvs/db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/DMLModStatementNode.java?rev=292876&r1=292875&r2=292876&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/DMLModStatementNode.java (original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/DMLModStatementNode.java Fri Sep 30 16:38:14 2005
@@ -233,18 +233,23 @@
 				if (targetTableDescriptor == null)
 					throw StandardException.newException(SQLState.LANG_TABLE_NOT_FOUND, targetTableName);
 			}
-
-			// Views are currently not updatable */
-			if (targetTableDescriptor.getTableType() == TableDescriptor.VIEW_TYPE)
+			
+			switch (targetTableDescriptor.getTableType())
 			{
+			case TableDescriptor.VIEW_TYPE:
+				// Views are currently not updatable
 				throw StandardException.newException(SQLState.LANG_VIEW_NOT_UPDATEABLE, 
-								targetTableName);
-			}
-			/* System tables are not updatable */
-			if (targetTableDescriptor.getTableType() == TableDescriptor.SYSTEM_TABLE_TYPE)
-			{
+						targetTableName);
+			
+			case TableDescriptor.VTI_TYPE:
+				// fall through - currently all vti tables are system tables.
+			case TableDescriptor.SYSTEM_TABLE_TYPE:
+				// System tables are not updatable
 				throw StandardException.newException(SQLState.LANG_UPDATE_SYSTEM_TABLE_ATTEMPTED, 
-								targetTableName);
+						targetTableName);
+				default:
+					break;
+				
 			}
 
 			/* We need to get some kind of table lock (IX here), to prevent

Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/FromBaseTable.java
URL: http://svn.apache.org/viewcvs/db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/FromBaseTable.java?rev=292876&r1=292875&r2=292876&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/FromBaseTable.java (original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/FromBaseTable.java Fri Sep 30 16:38:14 2005
@@ -2119,11 +2119,16 @@
 	{
 		TableDescriptor tableDescriptor = bindTableDescriptor();
 
-/*		if (tableDescriptor.getTableType() == TableDescriptor.VTI_TYPE) {
-			ResultSetNode vtiNode = getNodeFactory().mapTableAsVTI(getContextManager(), tableDescriptor);
+		if (tableDescriptor.getTableType() == TableDescriptor.VTI_TYPE) {
+			ResultSetNode vtiNode = getNodeFactory().mapTableAsVTI(
+					tableDescriptor,
+					dataDictionary.getVTIClass(tableDescriptor),
+					getCorrelationName(),
+					resultColumns,
+					getProperties(),
+					getContextManager());
 			return vtiNode.bindNonVTITables(dataDictionary, fromListParam);
-		}
-*/	
+		}	
 		
 		ResultColumnList	derivedRCL = resultColumns;
   

Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/NodeFactoryImpl.java
URL: http://svn.apache.org/viewcvs/db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/NodeFactoryImpl.java?rev=292876&r1=292875&r2=292876&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/NodeFactoryImpl.java (original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/NodeFactoryImpl.java Fri Sep 30 16:38:14 2005
@@ -21,6 +21,7 @@
 package	org.apache.derby.impl.sql.compile;
 
 import java.util.Properties;
+import java.util.Vector;
 
 import org.apache.derby.iapi.services.context.ContextManager;
 
@@ -32,6 +33,7 @@
 
 import org.apache.derby.iapi.sql.compile.NodeFactory;
 import org.apache.derby.iapi.sql.compile.C_NodeTypes;
+import org.apache.derby.iapi.sql.dictionary.TableDescriptor;
 
 import org.apache.derby.iapi.services.sanity.SanityManager;
 import org.apache.derby.iapi.services.property.PropertyUtil;
@@ -70,6 +72,8 @@
 	private Boolean joinOrderOptimization = Boolean.TRUE;
 
 	private final ClassInfo[]	nodeCi = new ClassInfo[205];
+	
+	private static final Vector emptyVector = new Vector(0);
 
 	//////////////////////////////////////////////////////////////////////
 	//
@@ -650,4 +654,62 @@
 			delimitedIdentifier,
 			cm );
 	}
+
+	/**
+	 * Return a node that represents invocation of the virtual table
+	 * for the given table descriptor using the passed in vti class name.
+	 * <P>
+	 * Currently only handles no argument vtis corresponding to a subset
+	 * of the diagnostic tables. (e.g. lock_table).
+	 * The node returned is a FROM_VTI node with a passed in NEW_INVOCATION_NODE
+	 * representing the class, with no arguments.
+	 * Other attributes of the original FROM_TABLE node (such as resultColumns)
+	 * are passed into the FROM_VTI node.
+	 * 
+	 * @see org.apache.derby.iapi.sql.compile.NodeFactory#mapTableAsVTI(org.apache.derby.iapi.sql.dictionary.TableDescriptor, org.apache.derby.iapi.services.context.ContextManager)
+	 */
+	public ResultSetNode mapTableAsVTI(
+			TableDescriptor td,
+			String vtiClass,
+			String correlationName,
+			ResultColumnList resultColumns,
+			Properties tableProperties,		
+			ContextManager cm)
+		throws StandardException {
+		
+	
+		QueryTreeNode newNode = getNode(C_NodeTypes.NEW_INVOCATION_NODE, 
+				vtiClass,
+				emptyVector, Boolean.FALSE,
+				cm);
+		
+		 QueryTreeNode vtiNode;
+		 
+		 if (correlationName != null)
+		 {
+			 vtiNode = getNode(C_NodeTypes.FROM_VTI,
+						newNode,
+						correlationName,
+						resultColumns,
+						tableProperties,
+						cm);
+		 }
+		 else
+		 {
+			 TableName exposedName = newNode.makeTableName(td.getSchemaName(),
+						td.getDescriptorName());
+			 
+			vtiNode = getNode(C_NodeTypes.FROM_VTI,
+						newNode,
+						correlationName,
+						resultColumns,
+						tableProperties,
+						exposedName,
+						cm);
+		}
+		 
+		return (ResultSetNode) vtiNode;
+	}
 }
+
+

Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/DerbyNetClient/netxaPositive.out
URL: http://svn.apache.org/viewcvs/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/DerbyNetClient/netxaPositive.out?rev=292876&r1=292875&r2=292876&view=diff
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/DerbyNetClient/netxaPositive.out (original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/DerbyNetClient/netxaPositive.out Fri Sep 30 16:38:14 2005
@@ -29,7 +29,7 @@
     case when first_instant is NULL then 'NULL' else 'false' end as readOnly,
     cast (username as char(10)) as username,
     type 
-from new org.apache.derby.diag.TransactionTable() t;
+from syscs_diag.transaction_table;
 0 rows inserted/updated/deleted
 ij(XA)> select * from global_xactTable where gxid is not null order by gxid;
 GXID |STATUS |READ& |USERNAME |TYPE                          

Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/DerbyNetClient/xaSimplePositive.out
URL: http://svn.apache.org/viewcvs/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/DerbyNetClient/xaSimplePositive.out?rev=292876&r1=292875&r2=292876&view=diff
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/DerbyNetClient/xaSimplePositive.out (original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/DerbyNetClient/xaSimplePositive.out Fri Sep 30 16:38:14 2005
@@ -23,7 +23,7 @@
     case when first_instant is NULL then 'NULL' else 'false' end as readOnly,
     cast (username as char(10)) as username,
     type 
-from new org.apache.derby.diag.TransactionTable() t;
+from syscs_diag.transaction_table;
 0 rows inserted/updated/deleted
 ij(XA)> select * from global_xactTable where gxid is not null order by gxid;
 GXID |STATUS |READ& |USERNAME |TYPE                          

Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/EscalateLock.out
URL: http://svn.apache.org/viewcvs/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/EscalateLock.out?rev=292876&r1=292875&r2=292876&view=diff
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/EscalateLock.out (original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/EscalateLock.out Fri Sep 30 16:38:14 2005
@@ -19,7 +19,7 @@
     state,
     status
 from 
-    new org.apache.derby.diag.LockTable() l  right outer join new org.apache.derby.diag.TransactionTable() t
+    syscs_diag.lock_table l  right outer join syscs_diag.transaction_table t
 on l.xid = t.xid where l.tableType <> 'S' and t.type='UserTransaction';
 0 rows inserted/updated/deleted
 ij> --on l.xid = t.xid where l.tableType <> 'S' or l.tableType is null
@@ -38,7 +38,7 @@
     state,
     status
 from 
-    new org.apache.derby.diag.LockTable() l right outer join new org.apache.derby.diag.TransactionTable() t
+    syscs_diag.lock_table l right outer join syscs_diag.transaction_table t
 on l.xid = t.xid where l.tableType <> 'S' ;
 0 rows inserted/updated/deleted
 ij> -- lock table with no join.
@@ -52,7 +52,7 @@
     cast(lockname as char(10)) as lockname,
     state
 from 
-    new org.apache.derby.diag.LockTable() l  
+    syscs_diag.lock_table l  
 where l.tableType <> 'S' ;
 0 rows inserted/updated/deleted
 ij> -- transaction table with no join.
@@ -60,7 +60,7 @@
 select 
     *
 from 
-    new org.apache.derby.diag.TransactionTable() t ;
+    syscs_diag.transaction_table t ;
 0 rows inserted/updated/deleted
 ij> autocommit off;
 ij> -- TEST 1 - make sure IX row locks are escalated to a persistent X table lock.

Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/Rllmodule1.out
URL: http://svn.apache.org/viewcvs/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/Rllmodule1.out?rev=292876&r1=292875&r2=292876&view=diff
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/Rllmodule1.out (original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/Rllmodule1.out Fri Sep 30 16:38:14 2005
@@ -13,7 +13,7 @@
     state,
     status
 from 
-    new org.apache.derby.diag.LockTable() l  right outer join new org.apache.derby.diag.TransactionTable() t
+    syscs_diag.lock_table l  right outer join syscs_diag.transaction_table t
 on l.xid = t.xid where l.tableType <> 'S' and t.type='UserTransaction';
 0 rows inserted/updated/deleted
 ij> --on l.xid = t.xid where l.tableType <> 'S' or l.tableType is null
@@ -32,7 +32,7 @@
     state,
     status
 from 
-    new org.apache.derby.diag.LockTable() l right outer join new org.apache.derby.diag.TransactionTable() t
+    syscs_diag.lock_table l right outer join syscs_diag.transaction_table t
 on l.xid = t.xid where l.tableType <> 'S' ;
 0 rows inserted/updated/deleted
 ij> -- lock table with no join.
@@ -46,7 +46,7 @@
     cast(lockname as char(10)) as lockname,
     state
 from 
-    new org.apache.derby.diag.LockTable() l  
+    syscs_diag.lock_table l  
 where l.tableType <> 'S' ;
 0 rows inserted/updated/deleted
 ij> -- transaction table with no join.
@@ -54,7 +54,7 @@
 select 
     *
 from 
-    new org.apache.derby.diag.TransactionTable() t ;
+    syscs_diag.transaction_table;
 0 rows inserted/updated/deleted
 ij> autocommit off;
 ij> create table heap_only (a int);

Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/Rllmodule2.out
URL: http://svn.apache.org/viewcvs/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/Rllmodule2.out?rev=292876&r1=292875&r2=292876&view=diff
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/Rllmodule2.out (original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/Rllmodule2.out Fri Sep 30 16:38:14 2005
@@ -14,7 +14,7 @@
     state,
     status
 from 
-    new org.apache.derby.diag.LockTable() l  right outer join new org.apache.derby.diag.TransactionTable() t
+    syscs_diag.lock_table l  right outer join syscs_diag.transaction_table t
 on l.xid = t.xid where l.tableType <> 'S' and t.type='UserTransaction';
 0 rows inserted/updated/deleted
 ij> --on l.xid = t.xid where l.tableType <> 'S' or l.tableType is null
@@ -33,7 +33,7 @@
     state,
     status
 from 
-    new org.apache.derby.diag.LockTable() l right outer join new org.apache.derby.diag.TransactionTable() t
+    syscs_diag.lock_table l right outer join syscs_diag.transaction_table t
 on l.xid = t.xid where l.tableType <> 'S' ;
 0 rows inserted/updated/deleted
 ij> -- lock table with no join.
@@ -47,7 +47,7 @@
     cast(lockname as char(10)) as lockname,
     state
 from 
-    new org.apache.derby.diag.LockTable() l  
+    syscs_diag.lock_table l  
 where l.tableType <> 'S' ;
 0 rows inserted/updated/deleted
 ij> -- transaction table with no join.
@@ -55,7 +55,7 @@
 select 
     *
 from 
-    new org.apache.derby.diag.TransactionTable() t ;
+    syscs_diag.transaction_table;
 0 rows inserted/updated/deleted
 ij> autocommit off;
 ij> create table heap_only (a int);

Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/Rllmodule3.out
URL: http://svn.apache.org/viewcvs/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/Rllmodule3.out?rev=292876&r1=292875&r2=292876&view=diff
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/Rllmodule3.out (original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/Rllmodule3.out Fri Sep 30 16:38:14 2005
@@ -13,7 +13,7 @@
     state,
     status
 from 
-    new org.apache.derby.diag.LockTable() l  right outer join new org.apache.derby.diag.TransactionTable() t
+    syscs_diag.lock_table l  right outer join syscs_diag.transaction_table t
 on l.xid = t.xid where l.tableType <> 'S' and t.type='UserTransaction';
 0 rows inserted/updated/deleted
 ij> --on l.xid = t.xid where l.tableType <> 'S' or l.tableType is null
@@ -32,7 +32,7 @@
     state,
     status
 from 
-    new org.apache.derby.diag.LockTable() l right outer join new org.apache.derby.diag.TransactionTable() t
+    syscs_diag.lock_table l right outer join syscs_diag.transaction_table t
 on l.xid = t.xid where l.tableType <> 'S' ;
 0 rows inserted/updated/deleted
 ij> -- lock table with no join.
@@ -46,7 +46,7 @@
     cast(lockname as char(10)) as lockname,
     state
 from 
-    new org.apache.derby.diag.LockTable() l  
+    syscs_diag.lock_table l  
 where l.tableType <> 'S' ;
 0 rows inserted/updated/deleted
 ij> -- transaction table with no join.
@@ -54,7 +54,7 @@
 select 
     *
 from 
-    new org.apache.derby.diag.TransactionTable() t ;
+    syscs_diag.transaction_table;
 0 rows inserted/updated/deleted
 ij> autocommit off;
 ij> create table heap_only (a int);

Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/Rllmodule4.out
URL: http://svn.apache.org/viewcvs/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/Rllmodule4.out?rev=292876&r1=292875&r2=292876&view=diff
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/Rllmodule4.out (original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/Rllmodule4.out Fri Sep 30 16:38:14 2005
@@ -13,7 +13,7 @@
     state,
     status
 from 
-    new org.apache.derby.diag.LockTable() l  right outer join new org.apache.derby.diag.TransactionTable() t
+    syscs_diag.lock_table l  right outer join syscs_diag.transaction_table t
 on l.xid = t.xid where l.tableType <> 'S' and t.type='UserTransaction';
 0 rows inserted/updated/deleted
 ij> --on l.xid = t.xid where l.tableType <> 'S' or l.tableType is null
@@ -32,7 +32,7 @@
     state,
     status
 from 
-    new org.apache.derby.diag.LockTable() l right outer join new org.apache.derby.diag.TransactionTable() t
+    syscs_diag.lock_table l right outer join syscs_diag.transaction_table t
 on l.xid = t.xid where l.tableType <> 'S' ;
 0 rows inserted/updated/deleted
 ij> -- lock table with no join.
@@ -46,7 +46,7 @@
     cast(lockname as char(10)) as lockname,
     state
 from 
-    new org.apache.derby.diag.LockTable() l  
+    syscs_diag.lock_table l  
 where l.tableType <> 'S' ;
 0 rows inserted/updated/deleted
 ij> -- transaction table with no join.
@@ -54,7 +54,7 @@
 select 
     *
 from 
-    new org.apache.derby.diag.TransactionTable() t ;
+    syscs_diag.transaction_table;
 0 rows inserted/updated/deleted
 ij> autocommit off;
 ij> create table heap_only (a int);

Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/RowLockBasic.out
URL: http://svn.apache.org/viewcvs/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/RowLockBasic.out?rev=292876&r1=292875&r2=292876&view=diff
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/RowLockBasic.out (original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/RowLockBasic.out Fri Sep 30 16:38:14 2005
@@ -27,7 +27,7 @@
     state,
     status
 from 
-    new org.apache.derby.diag.LockTable() l  right outer join new org.apache.derby.diag.TransactionTable() t
+    syscs_diag.lock_table l  right outer join syscs_diag.transaction_table t
 on l.xid = t.xid where l.tableType <> 'S' and t.type='UserTransaction';
 0 rows inserted/updated/deleted
 ij> --on l.xid = t.xid where l.tableType <> 'S' or l.tableType is null
@@ -46,7 +46,7 @@
     state,
     status
 from 
-    new org.apache.derby.diag.LockTable() l right outer join new org.apache.derby.diag.TransactionTable() t
+    syscs_diag.lock_table l right outer join syscs_diag.transaction_table t
 on l.xid = t.xid where l.tableType <> 'S' ;
 0 rows inserted/updated/deleted
 ij> -- lock table with no join.
@@ -60,7 +60,7 @@
     cast(lockname as char(10)) as lockname,
     state
 from 
-    new org.apache.derby.diag.LockTable() l  
+    syscs_diag.lock_table l  
 where l.tableType <> 'S' ;
 0 rows inserted/updated/deleted
 ij> -- transaction table with no join.
@@ -68,7 +68,7 @@
 select 
     *
 from 
-    new org.apache.derby.diag.TransactionTable() t ;
+    syscs_diag.transaction_table;
 0 rows inserted/updated/deleted
 ij> call SYSCS_UTIL.SYSCS_SET_DATABASE_PROPERTY('derby.storage.pageSize', '4096');
 0 rows inserted/updated/deleted

Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/RowLockIso.out
URL: http://svn.apache.org/viewcvs/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/RowLockIso.out?rev=292876&r1=292875&r2=292876&view=diff
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/RowLockIso.out (original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/RowLockIso.out Fri Sep 30 16:38:14 2005
@@ -25,7 +25,7 @@
     state,
     status
 from 
-    new org.apache.derby.diag.LockTable() l  right outer join new org.apache.derby.diag.TransactionTable() t
+    syscs_diag.lock_table l  right outer join syscs_diag.transaction_table t
 on l.xid = t.xid where l.tableType <> 'S' and t.type='UserTransaction';
 0 rows inserted/updated/deleted
 ij> --on l.xid = t.xid where l.tableType <> 'S' or l.tableType is null
@@ -44,7 +44,7 @@
     state,
     status
 from 
-    new org.apache.derby.diag.LockTable() l right outer join new org.apache.derby.diag.TransactionTable() t
+    syscs_diag.lock_table l right outer join syscs_diag.transaction_table t
 on l.xid = t.xid where l.tableType <> 'S' ;
 0 rows inserted/updated/deleted
 ij> -- lock table with no join.
@@ -58,7 +58,7 @@
     cast(lockname as char(10)) as lockname,
     state
 from 
-    new org.apache.derby.diag.LockTable() l  
+    syscs_diag.lock_table l  
 where l.tableType <> 'S' ;
 0 rows inserted/updated/deleted
 ij> -- transaction table with no join.
@@ -66,7 +66,7 @@
 select 
     *
 from 
-    new org.apache.derby.diag.TransactionTable() t ;
+    syscs_diag.transaction_table;
 0 rows inserted/updated/deleted
 ij> autocommit off;
 ij> CALL SYSCS_UTIL.SYSCS_SET_DATABASE_PROPERTY('derby.storage.pageSize', '4096');

Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/TableLockBasic.out
URL: http://svn.apache.org/viewcvs/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/TableLockBasic.out?rev=292876&r1=292875&r2=292876&view=diff
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/TableLockBasic.out (original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/TableLockBasic.out Fri Sep 30 16:38:14 2005
@@ -29,7 +29,7 @@
     state,
     status
 from 
-    new org.apache.derby.diag.LockTable() l  right outer join new org.apache.derby.diag.TransactionTable() t
+    syscs_diag.lock_table l  right outer join syscs_diag.transaction_table t
 on l.xid = t.xid where l.tableType <> 'S' and t.type='UserTransaction';
 0 rows inserted/updated/deleted
 ij> --on l.xid = t.xid where l.tableType <> 'S' or l.tableType is null
@@ -48,7 +48,7 @@
     state,
     status
 from 
-    new org.apache.derby.diag.LockTable() l right outer join new org.apache.derby.diag.TransactionTable() t
+    syscs_diag.lock_table l right outer join syscs_diag.transaction_table t
 on l.xid = t.xid where l.tableType <> 'S' ;
 0 rows inserted/updated/deleted
 ij> -- lock table with no join.
@@ -62,7 +62,7 @@
     cast(lockname as char(10)) as lockname,
     state
 from 
-    new org.apache.derby.diag.LockTable() l  
+    syscs_diag.lock_table l  
 where l.tableType <> 'S' ;
 0 rows inserted/updated/deleted
 ij> -- transaction table with no join.
@@ -70,7 +70,7 @@
 select 
     *
 from 
-    new org.apache.derby.diag.TransactionTable() t ;
+    syscs_diag.transaction_table;
 0 rows inserted/updated/deleted
 ij> autocommit off;
 ij> create table heap_only (a int);

Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/TransactionTable.out
URL: http://svn.apache.org/viewcvs/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/TransactionTable.out?rev=292876&r1=292875&r2=292876&view=diff
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/TransactionTable.out (original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/TransactionTable.out Fri Sep 30 16:38:14 2005
@@ -6,7 +6,7 @@
 ij(C1)> create view xactTable as
 select username, type, status,
 case when first_instant is NULL then 'readonly' else 'not readonly' end as readOnly, cast(sql_text as varchar(512)) sql_text
-  from new org.apache.derby.diag.TransactionTable() t
+  from syscs_diag.transaction_table
     where type != 'InternalTransaction';
 0 rows inserted/updated/deleted
 ij(C1)> commit;
@@ -34,7 +34,7 @@
 APP                                                                                                                             |UserTransaction               |ACTIVE  |readonly    |select * from xactTable order by username, sql_text, status, type                                                                                                                                                                                                                                                                                                                                                                                                                                                               
 APP                                                                                                                             |UserTransaction               |IDLE    |readonly    |NULL                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            
 ij(C1)> select type, lockcount as cnt, mode, tablename, lockname, state
-from new org.apache.derby.diag.LockTable() t
+from syscs_diag.lock_table
 where tableType <> 'S' 
 order by lockname, mode, cnt, state;
 TYPE |CNT  |MODE|TABLENAME                                                                                                                       |LOCKNAME            |STATE
@@ -47,7 +47,7 @@
 APP                                                                                                                             |UserTransaction               |IDLE    |readonly    |select * from xactTable order by username, sql_text, status, type                                                                                                                                                                                                                                                                                                                                                                                                                                                               
 APP                                                                                                                             |UserTransaction               |IDLE    |readonly    |NULL                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            
 ij(C1)> select type, lockcount as cnt, mode, tablename, lockname, state
-from new org.apache.derby.diag.LockTable() t ;
+from syscs_diag.lock_table ;
 TYPE |CNT  |MODE|TABLENAME                                                                                                                       |LOCKNAME            |STATE
 ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------
 ij(C1)> insert into foo values (1), (3), (5), (7), (9);
@@ -58,7 +58,7 @@
 APP                                                                                                                             |UserTransaction               |ACTIVE  |not readonly|select * from xactTable order by username, sql_text, status, type                                                                                                                                                                                                                                                                                                                                                                                                                                                               
 APP                                                                                                                             |UserTransaction               |IDLE    |readonly    |NULL                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            
 ij(C1)> select type, lockcount as cnt, mode, tablename, lockname, state
-from new org.apache.derby.diag.LockTable() t
+from syscs_diag.lock_table
 where tableType <> 'S'
 order by lockname, mode, cnt, state;
 TYPE |CNT  |MODE|TABLENAME                                                                                                                       |LOCKNAME            |STATE
@@ -76,7 +76,7 @@
 APP                                                                                                                             |UserTransaction               |IDLE    |readonly    |select * from xactTable order by username, sql_text, status, type                                                                                                                                                                                                                                                                                                                                                                                                                                                               
 APP                                                                                                                             |UserTransaction               |IDLE    |readonly    |NULL                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            
 ij(C1)> select type, lockcount as cnt, mode, tablename, lockname, state
-from new org.apache.derby.diag.LockTable() t;
+from syscs_diag.lock_table;
 TYPE |CNT  |MODE|TABLENAME                                                                                                                       |LOCKNAME            |STATE
 ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------
 ij(C1)> insert into foo values (6), (10);
@@ -93,7 +93,7 @@
 APP                                                                                                                             |UserTransaction               |ACTIVE  |not readonly|NULL                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            
 APP                                                                                                                             |UserTransaction               |IDLE    |readonly    |NULL                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            
 ij(C2)> select type, lockcount as cnt, mode, tablename, lockname, state
-from new org.apache.derby.diag.LockTable() t
+from syscs_diag.lock_table
 where tableType <> 'S'
 order by lockname, mode, cnt, state;
 TYPE |CNT  |MODE|TABLENAME                                                                                                                       |LOCKNAME            |STATE
@@ -108,7 +108,7 @@
 APP                                                                                                                             |UserTransaction               |ACTIVE  |not readonly|NULL                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            
 APP                                                                                                                             |UserTransaction               |IDLE    |readonly    |NULL                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            
 ij(C2)> select type, lockcount as cnt, mode, tablename, lockname, state
-from new org.apache.derby.diag.LockTable() t
+from syscs_diag.lock_table
 where tableType <> 'S'
 order by lockname, mode, cnt, state;
 TYPE |CNT  |MODE|TABLENAME                                                                                                                       |LOCKNAME            |STATE
@@ -128,7 +128,7 @@
 APP                                                                                                                             |UserTransaction               |ACTIVE  |not readonly|NULL                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            
 APP                                                                                                                             |UserTransaction               |IDLE    |readonly    |NULL                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            
 ij(C2)> select type, lockcount as cnt, mode, tablename, lockname, state
-from new org.apache.derby.diag.LockTable() t
+from syscs_diag.lock_table
 where tableType <> 'S'
 order by lockname, mode, cnt, state;
 TYPE |CNT  |MODE|TABLENAME                                                                                                                       |LOCKNAME            |STATE
@@ -148,7 +148,7 @@
 APP                                                                                                                             |UserTransaction               |ACTIVE  |not readonly|NULL                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            
 APP                                                                                                                             |UserTransaction               |IDLE    |readonly    |NULL                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            
 ij(C2)> select type, lockcount as cnt, mode, tablename, lockname, state
-from new org.apache.derby.diag.LockTable() t
+from syscs_diag.lock_table
 where tableType <> 'S'
 order by lockname, mode, cnt, state;
 TYPE |CNT  |MODE|TABLENAME                                                                                                                       |LOCKNAME            |STATE
@@ -173,7 +173,7 @@
 APP                                                                                                                             |UserTransaction               |IDLE    |readonly    |NULL                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            
 ij(C2)> -- when last statement finished rolling back, this transaction should be IDLE;
 select type, lockcount as cnt, mode, tablename, lockname, state
-from new org.apache.derby.diag.LockTable() t
+from syscs_diag.lock_table
 where tableType <> 'S'
 order by lockname, mode, cnt, state;
 TYPE |CNT  |MODE|TABLENAME                                                                                                                       |LOCKNAME            |STATE
@@ -191,7 +191,7 @@
 APP                                                                                                                             |UserTransaction               |ACTIVE  |not readonly|NULL                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            
 APP                                                                                                                             |UserTransaction               |IDLE    |readonly    |NULL                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            
 ij(C2)> select type, lockcount as cnt, mode, tablename, lockname, state
-from new org.apache.derby.diag.LockTable() t
+from syscs_diag.lock_table
 where tableType <> 'S'
 order by lockname, mode, cnt, state;
 TYPE |CNT  |MODE|TABLENAME                                                                                                                       |LOCKNAME            |STATE
@@ -208,7 +208,7 @@
 APP                                                                                                                             |UserTransaction               |ACTIVE  |not readonly|select * from xactTable order by username, sql_text, status, type                                                                                                                                                                                                                                                                                                                                                                                                                                                               
 APP                                                                                                                             |UserTransaction               |IDLE    |readonly    |NULL                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            
 ij(C1)> select type, lockcount as cnt, mode, tablename, lockname, state
-from new org.apache.derby.diag.LockTable() t
+from syscs_diag.lock_table
 where tableType <> 'S'
 order by lockname, mode, cnt, state;
 TYPE |CNT  |MODE|TABLENAME                                                                                                                       |LOCKNAME            |STATE
@@ -225,7 +225,7 @@
 APP                                                                                                                             |UserTransaction               |IDLE    |readonly    |select * from xactTable order by username, sql_text, status, type                                                                                                                                                                                                                                                                                                                                                                                                                                                               
 APP                                                                                                                             |UserTransaction               |IDLE    |readonly    |NULL                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            
 ij(C1)> select l.type, lockcount as cnt, mode, tablename, lockname, state
-from   new org.apache.derby.diag.LockTable() l right outer join new org.apache.derby.diag.TransactionTable() t
+from   syscs_diag.lock_table l right outer join syscs_diag.transaction_table t
        on l.xid = t.xid where l.tableType <> 'S' and t.type='UserTransaction'
 order by lockname, mode, cnt, state;
 TYPE |CNT  |MODE|TABLENAME                                                                                                                       |LOCKNAME            |STATE

Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/autoincrement.out
URL: http://svn.apache.org/viewcvs/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/autoincrement.out?rev=292876&r1=292875&r2=292876&view=diff
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/autoincrement.out (original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/autoincrement.out Fri Sep 30 16:38:14 2005
@@ -727,7 +727,7 @@
 1          |0          
 2          |1          
 ij> -- should see only locks on t1, no locks on system catalogs.
-select  l.type, l.tablename, l.mode from new org.apache.derby.diag.LockTable() l order by tablename, type;
+select  l.type, l.tablename, l.mode from syscs_diag.lock_table l order by tablename, type;
 TYPE |TABLENAME                                                                                                                       |MODE
 -------------------------------------------------------------------------------------------------------------------------------------------
 ROW  |T1                                                                                                                              |X   
@@ -737,7 +737,7 @@
 2 rows inserted/updated/deleted
 ij> commit;
 ij> -- locks should be gone now.
-select  l.type, l.tablename, l.mode from new org.apache.derby.diag.LockTable() l order by tablename, type;
+select  l.type, l.tablename, l.mode from syscs_diag.lock_table l order by tablename, type;
 TYPE |TABLENAME                                                                                                                       |MODE
 -------------------------------------------------------------------------------------------------------------------------------------------
 ij> set isolation serializable;
@@ -748,13 +748,13 @@
 COLUMNNAME                                                                                                                      |AUTOINCREMENTVALUE  
 -----------------------------------------------------------------------------------------------------------------------------------------------------
 YYY                                                                                                                             |2                   
-ij> select  l.type, l.tablename, l.mode from new org.apache.derby.diag.LockTable() l order by tablename, type;
+ij> select  l.type, l.tablename, l.mode from syscs_diag.lock_table l order by tablename, type;
 TYPE |TABLENAME                                                                                                                       |MODE
 -------------------------------------------------------------------------------------------------------------------------------------------
 TABLE|SYSCOLUMNS                                                                                                                      |S   
 ij> insert into t1 (x) values (3);
 1 row inserted/updated/deleted
-ij> select  l.type, l.tablename, l.mode from new org.apache.derby.diag.LockTable() l order by tablename, type;
+ij> select  l.type, l.tablename, l.mode from syscs_diag.lock_table l order by tablename, type;
 TYPE |TABLENAME                                                                                                                       |MODE
 -------------------------------------------------------------------------------------------------------------------------------------------
 ROW  |SYSCOLUMNS                                                                                                                      |X   

Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/db2Compatibility.out
URL: http://svn.apache.org/viewcvs/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/db2Compatibility.out?rev=292876&r1=292875&r2=292876&view=diff
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/db2Compatibility.out (original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/db2Compatibility.out Fri Sep 30 16:38:14 2005
@@ -164,7 +164,7 @@
 ERROR 42X01: Syntax error: com.acme.myVTI.
 ij> select * from new org.apache.derbyTesting.not.myVTI() as T;
 ERROR 42X01: Syntax error: org.apache.derbyTesting.not.myVTI.
-ij> select * from new org.apache.derby.diag.LockTable() as T;
+ij> select * from syscs_diag.lock_table;
 XID            |TYPE |MODE|TABLENAME                                                                                                                       |LOCKNAME            |STATE|TABLETYPE|LOCK&|INDEXNAME                                                                                                                       
 ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
 ij> -- VTI in CREATE TRIGGER statement

Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/dcl.out
URL: http://svn.apache.org/viewcvs/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/dcl.out?rev=292876&r1=292875&r2=292876&view=diff
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/dcl.out (original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/dcl.out Fri Sep 30 16:38:14 2005
@@ -320,7 +320,7 @@
 3          |big@blue.com                  |NULL  
 4          |spammer@ripoff.com            |0     
 5          |open@source.org               |1     
-ij> select TYPE, MODE, TABLENAME from new org.apache.derby.diag.LockTable() AS L ORDER BY 1,2,3;
+ij> select TYPE, MODE, TABLENAME from syscs_diag.lock_table ORDER BY 1,2,3;
 TYPE |MODE|TABLENAME                                                                                                                       
 -------------------------------------------------------------------------------------------------------------------------------------------
 TABLE|S   |CONTACTS                                                                                                                        
@@ -389,7 +389,7 @@
 3          |big@blue.com                  |NULL  
 4          |spammer@ripoff.com            |0     
 5          |open@source.org               |1     
-ij> select TYPE, MODE, TABLENAME from new org.apache.derby.diag.LockTable() AS L ORDER BY 1,2,3;
+ij> select TYPE, MODE, TABLENAME from syscs_diag.lock_table ORDER BY 1,2,3;
 TYPE |MODE|TABLENAME                                                                                                                       
 -------------------------------------------------------------------------------------------------------------------------------------------
 TABLE|S   |CONTACTS                                                                                                                        

Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/ddlTableLockMode.out
URL: http://svn.apache.org/viewcvs/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/ddlTableLockMode.out?rev=292876&r1=292875&r2=292876&view=diff
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/ddlTableLockMode.out (original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/ddlTableLockMode.out Fri Sep 30 16:38:14 2005
@@ -5054,7 +5054,7 @@
 ij> -- should see only one lock; earlier used to 
 -- see 2, one IX and one for X.
 select count(*)
- from new org.apache.derby.diag.LockTable() l 
+ from syscs_diag.lock_table
  where tablename = 'DEFAULT1' and type = 'TABLE';
 1          
 -----------

Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/derby94.out
URL: http://svn.apache.org/viewcvs/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/derby94.out?rev=292876&r1=292875&r2=292876&view=diff
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/derby94.out (original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/derby94.out Fri Sep 30 16:38:14 2005
@@ -1,7 +1,7 @@
 ij> create view lock_table as select 
 cast(l.type as char(8)) as type,cast(lockcount as char(3)) as
 cnt,mode,cast(tablename as char(12)) as tabname,cast(lockname as char(10))
-as lockname,state from new org.apache.derby.diag.LockTable() l ;
+as lockname,state from syscs_diag.lock_table l ;
 0 rows inserted/updated/deleted
 ij> autocommit off;
 ij> create table derby94_t1(c1 int, c2 int not null primary key);

Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/heapscan.out
URL: http://svn.apache.org/viewcvs/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/heapscan.out?rev=292876&r1=292875&r2=292876&view=diff
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/heapscan.out (original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/heapscan.out Fri Sep 30 16:38:14 2005
@@ -30,7 +30,7 @@
     state,
     status
 from 
-    new org.apache.derby.diag.LockTable() l  right outer join new org.apache.derby.diag.TransactionTable() t
+    syscs_diag.lock_table l  right outer join syscs_diag.transaction_table t
 on l.xid = t.xid where l.tableType <> 'S' and t.type='UserTransaction';
 0 rows inserted/updated/deleted
 ij(SCANNER)> --on l.xid = t.xid where l.tableType <> 'S' or l.tableType is null
@@ -49,7 +49,7 @@
     state,
     status
 from 
-    new org.apache.derby.diag.LockTable() l right outer join new org.apache.derby.diag.TransactionTable() t
+    syscs_diag.lock_table l right outer join syscs_diag.transaction_table t
 on l.xid = t.xid where l.tableType <> 'S' ;
 0 rows inserted/updated/deleted
 ij(SCANNER)> -- lock table with no join.
@@ -63,7 +63,7 @@
     cast(lockname as char(10)) as lockname,
     state
 from 
-    new org.apache.derby.diag.LockTable() l  
+    syscs_diag.lock_table l  
 where l.tableType <> 'S' ;
 0 rows inserted/updated/deleted
 ij(SCANNER)> -- transaction table with no join.
@@ -71,7 +71,7 @@
 select 
     *
 from 
-    new org.apache.derby.diag.TransactionTable() t ;
+    syscs_diag.transaction_table;
 0 rows inserted/updated/deleted
 ij(SCANNER)> autocommit off;
 ij(SCANNER)> drop table data;

Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/jdk15/dcl.out
URL: http://svn.apache.org/viewcvs/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/jdk15/dcl.out?rev=292876&r1=292875&r2=292876&view=diff
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/jdk15/dcl.out (original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/jdk15/dcl.out Fri Sep 30 16:38:14 2005
@@ -320,7 +320,7 @@
 3          |big@blue.com                  |NULL  
 4          |spammer@ripoff.com            |0     
 5          |open@source.org               |1     
-ij> select TYPE, MODE, TABLENAME from new org.apache.derby.diag.LockTable() AS L ORDER BY 1,2,3;
+ij> select TYPE, MODE, TABLENAME from syscs_diag.lock_table ORDER BY 1,2,3;
 TYPE |MODE|TABLENAME                                                                                                                       
 -------------------------------------------------------------------------------------------------------------------------------------------
 TABLE|S   |CONTACTS                                                                                                                        
@@ -389,7 +389,7 @@
 3          |big@blue.com                  |NULL  
 4          |spammer@ripoff.com            |0     
 5          |open@source.org               |1     
-ij> select TYPE, MODE, TABLENAME from new org.apache.derby.diag.LockTable() AS L ORDER BY 1,2,3;
+ij> select TYPE, MODE, TABLENAME from syscs_diag.lock_table ORDER BY 1,2,3;
 TYPE |MODE|TABLENAME                                                                                                                       
 -------------------------------------------------------------------------------------------------------------------------------------------
 TABLE|S   |CONTACTS                                                                                                                        

Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/lockTable.out
URL: http://svn.apache.org/viewcvs/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/lockTable.out?rev=292876&r1=292875&r2=292876&view=diff
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/lockTable.out (original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/lockTable.out Fri Sep 30 16:38:14 2005
@@ -32,7 +32,7 @@
     state,
     status
 from 
-    new org.apache.derby.diag.LockTable() l right outer join new org.apache.derby.diag.TransactionTable() t
+    syscs_diag.lock_table l right outer join syscs_diag.transaction_table t
 on l.xid = t.xid where l.tableType <> 'S' 
 order by 
     tabname, type desc, mode, cnt, lockname;
@@ -69,7 +69,7 @@
     state,
     status
 from 
-    new org.apache.derby.diag.LockTable() l right outer join new org.apache.derby.diag.TransactionTable() t
+    syscs_diag.lock_table l right outer join syscs_diag.transaction_table t
 on l.xid = t.xid where l.tableType <> 'S' 
 order by 
     tabname, type desc, mode, cnt, lockname;
@@ -107,7 +107,7 @@
     state,
     status
 from 
-    new org.apache.derby.diag.LockTable() l right outer join new org.apache.derby.diag.TransactionTable() t
+    syscs_diag.lock_table l right outer join syscs_diag.transaction_table t
 on l.xid = t.xid where l.tableType <> 'S' 
 order by 
     tabname, type desc, mode, cnt, lockname;
@@ -145,7 +145,7 @@
     state,
     status
 from 
-    new org.apache.derby.diag.LockTable() l right outer join new org.apache.derby.diag.TransactionTable() t
+    syscs_diag.lock_table l right outer join syscs_diag.transaction_table t
 on l.xid = t.xid where l.tableType <> 'S' 
 order by 
     tabname, type desc, mode, cnt, lockname;
@@ -194,7 +194,7 @@
     state,
     status
 from 
-    new org.apache.derby.diag.LockTable() l right outer join new org.apache.derby.diag.TransactionTable() t
+    syscs_diag.lock_table l right outer join syscs_diag.transaction_table t
 on l.xid = t.xid where l.tableType <> 'S' 
 order by 
     tabname, type desc, mode, cnt, lockname;

Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/lockTableVti.out
URL: http://svn.apache.org/viewcvs/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/lockTableVti.out?rev=292876&r1=292875&r2=292876&view=diff
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/lockTableVti.out (original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/lockTableVti.out Fri Sep 30 16:38:14 2005
@@ -26,7 +26,7 @@
 ij(C2)> set connection C1;
 ij(C1)> call c1.sleep(200);
 0 rows inserted/updated/deleted
-ij(C1)> select state from new org.apache.derby.diag.LockTable() t order by state;
+ij(C1)> select state from syscs_diag.lock_table order by state;
 STATE
 -----
 GRANT
@@ -42,7 +42,7 @@
 ij(C1)> set connection c2 ;
 ij(C2)> wait for C2S1;
 3 rows inserted/updated/deleted
-ij(C2)> select state from new org.apache.derby.diag.LockTable() t order by state;
+ij(C2)> select state from syscs_diag.lock_table order by state;
 STATE
 -----
 GRANT

Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/readlocks.out
URL: http://svn.apache.org/viewcvs/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/readlocks.out?rev=292876&r1=292875&r2=292876&view=diff
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/readlocks.out (original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/readlocks.out Fri Sep 30 16:38:14 2005
@@ -18,7 +18,7 @@
     state,
     status
 from 
-    new org.apache.derby.diag.LockTable() l  right outer join new org.apache.derby.diag.TransactionTable() t
+    syscs_diag.lock_table l  right outer join syscs_diag.transaction_table t
 on l.xid = t.xid where l.tableType <> 'S' and t.type='UserTransaction';
 0 rows inserted/updated/deleted
 ij> --on l.xid = t.xid where l.tableType <> 'S' or l.tableType is null
@@ -37,7 +37,7 @@
     state,
     status
 from 
-    new org.apache.derby.diag.LockTable() l right outer join new org.apache.derby.diag.TransactionTable() t
+    syscs_diag.lock_table l right outer join syscs_diag.transaction_table t
 on l.xid = t.xid where l.tableType <> 'S' ;
 0 rows inserted/updated/deleted
 ij> -- lock table with no join.
@@ -51,7 +51,7 @@
     cast(lockname as char(10)) as lockname,
     state
 from 
-    new org.apache.derby.diag.LockTable() l  
+    syscs_diag.lock_table l  
 where l.tableType <> 'S' ;
 0 rows inserted/updated/deleted
 ij> -- transaction table with no join.
@@ -59,7 +59,7 @@
 select 
     *
 from 
-    new org.apache.derby.diag.TransactionTable() t ;
+    syscs_diag.transaction_table;
 0 rows inserted/updated/deleted
 ij> commit;
 ij> call SYSCS_UTIL.SYSCS_SET_DATABASE_PROPERTY('derby.storage.pageSize', '4096');

Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/releaseCompileLocks.out
URL: http://svn.apache.org/viewcvs/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/releaseCompileLocks.out?rev=292876&r1=292875&r2=292876&view=diff
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/releaseCompileLocks.out (original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/releaseCompileLocks.out Fri Sep 30 16:38:14 2005
@@ -31,7 +31,7 @@
 Caught exception SQL Exception: The external routine is not allowed to execute SQL statements.
 ERROR 38001: The external routine is not allowed to execute SQL statements.
 1          
-ij> select TYPE, MODE, TABLENAME, LOCKNAME, STATE from new org.apache.derby.diag.LockTable() l 
+ij> select TYPE, MODE, TABLENAME, LOCKNAME, STATE from syscs_diag.lock_table
 order by 1;
 TYPE |MODE|TABLENAME                                                                                                                       |LOCKNAME            |STATE
 ----------------------------------------------------------------------------------------------------------------------------------------------------------------------
@@ -50,7 +50,7 @@
 ERROR 38001: The external routine is not allowed to execute SQL statements.
 1          
 ij> -- only two locks!
-select TYPE, MODE, TABLENAME, LOCKNAME, STATE from new org.apache.derby.diag.LockTable() l 
+select TYPE, MODE, TABLENAME, LOCKNAME, STATE from syscs_diag.lock_table
 order by 1;
 TYPE |MODE|TABLENAME                                                                                                                       |LOCKNAME            |STATE
 ----------------------------------------------------------------------------------------------------------------------------------------------------------------------
@@ -61,7 +61,7 @@
 ij> drop table t1;
 0 rows inserted/updated/deleted
 ij> commit;
-ij> select TYPE, MODE, TABLENAME, LOCKNAME, STATE from new org.apache.derby.diag.LockTable() l 
+ij> select TYPE, MODE, TABLENAME, LOCKNAME, STATE from syscs_diag.lock_table
 order by 1;
 TYPE |MODE|TABLENAME                                                                                                                       |LOCKNAME            |STATE
 ----------------------------------------------------------------------------------------------------------------------------------------------------------------------
@@ -74,7 +74,7 @@
 ij> commit;
 ij> -- earlier we would get a bunch of locks on the system catalogs 
 -- when trying to resolve the method alias.
-select count(*) from new org.apache.derby.diag.LockTable() l;
+select count(*) from syscs_diag.lock_table;
 1          
 -----------
 0          
@@ -84,7 +84,7 @@
 -----------
 0          
 ij> -- look ma, no locks.
-select count(*) from new org.apache.derby.diag.LockTable() l;
+select count(*) from syscs_diag.lock_table;
 1          
 -----------
 0          
@@ -92,7 +92,7 @@
 1 row inserted/updated/deleted
 ij> -- only see locks on test_tab, none on system catalogs
 -- 
-select TYPE, MODE, TABLENAME, LOCKNAME, STATE from new org.apache.derby.diag.LockTable() l
+select TYPE, MODE, TABLENAME, LOCKNAME, STATE from syscs_diag.lock_table
 order by 1;
 TYPE |MODE|TABLENAME                                                                                                                       |LOCKNAME            |STATE
 ----------------------------------------------------------------------------------------------------------------------------------------------------------------------
@@ -131,14 +131,14 @@
 ij> commit;
 ij> -- prepare a statement-- no locks.
 prepare cursor1 as 'update test_tab set x=2 where x=?';
-ij> select count(*) from new org.apache.derby.diag.LockTable() l;
+ij> select count(*) from syscs_diag.lock_table;
 1          
 -----------
 0          
 ij> -- now execute it-- should see locks on test_tab
 execute cursor1 using 'values (1)';
 1 row inserted/updated/deleted
-ij> select TYPE, MODE, TABLENAME, LOCKNAME, STATE from new org.apache.derby.diag.LockTable() l 
+ij> select TYPE, MODE, TABLENAME, LOCKNAME, STATE from syscs_diag.lock_table
 order by 1;
 TYPE |MODE|TABLENAME                                                                                                                       |LOCKNAME            |STATE
 ----------------------------------------------------------------------------------------------------------------------------------------------------------------------
@@ -155,7 +155,7 @@
 ij> commit;
 ij> prepare ps as 'select * from t where c1 = ? and c2 = ?';
 ij> -- no locks, no locks at all.
-select * from new org.apache.derby.diag.LockTable() l;
+select * from syscs_diag.lock_table;
 XID            |TYPE |MODE|TABLENAME                                                                                                                       |LOCKNAME            |STATE|TABLETYPE|LOCK&|INDEXNAME                                                                                                                       
 ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
 ij> -- clear DataDictionary cache
@@ -166,7 +166,7 @@
 ij> commit;
 ij> -- try inserting into the table; no locks on system catalogs.
 prepare pi as 'insert into t values (3,2)';
-ij> select * from new org.apache.derby.diag.LockTable() l;
+ij> select * from syscs_diag.lock_table;
 XID            |TYPE |MODE|TABLENAME                                                                                                                       |LOCKNAME            |STATE|TABLETYPE|LOCK&|INDEXNAME                                                                                                                       
 ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
 ij> commit;
@@ -178,7 +178,7 @@
 ij> commit;
 ij> -- try updating the table; no locks on system catalogs.
 prepare p1 as 'update t set c2 = c1, c1 = c2';
-ij> select * from new org.apache.derby.diag.LockTable() l;
+ij> select * from syscs_diag.lock_table;
 XID            |TYPE |MODE|TABLENAME                                                                                                                       |LOCKNAME            |STATE|TABLETYPE|LOCK&|INDEXNAME                                                                                                                       
 ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
 ij> commit;
@@ -190,7 +190,7 @@
 ij> commit;
 ij> -- try deleting from the table; no locks on system catalogs.
 prepare p1 as 'delete from t';
-ij> select * from new org.apache.derby.diag.LockTable() l;
+ij> select * from syscs_diag.lock_table;
 XID            |TYPE |MODE|TABLENAME                                                                                                                       |LOCKNAME            |STATE|TABLETYPE|LOCK&|INDEXNAME                                                                                                                       
 ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
 ij> commit;
@@ -202,7 +202,7 @@
 ij> commit;
 ij> -- t has (1,1) (2,1) (3,2)
 prepare pu as 'update t set c2=2 where c1=2';
-ij> select * from new org.apache.derby.diag.LockTable() l;
+ij> select * from syscs_diag.lock_table;
 XID            |TYPE |MODE|TABLENAME                                                                                                                       |LOCKNAME            |STATE|TABLETYPE|LOCK&|INDEXNAME                                                                                                                       
 ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
 ij> commit;



Mime
View raw message