db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Satheesh Bandaram <sathe...@Sourcery.Org>
Subject Re: [PATCH] (DERBY-104) Get rid of the Max lenght of 18 for constraint names
Date Fri, 13 May 2005 19:12:06 GMT
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
  <title></title>
</head>
<body bgcolor="#ffffff" text="#000000">
I have applied this patch. Everything looked good, except a few
comments that needed to be removed or changed. Those comments still
refered to old limits before the patch. I have made these changes to
the patch.<br>
<br>
Satheesh<br>
<br>
[bandaram:satheesh] diff sqlgrammar.jj sqlgrammar.jj.new<br>
2649a2650<br>
&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; //cursor names are limited to 18 characters<br>
3240a3242<br>
&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; //unqualified column names are limited to 30 characters<br>
4517a4520<br>
&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; //unqualified column names are limited to 30 characters<br>
6495a6499<br>
&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; //column name and schema name can not be longer than
30 characte<br>
rs and table name can not be longer than 128 characters<br>
6673a6678<br>
&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; //unqualified column names are limited to 30 characters<br>
7727a7733<br>
&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; //unqualified column names are limited to 30 characters<br>
<br>
Bernt M. Johnsen wrote:<br>
<blockquote cite="mid20050513123725.GD5884@atum01.norway.sun.com"
 type="cite">
  <pre wrap="">Hi,

Here's the new patch

derbyall run without errors on:
Java Version:    1.5.0
Java Vendor:     Sun Microsystems Inc.
OS name:         Linux
OS architecture: i386
OS version:      2.4.20-31.9


  </pre>
  <pre wrap="">
<hr size="4" width="90%">
M      java/engine/org/apache/derby/impl/sql/compile/NumericTypeCompiler.java
M      java/engine/org/apache/derby/impl/sql/compile/SelectNode.java
M      java/engine/org/apache/derby/impl/sql/compile/AlterTableNode.java
M      java/engine/org/apache/derby/impl/sql/compile/ColumnDefinitionNode.java
M      java/engine/org/apache/derby/impl/sql/compile/CreateTableNode.java
M      java/engine/org/apache/derby/impl/sql/compile/CreateIndexNode.java
M      java/engine/org/apache/derby/impl/sql/compile/OrderByList.java
M      java/engine/org/apache/derby/impl/sql/compile/CreateAliasNode.java
M      java/engine/org/apache/derby/impl/sql/compile/GroupByList.java
M      java/engine/org/apache/derby/impl/sql/compile/sqlgrammar.jj
M      java/engine/org/apache/derby/impl/sql/compile/CreateViewNode.java
M      java/engine/org/apache/derby/impl/sql/compile/ConcatenationOperatorNode.java
M      java/engine/org/apache/derby/impl/sql/conn/GenericLanguageConnectionContext.java
M      java/engine/org/apache/derby/impl/sql/execute/SetSchemaConstantAction.java
M      java/engine/org/apache/derby/impl/sql/catalog/DataDictionaryImpl.java
M      java/engine/org/apache/derby/impl/sql/catalog/DD_Version.java
M      java/engine/org/apache/derby/impl/load/ImportResultSetMetaData.java
M      java/engine/org/apache/derby/impl/jdbc/authentication/AuthenticationServiceBase.java
M      java/engine/org/apache/derby/impl/jdbc/EmbedConnection30.java
M      java/engine/org/apache/derby/impl/jdbc/EmbedDatabaseMetaData.java
M      java/engine/org/apache/derby/impl/store/raw/data/FileContainer.java
M      java/engine/org/apache/derby/iapi/sql/compile/TypeCompiler.java
M      java/engine/org/apache/derby/iapi/types/TypeId.java
M      java/engine/org/apache/derby/iapi/types/NumberDataType.java
A  +   java/engine/org/apache/derby/iapi/reference/Limits.java
D      java/engine/org/apache/derby/iapi/reference/DB2Limit.java
M      java/engine/org/apache/derby/diag/ErrorMessages.java
M      java/engine/org/apache/derby/diag/StatementCache.java
M      java/engine/org/apache/derby/diag/StatementDuration.java
M      java/engine/org/apache/derby/diag/TransactionTable.java
M      java/engine/org/apache/derby/diag/ErrorLogReader.java
M      java/drda/org/apache/derby/impl/drda/FdocaConstants.java
M      java/drda/org/apache/derby/impl/drda/AppRequester.java
M      java/testing/org/apache/derbyTesting/functionTests/tests/lang/identifier.sql
M      java/testing/org/apache/derbyTesting/functionTests/tests/lang/currentSchema.sql
M      java/testing/org/apache/derbyTesting/functionTests/tests/lang/dbManagerLimits.java
M      java/testing/org/apache/derbyTesting/functionTests/tests/store/streamingColumn.java
M      java/testing/org/apache/derbyTesting/functionTests/master/currentSchema.out
M      java/testing/org/apache/derbyTesting/functionTests/master/DerbyNet/dbMetaDataJdbc30.out
M      java/testing/org/apache/derbyTesting/functionTests/master/DerbyNet/metadata.out
M      java/testing/org/apache/derbyTesting/functionTests/master/DerbyNet/odbc_metadata.out
M      java/testing/org/apache/derbyTesting/functionTests/master/DerbyNetClient/dbMetaDataJdbc30.out
M      java/testing/org/apache/derbyTesting/functionTests/master/DerbyNetClient/metadata.out
M      java/testing/org/apache/derbyTesting/functionTests/master/DerbyNetClient/odbc_metadata.out
M      java/testing/org/apache/derbyTesting/functionTests/master/metadata.out
M      java/testing/org/apache/derbyTesting/functionTests/master/dbMetaDataJdbc30.out
M      java/testing/org/apache/derbyTesting/functionTests/master/odbc_metadata.out
M      java/testing/org/apache/derbyTesting/functionTests/master/identifier.out
  </pre>
  <pre wrap="">
<hr size="4" width="90%">
Index: java/engine/org/apache/derby/impl/sql/compile/NumericTypeCompiler.java
===================================================================
--- java/engine/org/apache/derby/impl/sql/compile/NumericTypeCompiler.java	(revision 170002)
+++ java/engine/org/apache/derby/impl/sql/compile/NumericTypeCompiler.java	(working copy)
@@ -41,7 +41,7 @@
 import org.apache.derby.iapi.sql.compile.TypeCompiler;
 
 import org.apache.derby.iapi.reference.ClassName;
-import org.apache.derby.iapi.reference.DB2Limit;
+import org.apache.derby.iapi.reference.Limits;
 import org.apache.derby.iapi.reference.SQLState;
 import org.apache.derby.iapi.services.compiler.LocalField;
 import org.apache.derby.iapi.services.compiler.MethodBuilder;
@@ -447,9 +447,9 @@
 			val = this.getScale(operator, leftType, rightType) +
 					Math.max(lprec - lscale, rprec - rscale) + 1;
 
-			if (val &gt; DB2Limit.MAX_DECIMAL_PRECISION_SCALE)
+			if (val &gt; Limits.DB2_MAX_DECIMAL_PRECISION_SCALE)
 			// then, like DB2, just set it to the max possible.
-				val = DB2Limit.MAX_DECIMAL_PRECISION_SCALE;
+				val = Limits.DB2_MAX_DECIMAL_PRECISION_SCALE;
 		}
 
 		if (val &gt; Integer.MAX_VALUE)
Index: java/engine/org/apache/derby/impl/sql/compile/SelectNode.java
===================================================================
--- java/engine/org/apache/derby/impl/sql/compile/SelectNode.java	(revision 170002)
+++ java/engine/org/apache/derby/impl/sql/compile/SelectNode.java	(working copy)
@@ -32,7 +32,7 @@
 import org.apache.derby.iapi.types.TypeId;
 import org.apache.derby.iapi.types.DataTypeDescriptor;
 
-import org.apache.derby.iapi.reference.DB2Limit;
+import org.apache.derby.iapi.reference.Limits;
 import org.apache.derby.iapi.reference.SQLState;
 import org.apache.derby.iapi.error.StandardException;
 
@@ -661,7 +661,7 @@
 		super.bindResultColumns(fromListParam);
 
 		/* Only 1012 elements allowed in select list */
-		if (resultColumns.size() &gt; DB2Limit.DB2_MAX_ELEMENTS_IN_SELECT_LIST)
+		if (resultColumns.size() &gt; Limits.DB2_MAX_ELEMENTS_IN_SELECT_LIST)
 		{
 			throw StandardException.newException(SQLState.LANG_TOO_MANY_ELEMENTS);
 		}
Index: java/engine/org/apache/derby/impl/sql/compile/AlterTableNode.java
===================================================================
--- java/engine/org/apache/derby/impl/sql/compile/AlterTableNode.java	(revision 170002)
+++ java/engine/org/apache/derby/impl/sql/compile/AlterTableNode.java	(working copy)
@@ -21,7 +21,7 @@
 package	org.apache.derby.impl.sql.compile;
 
 import org.apache.derby.iapi.reference.SQLState;
-import org.apache.derby.iapi.reference.DB2Limit;
+import org.apache.derby.iapi.reference.Limits;
 
 import org.apache.derby.iapi.services.sanity.SanityManager;
 
@@ -236,12 +236,12 @@
 			tableElementList.validate(this, dd, baseTable);
 
 			/* Only 1012 columns allowed per table */
-			if ((tableElementList.countNumberOfColumns() + baseTable.getNumberOfColumns()) &gt; DB2Limit.DB2_MAX_COLUMNS_IN_TABLE)
+			if ((tableElementList.countNumberOfColumns() + baseTable.getNumberOfColumns()) &gt; Limits.DB2_MAX_COLUMNS_IN_TABLE)
 			{
 				throw StandardException.newException(SQLState.LANG_TOO_MANY_COLUMNS_IN_TABLE_OR_VIEW,
 					String.valueOf(tableElementList.countNumberOfColumns() + baseTable.getNumberOfColumns()),
 					getRelativeName(),
-					String.valueOf(DB2Limit.DB2_MAX_COLUMNS_IN_TABLE));
+					String.valueOf(Limits.DB2_MAX_COLUMNS_IN_TABLE));
 			}
 			/* Number of backing indexes in the alter table statment */
 			numBackingIndexes = tableElementList.countConstraints(DataDictionary.PRIMARYKEY_CONSTRAINT) +
@@ -254,12 +254,12 @@
 
 		//If the sum of backing indexes for constraints in alter table statement and total number of indexes on the table
 		//so far is more than 32767, then we need to throw an exception 
-		if ((numBackingIndexes + baseTable.getTotalNumberOfIndexes()) &gt; DB2Limit.DB2_MAX_INDEXES_ON_TABLE)
+		if ((numBackingIndexes + baseTable.getTotalNumberOfIndexes()) &gt; Limits.DB2_MAX_INDEXES_ON_TABLE)
 		{
 			throw StandardException.newException(SQLState.LANG_TOO_MANY_INDEXES_ON_TABLE, 
 				String.valueOf(numBackingIndexes + baseTable.getTotalNumberOfIndexes()),
 				getRelativeName(),
-				String.valueOf(DB2Limit.DB2_MAX_INDEXES_ON_TABLE));
+				String.valueOf(Limits.DB2_MAX_INDEXES_ON_TABLE));
 		}
 
 		if (numCheckConstraints &gt; 0)
Index: java/engine/org/apache/derby/impl/sql/compile/ColumnDefinitionNode.java
===================================================================
--- java/engine/org/apache/derby/impl/sql/compile/ColumnDefinitionNode.java	(revision 170002)
+++ java/engine/org/apache/derby/impl/sql/compile/ColumnDefinitionNode.java	(working copy)
@@ -24,7 +24,7 @@
 
 import org.apache.derby.iapi.services.sanity.SanityManager;
 import org.apache.derby.iapi.services.io.StoredFormatIds;
-import org.apache.derby.iapi.reference.DB2Limit;
+import org.apache.derby.iapi.reference.Limits;
 import org.apache.derby.iapi.error.StandardException;
 
 import org.apache.derby.iapi.sql.compile.CompilerContext;
@@ -576,7 +576,7 @@
 		ValueNode defaultNode, String defaultText)
 	{
 
-		if (defaultText.length() &gt; DB2Limit.DB2_CHAR_MAXWIDTH)
+		if (defaultText.length() &gt; Limits.DB2_CHAR_MAXWIDTH)
 		// DB2 spec says this isn't allowed.
 			return false;
 
@@ -622,12 +622,12 @@
 				// DB2 enforces min length of 8.
 				// Note also: any size under 30 gives a warning in DB2.
 					return (charCol &amp;&amp; (columnDesc.getMaximumWidth() &gt;=
-						DB2Limit.MIN_COL_LENGTH_FOR_CURRENT_USER));
+						Limits.DB2_MIN_COL_LENGTH_FOR_CURRENT_USER));
 
 				case C_NodeTypes.CURRENT_SCHEMA_NODE:
 				// DB2 enforces min length of 128.
 					return (charCol &amp;&amp; (columnDesc.getMaximumWidth() &gt;=
-						DB2Limit.MIN_COL_LENGTH_FOR_CURRENT_SCHEMA));
+						Limits.DB2_MIN_COL_LENGTH_FOR_CURRENT_SCHEMA));
 				default:
 					// else, function not allowed.
 					return false;
Index: java/engine/org/apache/derby/impl/sql/compile/CreateTableNode.java
===================================================================
--- java/engine/org/apache/derby/impl/sql/compile/CreateTableNode.java	(revision 170002)
+++ java/engine/org/apache/derby/impl/sql/compile/CreateTableNode.java	(working copy)
@@ -22,7 +22,7 @@
 
 import org.apache.derby.iapi.reference.Property;
 import org.apache.derby.iapi.reference.SQLState;
-import org.apache.derby.iapi.reference.DB2Limit;
+import org.apache.derby.iapi.reference.Limits;
 
 import org.apache.derby.iapi.services.property.PropertyUtil;
 import org.apache.derby.iapi.services.sanity.SanityManager;
@@ -212,12 +212,12 @@
 		tableElementList.validate(this, dataDictionary, (TableDescriptor) null);
 
 		/* Only 1012 columns allowed per table */
-		if (tableElementList.countNumberOfColumns() &gt; DB2Limit.DB2_MAX_COLUMNS_IN_TABLE)
+		if (tableElementList.countNumberOfColumns() &gt; Limits.DB2_MAX_COLUMNS_IN_TABLE)
 		{
 			throw StandardException.newException(SQLState.LANG_TOO_MANY_COLUMNS_IN_TABLE_OR_VIEW,
 				String.valueOf(tableElementList.countNumberOfColumns()),
 				getRelativeName(),
-				String.valueOf(DB2Limit.DB2_MAX_COLUMNS_IN_TABLE));
+				String.valueOf(Limits.DB2_MAX_COLUMNS_IN_TABLE));
 		}
 
 		numPrimaryKeys = tableElementList.countConstraints(
@@ -246,12 +246,12 @@
 
 		//each of these constraints have a backing index in the back. We need to make sure that a table never has more
 		//more than 32767 indexes on it and that is why this check.
-		if ((numPrimaryKeys + numReferenceConstraints + numUniqueConstraints) &gt; DB2Limit.DB2_MAX_INDEXES_ON_TABLE)
+		if ((numPrimaryKeys + numReferenceConstraints + numUniqueConstraints) &gt; Limits.DB2_MAX_INDEXES_ON_TABLE)
 		{
 			throw StandardException.newException(SQLState.LANG_TOO_MANY_INDEXES_ON_TABLE, 
 				String.valueOf(numPrimaryKeys + numReferenceConstraints + numUniqueConstraints),
 				getRelativeName(),
-				String.valueOf(DB2Limit.DB2_MAX_INDEXES_ON_TABLE));
+				String.valueOf(Limits.DB2_MAX_INDEXES_ON_TABLE));
 		}
 
 		if (numCheckConstraints &gt; 0)
Index: java/engine/org/apache/derby/impl/sql/compile/CreateIndexNode.java
===================================================================
--- java/engine/org/apache/derby/impl/sql/compile/CreateIndexNode.java	(revision 170002)
+++ java/engine/org/apache/derby/impl/sql/compile/CreateIndexNode.java	(working copy)
@@ -35,7 +35,7 @@
 import org.apache.derby.iapi.sql.dictionary.ColumnDescriptor;
 
 import org.apache.derby.iapi.reference.SQLState;
-import org.apache.derby.iapi.reference.DB2Limit;
+import org.apache.derby.iapi.reference.Limits;
 import org.apache.derby.iapi.reference.Property;
 
 import org.apache.derby.iapi.sql.execute.ConstantAction;
@@ -182,12 +182,12 @@
 		}
 
 		//If total number of indexes on the table so far is more than 32767, then we need to throw an exception
-		if (td.getTotalNumberOfIndexes() &gt; DB2Limit.DB2_MAX_INDEXES_ON_TABLE)
+		if (td.getTotalNumberOfIndexes() &gt; Limits.DB2_MAX_INDEXES_ON_TABLE)
 		{
 			throw StandardException.newException(SQLState.LANG_TOO_MANY_INDEXES_ON_TABLE,
 				String.valueOf(td.getTotalNumberOfIndexes()),
 				tableName,
-				String.valueOf(DB2Limit.DB2_MAX_INDEXES_ON_TABLE));
+				String.valueOf(Limits.DB2_MAX_INDEXES_ON_TABLE));
 		}
 
 		/* Validate the column name list */
Index: java/engine/org/apache/derby/impl/sql/compile/OrderByList.java
===================================================================
--- java/engine/org/apache/derby/impl/sql/compile/OrderByList.java	(revision 170002)
+++ java/engine/org/apache/derby/impl/sql/compile/OrderByList.java	(working copy)
@@ -47,7 +47,7 @@
 import org.apache.derby.iapi.types.DataValueDescriptor;
 
 import org.apache.derby.iapi.reference.ClassName;
-import org.apache.derby.iapi.reference.DB2Limit;
+import org.apache.derby.iapi.reference.Limits;
 import org.apache.derby.iapi.reference.SQLState;
 
 import org.apache.derby.iapi.util.JBitSet;
@@ -142,7 +142,7 @@
 		int size = size();
 
 		/* Only 1012 columns allowed in ORDER BY clause */
-		if (size &gt; DB2Limit.DB2_MAX_ELEMENTS_IN_ORDER_BY)
+		if (size &gt; Limits.DB2_MAX_ELEMENTS_IN_ORDER_BY)
 		{
 			throw StandardException.newException(SQLState.LANG_TOO_MANY_ELEMENTS);
 		}
Index: java/engine/org/apache/derby/impl/sql/compile/CreateAliasNode.java
===================================================================
--- java/engine/org/apache/derby/impl/sql/compile/CreateAliasNode.java	(revision 170002)
+++ java/engine/org/apache/derby/impl/sql/compile/CreateAliasNode.java	(working copy)
@@ -28,7 +28,7 @@
 import org.apache.derby.iapi.sql.compile.C_NodeTypes;
 
 import org.apache.derby.iapi.reference.SQLState;
-import org.apache.derby.iapi.reference.DB2Limit;
+import org.apache.derby.iapi.reference.Limits;
 
 import org.apache.derby.iapi.sql.ResultSet;
 import org.apache.derby.iapi.sql.execute.ConstantAction;
@@ -139,9 +139,9 @@
 				TypeDescriptor[] types = null;
 				int[] modes = null;
 				
-				if (paramCount &gt; DB2Limit.DB2_MAX_PARAMS_IN_STORED_PROCEDURE)
+				if (paramCount &gt; Limits.DB2_MAX_PARAMS_IN_STORED_PROCEDURE)
 					throw StandardException.newException(SQLState.LANG_TOO_MANY_PARAMETERS_FOR_STORED_PROC,
-							String.valueOf(DB2Limit.DB2_MAX_PARAMS_IN_STORED_PROCEDURE), aliasName, String.valueOf(paramCount));
+							String.valueOf(Limits.DB2_MAX_PARAMS_IN_STORED_PROCEDURE), aliasName, String.valueOf(paramCount));
 
 				if (paramCount != 0) {
 
Index: java/engine/org/apache/derby/impl/sql/compile/GroupByList.java
===================================================================
--- java/engine/org/apache/derby/impl/sql/compile/GroupByList.java	(revision 170002)
+++ java/engine/org/apache/derby/impl/sql/compile/GroupByList.java	(working copy)
@@ -29,7 +29,7 @@
 import org.apache.derby.iapi.sql.dictionary.DataDictionary;
 
 import org.apache.derby.iapi.reference.SQLState;
-import org.apache.derby.iapi.reference.DB2Limit;
+import org.apache.derby.iapi.reference.Limits;
 
 import org.apache.derby.impl.sql.compile.ActivationClassBuilder;
 
@@ -130,7 +130,7 @@
 		int				 size = size();
 
 		/* Only 32677 columns allowed in GROUP BY clause */
-		if (size &gt; DB2Limit.DB2_MAX_ELEMENTS_IN_GROUP_BY)
+		if (size &gt; Limits.DB2_MAX_ELEMENTS_IN_GROUP_BY)
 		{
 			throw StandardException.newException(SQLState.LANG_TOO_MANY_ELEMENTS);
 		}
Index: java/engine/org/apache/derby/impl/sql/compile/sqlgrammar.jj
===================================================================
--- java/engine/org/apache/derby/impl/sql/compile/sqlgrammar.jj	(revision 170002)
+++ java/engine/org/apache/derby/impl/sql/compile/sqlgrammar.jj	(working copy)
@@ -125,7 +125,7 @@
 
 import org.apache.derby.iapi.reference.SQLState;
 import org.apache.derby.iapi.reference.JDBC30Translation;
-import org.apache.derby.iapi.reference.DB2Limit;
+import org.apache.derby.iapi.reference.Limits;
 
 import org.apache.derby.iapi.sql.compile.CompilerContext;
 import org.apache.derby.iapi.sql.compile.C_NodeTypes;
@@ -326,13 +326,13 @@
 	switch (type) {
 		case Types.BINARY:
 		case Types.CHAR:
-			if (length  &gt; DB2Limit.DB2_CHAR_MAXWIDTH)
+			if (length  &gt; Limits.DB2_CHAR_MAXWIDTH)
 				valid = false;
 			break;
 			
 		case Types.VARBINARY:
 		case Types.VARCHAR:
-			if (length  &gt; DB2Limit.DB2_VARCHAR_MAXWIDTH)
+			if (length  &gt; Limits.DB2_VARCHAR_MAXWIDTH)
 				valid = false;
 
 			break;
@@ -2582,7 +2582,7 @@
 		return getDeleteNode(fromTable, tableName, whereClause);
 	}
 |
-	&lt;FROM&gt; tableName = qualifiedName(DB2Limit.DB2_MAX_IDENTIFIER_LENGTH128) 
+	&lt;FROM&gt; tableName = qualifiedName(Limits.MAX_IDENTIFIER_LENGTH) 
 	    [targetProperties = propertyList() ] 
 		[ 
 			whereToken = &lt;WHERE&gt;
@@ -2648,7 +2648,7 @@
 }
 {
 	//cursor names are limited to 18 characters
-	&lt;CURRENT&gt; &lt;OF&gt; cursorName = identifier(DB2Limit.DB2_MAX_IDENTIFIER_LENGTH18, true)
+	&lt;CURRENT&gt; &lt;OF&gt; cursorName = identifier(Limits.MAX_IDENTIFIER_LENGTH, true)
 	{ 
 		return (FromTable) nodeFactory.getNode(
 								C_NodeTypes.CURRENT_OF_NODE,
@@ -2759,7 +2759,7 @@
 								getContextManager()); 
 	}
 |
-	tableName = qualifiedName(DB2Limit.DB2_MAX_IDENTIFIER_LENGTH128) 
+	tableName = qualifiedName(Limits.MAX_IDENTIFIER_LENGTH) 
 	{
 		return (QueryTreeNode) tableName;
 	}
@@ -2830,7 +2830,7 @@
 		return getUpdateNode(fromTable, tableName, columnList, whereClause);
 	}
 |
-		tableName = qualifiedName(DB2Limit.DB2_MAX_IDENTIFIER_LENGTH128)
+		tableName = qualifiedName(Limits.MAX_IDENTIFIER_LENGTH)
 		[targetProperties = propertyList() ] 
 		&lt;SET&gt; columnList = setClauseList()
 		[ 
@@ -3019,18 +3019,18 @@
 }
 {
 	(
-	&lt;SAVEPOINT&gt; savepointName = identifier(DB2Limit.DB2_MAX_IDENTIFIER_LENGTH128, true) (savepointStatementClause(savepointStatementClauses))+
+	&lt;SAVEPOINT&gt; savepointName = identifier(Limits.MAX_IDENTIFIER_LENGTH, true) (savepointStatementClause(savepointStatementClauses))+
 	{
 		//ON ROLLBACK RETAIN CURSORS is mandatory
 		if (savepointStatementClauses[2] == null)
 				throw StandardException.newException(SQLState.LANG_SYNTAX_ERROR, "MISSING ON ROLLBACK RETAIN CURSORS");
 		savepointStatementType = 1;
 	}
-|	&lt;ROLLBACK&gt; [ &lt;WORK&gt; ] &lt;TO&gt; &lt;SAVEPOINT&gt; [ savepointName = identifier(DB2Limit.DB2_MAX_IDENTIFIER_LENGTH128, true) ]
+|	&lt;ROLLBACK&gt; [ &lt;WORK&gt; ] &lt;TO&gt; &lt;SAVEPOINT&gt; [ savepointName = identifier(Limits.MAX_IDENTIFIER_LENGTH, true) ]
 	{
 		savepointStatementType = 2;
 	}
-|	&lt;RELEASE&gt; [ &lt;TO&gt; ] &lt;SAVEPOINT&gt; savepointName = identifier(DB2Limit.DB2_MAX_IDENTIFIER_LENGTH128, true)
+|	&lt;RELEASE&gt; [ &lt;TO&gt; ] &lt;SAVEPOINT&gt; savepointName = identifier(Limits.MAX_IDENTIFIER_LENGTH, true)
 	{
 		savepointStatementType = 3;
 	}
@@ -3104,7 +3104,7 @@
 	Object[] declareTableClauses = new Object[3];
 }
 { 
-	&lt;DECLARE&gt; &lt;GLOBAL&gt; &lt;TEMPORARY&gt; &lt;TABLE&gt; tableName = qualifiedName(DB2Limit.DB2_MAX_IDENTIFIER_LENGTH128)
+	&lt;DECLARE&gt; &lt;GLOBAL&gt; &lt;TEMPORARY&gt; &lt;TABLE&gt; tableName = qualifiedName(Limits.MAX_IDENTIFIER_LENGTH)
 		tableElementList = tableElementList()
 		( declareTableClause(declareTableClauses) ) +
 	{
@@ -3240,7 +3240,7 @@
 
 	/* identifier() used to be columnName() */
 	//unqualified column names are limited to 30 characters
-	columnName = identifier(DB2Limit.DB2_MAX_IDENTIFIER_LENGTH30, true) 
+	columnName = identifier(Limits.MAX_IDENTIFIER_LENGTH, true) 
 		( typeDescriptor = dataTypeDDL() 
 		)
 	[ defaultNode = defaultAndConstraints(typeDescriptor, tableElementList, columnName, autoIncrementInfo) ]
@@ -3880,7 +3880,7 @@
 			
 			// match DB2 limits of 1 to 2147483647
 			if ((specifiedLength &gt; 0L) &amp;&amp; 
-                (specifiedLength &lt;= DB2Limit.DB2_LOB_MAXWIDTH))
+                (specifiedLength &lt;= Limits.DB2_LOB_MAXWIDTH))
             {
 				return (int)specifiedLength;
             }
@@ -3888,7 +3888,7 @@
 			// DB2 allows 2G or 2048M or 2097152k that calculate out to 
             // 2147483648, but sets the length to be one less.
 			if (mul != 1 &amp;&amp; specifiedLength == 2147483648L)
-				return DB2Limit.DB2_LOB_MAXWIDTH;
+				return Limits.DB2_LOB_MAXWIDTH;
 				
 		}
 		catch (NumberFormatException nfe)
@@ -4090,7 +4090,7 @@
 	String	secondName = null;
 }
 {
-	firstName = identifier(DB2Limit.DB2_MAX_IDENTIFIER_LENGTH128, false)
+	firstName = identifier(Limits.MAX_IDENTIFIER_LENGTH, false)
 				[
 					// This LOOKAHEAD is necessary because a selectSublist()
 					// can be a qualifiedName.*. Make sure that the token after
@@ -4098,7 +4098,7 @@
 					// optional element.
 					LOOKAHEAD( {getToken(1).kind == PERIOD &amp;&amp;
 								getToken(2).kind != ASTERISK} )
-					&lt;PERIOD&gt; secondName = identifier(DB2Limit.DB2_MAX_IDENTIFIER_LENGTH128, false)
+					&lt;PERIOD&gt; secondName = identifier(Limits.MAX_IDENTIFIER_LENGTH, false)
 				]
 	{
 		if (secondName == null)
@@ -4114,7 +4114,7 @@
 		//limit the qualifiedId to the id length limit passed to this method
 		checkIdentifierLengthLimit(qualifiedId, id_length_limit);
 		if (schemaName != null)
-			checkIdentifierLengthLimit(schemaName, DB2Limit.DB2_MAX_IDENTIFIER_LENGTH30);
+			checkIdentifierLengthLimit(schemaName, Limits.MAX_IDENTIFIER_LENGTH);
 
 		return (TableName) nodeFactory.getNode(
 								nodeType,
@@ -4457,7 +4457,7 @@
 			)
 		}
 	)
-	tableName = qualifiedName(DB2Limit.DB2_MAX_IDENTIFIER_LENGTH128) &lt;PERIOD&gt; &lt;ASTERISK&gt;
+	tableName = qualifiedName(Limits.MAX_IDENTIFIER_LENGTH) &lt;PERIOD&gt; &lt;ASTERISK&gt;
 	{
 		allResultColumn = (ResultColumn) nodeFactory.getNode(
 										C_NodeTypes.ALL_RESULT_COLUMN,
@@ -4518,7 +4518,7 @@
 {
 	/* identifier() used to be columnName() */
 	//unqualified column names are limited to 30 characters
-	[ &lt;AS&gt; ] columnName = identifier(DB2Limit.DB2_MAX_IDENTIFIER_LENGTH30, true)
+	[ &lt;AS&gt; ] columnName = identifier(Limits.MAX_IDENTIFIER_LENGTH, true)
 	{
 		return columnName;
 	}
@@ -6287,7 +6287,7 @@
 	MethodCallNode	methodNode;
 }
 {
-	routineName = qualifiedName(DB2Limit.DB2_MAX_IDENTIFIER_LENGTH128)
+	routineName = qualifiedName(Limits.MAX_IDENTIFIER_LENGTH)
 		methodCallParameterList(parameterList)
 	{
 
@@ -6360,7 +6360,7 @@
 	ValueNode	retval;
 }
 {
-	firstName = identifier(DB2Limit.DB2_MAX_IDENTIFIER_LENGTH128, true)
+	firstName = identifier(Limits.MAX_IDENTIFIER_LENGTH, true)
 	[
 		// This LOOKAHEAD is required because we have the following cases:
 		// schema.table.column.method()
@@ -6374,7 +6374,7 @@
 					getToken(1).kind == PERIOD &amp;&amp;
 					getToken(3).kind == PERIOD
 				} )
-		&lt;PERIOD&gt; secondName = identifier(DB2Limit.DB2_MAX_IDENTIFIER_LENGTH128, true)
+		&lt;PERIOD&gt; secondName = identifier(Limits.MAX_IDENTIFIER_LENGTH, true)
 		[
 			// See above: we don't want to mistake the method name for a
 			// column name.
@@ -6382,7 +6382,7 @@
 						getToken(1).kind == PERIOD &amp;&amp;
 						getToken(3).kind == PERIOD
 					} )
-			&lt;PERIOD&gt; thirdName = identifier(DB2Limit.DB2_MAX_IDENTIFIER_LENGTH128, true)
+			&lt;PERIOD&gt; thirdName = identifier(Limits.MAX_IDENTIFIER_LENGTH, true)
 		]
 	]
 	{
@@ -6451,7 +6451,7 @@
 	TableName	tabName = null;
 }
 {
-	firstName = identifier(DB2Limit.DB2_MAX_IDENTIFIER_LENGTH128, false)
+	firstName = identifier(Limits.MAX_IDENTIFIER_LENGTH, false)
 	[
 		// This LOOKAHEAD is needed to ensure that, if the identifier
 		// after the PERIOD is a method name , we
@@ -6460,7 +6460,7 @@
 					getToken(1).kind == PERIOD &amp;&amp;
 					getToken(3).kind != LEFT_PAREN
 				} )
-		&lt;PERIOD&gt; secondName = identifier(DB2Limit.DB2_MAX_IDENTIFIER_LENGTH128, false)
+		&lt;PERIOD&gt; secondName = identifier(Limits.MAX_IDENTIFIER_LENGTH, false)
 		[
 			// This LOOKAHEAD is needed to ensure that, if the identifier
 			// after the PERIOD is a method name , we
@@ -6469,7 +6469,7 @@
 						getToken(1).kind == PERIOD &amp;&amp;
 						getToken(3).kind != LEFT_PAREN
 					} )
-			&lt;PERIOD&gt; thirdName = identifier(DB2Limit.DB2_MAX_IDENTIFIER_LENGTH128, false)
+			&lt;PERIOD&gt; thirdName = identifier(Limits.MAX_IDENTIFIER_LENGTH, false)
 		]
 	]
 	{
@@ -6497,11 +6497,11 @@
 		}
 
 		//column name and schema name can not be longer than 30 characters and table name can not be longer than 128 characters
-		checkIdentifierLengthLimit(columnName, DB2Limit.DB2_MAX_IDENTIFIER_LENGTH30);
+		checkIdentifierLengthLimit(columnName, Limits.MAX_IDENTIFIER_LENGTH);
 		if (schemaName != null)
-			checkIdentifierLengthLimit(schemaName, DB2Limit.DB2_MAX_IDENTIFIER_LENGTH30);
+			checkIdentifierLengthLimit(schemaName, Limits.MAX_IDENTIFIER_LENGTH);
 		if (tableName != null)
-			checkIdentifierLengthLimit(tableName, DB2Limit.DB2_MAX_IDENTIFIER_LENGTH128);
+			checkIdentifierLengthLimit(tableName, Limits.MAX_IDENTIFIER_LENGTH);
 
 		if (tableName != null)
 		{
@@ -6676,7 +6676,7 @@
 {
 	/* identifier() used to be columnName() */
 	//unqualified column names are limited to 30 characters
-	columnName = identifier(DB2Limit.DB2_MAX_IDENTIFIER_LENGTH30, true)
+	columnName = identifier(Limits.MAX_IDENTIFIER_LENGTH, true)
 	{
 		columnList.addElement(columnName);
 	}
@@ -7485,7 +7485,7 @@
 	}
 |
 	[ [ &lt;AS&gt; ] 
-		correlationName = identifier(DB2Limit.DB2_MAX_IDENTIFIER_LENGTH128, true)
+		correlationName = identifier(Limits.MAX_IDENTIFIER_LENGTH, true)
 		[ &lt;LEFT_PAREN&gt; derivedRCL = derivedColumnList() &lt;RIGHT_PAREN&gt; ] 
 	    [tableProperties = propertyList() ] ]
 	{
@@ -7535,7 +7535,7 @@
 	 */
 	/* identifier() used to be correlationName() */
 	LOOKAHEAD( { newInvocationFollows(1) } )
-	javaToSQLNode = newInvocation() [ &lt;AS&gt; ] correlationName = identifier(DB2Limit.DB2_MAX_IDENTIFIER_LENGTH128, true)
+	javaToSQLNode = newInvocation() [ &lt;AS&gt; ] correlationName = identifier(Limits.MAX_IDENTIFIER_LENGTH, true)
 		[ &lt;LEFT_PAREN&gt; derivedRCL = derivedColumnList() &lt;RIGHT_PAREN&gt; ]
 		[ optionalTableClauses = optionalTableProperties() ]
 		(LOOKAHEAD( { joinedTableExpressionFollows() } )
@@ -7575,7 +7575,7 @@
 	}
 |
 	/* identifier() used to be correlationName() */
-	tableName = qualifiedName(DB2Limit.DB2_MAX_IDENTIFIER_LENGTH128) 
+	tableName = qualifiedName(Limits.MAX_IDENTIFIER_LENGTH) 
 		optionalTableClauses = optionalTableClauses()
 		(LOOKAHEAD( { joinedTableExpressionFollows() } )
 		 joinTable = joinedTableExpression(
@@ -7631,7 +7631,7 @@
 					getToken(2).kind == VALUES
 				)
 			} )
-	derivedTable = derivedTable() [ &lt;AS&gt; ] correlationName = identifier(DB2Limit.DB2_MAX_IDENTIFIER_LENGTH128, true)
+	derivedTable = derivedTable() [ &lt;AS&gt; ] correlationName = identifier(Limits.MAX_IDENTIFIER_LENGTH, true)
 		[ &lt;LEFT_PAREN&gt; derivedRCL = derivedColumnList() &lt;RIGHT_PAREN&gt; ]
 		[ optionalTableClauses = optionalTableProperties() ]
 		( LOOKAHEAD( { joinedTableExpressionFollows() } )
@@ -7731,7 +7731,7 @@
 {
 	/* identifier() used to be columnName() */
 	//unqualified column names are limited to 30 characters
-	columnName = identifier(DB2Limit.DB2_MAX_IDENTIFIER_LENGTH30, true)
+	columnName = identifier(Limits.MAX_IDENTIFIER_LENGTH, true)
 	{
 		/*
 		** Store the column names for the result columns in the
@@ -7768,7 +7768,7 @@
 }
 {
 	/* identifier never ends with a space; appending a space meaning desc */
-	columnName = identifier(DB2Limit.DB2_MAX_IDENTIFIER_LENGTH30, true) [&lt;ASC&gt; | &lt;DESC&gt; {columnName = columnName + ' ';}]
+	columnName = identifier(Limits.MAX_IDENTIFIER_LENGTH, true) [&lt;ASC&gt; | &lt;DESC&gt; {columnName = columnName + ' ';}]
 	{
 		/*
 		** Store the column names for the index columns in the
@@ -8143,7 +8143,7 @@
 	** a user aggregate here; otherwise, we have to generate
 	** a staticMethodNode and fix it up later.
 	*/
-	methodAliasString = identifier(DB2Limit.DB2_MAX_IDENTIFIER_LENGTH128, true)
+	methodAliasString = identifier(Limits.MAX_IDENTIFIER_LENGTH, true)
 	&lt;LEFT_PAREN&gt; setQuantifier() value = additiveExpression(null, 0, false) &lt;RIGHT_PAREN&gt;
 	{
 		return (ValueNode) nodeFactory.getNode(
@@ -8359,7 +8359,7 @@
 	** We are not currently handling character set
 	** specifications for schema, or schema bodies.
 	*/
-	&lt;SCHEMA&gt; schemaName = identifier(DB2Limit.DB2_MAX_IDENTIFIER_LENGTH30, true)
+	&lt;SCHEMA&gt; schemaName = identifier(Limits.MAX_IDENTIFIER_LENGTH, true)
 	{
 
 		if (schemaName.startsWith("SYS"))
@@ -8386,7 +8386,7 @@
 	TableElementList	tableElementList;
 }
 {
-	&lt;TABLE&gt; tableName = qualifiedName(DB2Limit.DB2_MAX_IDENTIFIER_LENGTH128)
+	&lt;TABLE&gt; tableName = qualifiedName(Limits.MAX_IDENTIFIER_LENGTH)
 	tableElementList = tableElementList()
 	[ properties = propertyList()]
 	{
@@ -8510,7 +8510,7 @@
 	** production to get the grammar to work...
 	*/
 	[ unique = unique() ] &lt;INDEX&gt;
-		indexName = qualifiedName(DB2Limit.DB2_MAX_IDENTIFIER_LENGTH18) &lt;ON&gt; tableName = qualifiedName(DB2Limit.DB2_MAX_IDENTIFIER_LENGTH128)
+		indexName = qualifiedName(Limits.MAX_IDENTIFIER_LENGTH) &lt;ON&gt; tableName = qualifiedName(Limits.MAX_IDENTIFIER_LENGTH)
 				&lt;LEFT_PAREN&gt; indexColumnList(indexColumnList) &lt;RIGHT_PAREN&gt;
 		[ properties = propertyList()]
 	{
@@ -8591,7 +8591,7 @@
 	Object[] procedureElements = new Object[9];
 }
 {
-		&lt;PROCEDURE&gt; procedureName = qualifiedName(DB2Limit.DB2_MAX_IDENTIFIER_LENGTH128)
+		&lt;PROCEDURE&gt; procedureName = qualifiedName(Limits.MAX_IDENTIFIER_LENGTH)
 		procedureElements[0] = procedureParameterList()
 		( routineElement(true, procedureElements) ) +
 		{
@@ -8616,7 +8616,7 @@
 }
 {
 	(
-		&lt;SPECIFIC&gt; clauseValue = qualifiedName(DB2Limit.DB2_MAX_IDENTIFIER_LENGTH128)
+		&lt;SPECIFIC&gt; clauseValue = qualifiedName(Limits.MAX_IDENTIFIER_LENGTH)
 			{ clausePosition = 1; throw StandardException.newException(SQLState.NOT_IMPLEMENTED, "SPECIFIC identifier");}
 	|
 		[ &lt;DYNAMIC&gt; ] &lt;RESULT&gt; &lt;SETS&gt; drs = uint_value()
@@ -8712,7 +8712,7 @@
 }
 {
 	inout = inoutParameter()
-	parameterName = identifier(DB2Limit.DB2_MAX_IDENTIFIER_LENGTH128, true) 
+	parameterName = identifier(Limits.MAX_IDENTIFIER_LENGTH, true) 
 	typeDescriptor = dataTypeDDL() 
 	{
 		list[0].addElement(parameterName);
@@ -8758,7 +8758,7 @@
 	Object[] functionElements = new Object[9];
 }
 {
-		&lt;FUNCTION&gt; functionName = qualifiedName(DB2Limit.DB2_MAX_IDENTIFIER_LENGTH18)
+		&lt;FUNCTION&gt; functionName = qualifiedName(Limits.MAX_IDENTIFIER_LENGTH)
 		functionElements[0] = functionParameterList()
 		&lt;RETURNS&gt; functionElements[8] = dataTypeCommon() 
 		( routineElement(false, functionElements) ) +
@@ -8805,7 +8805,7 @@
 	Integer				inout;
 }
 {
-	parameterName = identifier(DB2Limit.DB2_MAX_IDENTIFIER_LENGTH128, true) 
+	parameterName = identifier(Limits.MAX_IDENTIFIER_LENGTH, true) 
 	typeDescriptor = dataTypeDDL() 
 	{
 		list[0].addElement(parameterName);
@@ -8825,7 +8825,7 @@
 	Token				endToken;
 }
 {
-	&lt;VIEW&gt; tableName = qualifiedName(DB2Limit.DB2_MAX_IDENTIFIER_LENGTH128) 
+	&lt;VIEW&gt; tableName = qualifiedName(Limits.MAX_IDENTIFIER_LENGTH) 
 		[ &lt;LEFT_PAREN&gt; resultColumns = viewColumnList() &lt;RIGHT_PAREN&gt; ]
 		&lt;AS&gt; queryExpression = queryExpression(null, NO_SET_OP)
 	{
@@ -8888,10 +8888,10 @@
 	Vector				refClause = null;
 }
 {
-	&lt;TRIGGER&gt; triggerName = qualifiedName(DB2Limit.DB2_MAX_IDENTIFIER_LENGTH18)
+	&lt;TRIGGER&gt; triggerName = qualifiedName(Limits.MAX_IDENTIFIER_LENGTH)
 	isBefore = beforeOrAfter()
 		triggerEvent = triggerEvent(triggerColumns)		// { INSERT | DELETE | UPDATE [ colList	] }
-		&lt;ON&gt; tableName = qualifiedName(DB2Limit.DB2_MAX_IDENTIFIER_LENGTH128)
+		&lt;ON&gt; tableName = qualifiedName(Limits.MAX_IDENTIFIER_LENGTH)
 		[ refClause = triggerReferencingClause() ]		// REFERENCING OLD/NEW AS 	
 		&lt;FOR&gt; &lt;EACH&gt; isRow = rowOrStatement()
 		&lt;MODE&gt; &lt;DB2SQL&gt;
@@ -9018,7 +9018,7 @@
 	  &lt;OLD_TABLE&gt; { isNew = false; isRow = false;}
 	)
 
-	&lt;AS&gt; identifier = identifier(DB2Limit.DB2_MAX_IDENTIFIER_LENGTH128, true)
+	&lt;AS&gt; identifier = identifier(Limits.MAX_IDENTIFIER_LENGTH, true)
 	{
 		vector.addElement(new TriggerReferencingStruct(isRow, isNew, identifier));
 	}
@@ -9319,7 +9319,7 @@
 			SanityManager.ASSERT(ePosn != -1, "no E or e in approximate numeric");
 
 		// there is a limit on the length of a floatingpoint literal in DB2
-		if (doubleString.length() &gt; DB2Limit.DB2_MAX_FLOATINGPOINT_LITERAL_LENGTH)
+		if (doubleString.length() &gt; Limits.DB2_MAX_FLOATINGPOINT_LITERAL_LENGTH)
 			throw StandardException.newException(SQLState.LANG_DB2_TOO_LONG_FLOATING_POINT_LITERAL, doubleString, TypeId.DOUBLE_NAME);
 		// if there is no '.' before the e, put one in
 		dotPosn = doubleString.substring(0,ePosn).indexOf('.');
@@ -9492,7 +9492,7 @@
 	tok = &lt;STRING&gt;
 	{
 		//there is a maximum limit on the length of the string
-		if (tok.image.length()-2 &gt; DB2Limit.DB2_MAX_CHARACTER_LITERAL_LENGTH)//-2 is for the beginning and ending quote
+		if (tok.image.length()-2 &gt; Limits.DB2_MAX_CHARACTER_LITERAL_LENGTH)//-2 is for the beginning and ending quote
 			throw StandardException.newException(SQLState.LANG_DB2_STRING_CONSTANT_TOO_LONG, StringUtil.formatForPrint(tok.image));
 		string = compressQuotes(tok.image.substring(1, tok.image.length() - 1), SINGLEQUOTES);
 		/* Trim quotes from string. */
@@ -9517,7 +9517,7 @@
 		String hexLiteral = tok.image;
 
 		//there is a maximum limit on the length of the hex constant
-		if (hexLiteral.length()-3 &gt; DB2Limit.DB2_MAX_HEX_LITERAL_LENGTH)//-3 is for X' at the beginning and ' at the end
+		if (hexLiteral.length()-3 &gt; Limits.DB2_MAX_HEX_LITERAL_LENGTH)//-3 is for X' at the beginning and ' at the end
 			throw StandardException.newException(SQLState.LANG_DB2_STRING_CONSTANT_TOO_LONG, StringUtil.formatForPrint(hexLiteral));
 		if ((hexLiteral.length()-3)%2 == 1)
 			throw StandardException.newException(SQLState.LANG_DB2_INVALID_HEXADECIMAL_CONSTANT, StringUtil.formatForPrint(hexLiteral));
@@ -9538,7 +9538,7 @@
 }
 {
 	/* changed constraintName() to qualifiedName() for compaction */
-	&lt;CONSTRAINT&gt; constraintName = qualifiedName(DB2Limit.DB2_MAX_IDENTIFIER_LENGTH18)
+	&lt;CONSTRAINT&gt; constraintName = qualifiedName(Limits.MAX_IDENTIFIER_LENGTH)
 	{
 		return constraintName;
 	}
@@ -9623,7 +9623,7 @@
 	String newTableName;
 }
 {
-	&lt;TABLE&gt; tableName = qualifiedName(DB2Limit.DB2_MAX_IDENTIFIER_LENGTH128) &lt;TO&gt; newTableName = identifier(DB2Limit.DB2_MAX_IDENTIFIER_LENGTH128, true)
+	&lt;TABLE&gt; tableName = qualifiedName(Limits.MAX_IDENTIFIER_LENGTH) &lt;TO&gt; newTableName = identifier(Limits.MAX_IDENTIFIER_LENGTH, true)
 	{
 		return (QueryTreeNode) nodeFactory.getNode(
 								C_NodeTypes.RENAME_NODE,
@@ -9646,7 +9646,7 @@
 	String newIndexName;
 }
 {
-	&lt;INDEX&gt; oldIndexName = identifier(DB2Limit.DB2_MAX_IDENTIFIER_LENGTH18, true) &lt;TO&gt; newIndexName = identifier(DB2Limit.DB2_MAX_IDENTIFIER_LENGTH18, true)
+	&lt;INDEX&gt; oldIndexName = identifier(Limits.MAX_IDENTIFIER_LENGTH, true) &lt;TO&gt; newIndexName = identifier(Limits.MAX_IDENTIFIER_LENGTH, true)
 	{
 		QueryTreeNode qtn = nodeFactory.getNode(
 								C_NodeTypes.RENAME_NODE,
@@ -9670,7 +9670,7 @@
 	TableName					tableName;
 }
 {
-	&lt;LOCK&gt; &lt;TABLE&gt; tableName = qualifiedName(DB2Limit.DB2_MAX_IDENTIFIER_LENGTH128) &lt;IN&gt; exclusiveMode = lockMode() &lt;MODE&gt;
+	&lt;LOCK&gt; &lt;TABLE&gt; tableName = qualifiedName(Limits.MAX_IDENTIFIER_LENGTH) &lt;IN&gt; exclusiveMode = lockMode() &lt;MODE&gt;
 	{
 		return nodeFactory.getNode(
 								C_NodeTypes.LOCK_TABLE_NODE,
@@ -9702,7 +9702,7 @@
 	TableName	stmtName;
 }
 {
-	&lt;EXECUTE&gt; &lt;STATEMENT&gt; stmtName = qualifiedName(DB2Limit.DB2_MAX_IDENTIFIER_LENGTH128) 
+	&lt;EXECUTE&gt; &lt;STATEMENT&gt; stmtName = qualifiedName(Limits.MAX_IDENTIFIER_LENGTH) 
 	{
 		return (QueryTreeNode) nodeFactory.getNode(
 								C_NodeTypes.EXEC_SPS_NODE,
@@ -9886,9 +9886,9 @@
 		if (parameterList != null &amp;&amp; parameterList.size() &gt; 0)
 		{
 			setUpAndLinkParameters();
-			// set the type of parameter node, it should be a varchar max DB2Limit.DB2_MAX_IDENTIFIER_LENGTH128 - non nullable
+			// set the type of parameter node, it should be a varchar max Limits.MAX_IDENTIFIER_LENGTH - non nullable
 			ParameterNode p = (ParameterNode)parameterList.elementAt(0);
-			p.setDescriptor(new DataTypeDescriptor(TypeId.getBuiltInTypeId(Types.VARCHAR), false, DB2Limit.DB2_MAX_IDENTIFIER_LENGTH128));
+			p.setDescriptor(new DataTypeDescriptor(TypeId.getBuiltInTypeId(Types.VARCHAR), false, Limits.MAX_IDENTIFIER_LENGTH));
 		}
 		return setSchema;
 	}
@@ -9910,7 +9910,7 @@
 	String schemaName;
 }
 {
-	schemaName = identifier(DB2Limit.DB2_MAX_IDENTIFIER_LENGTH30, true)
+	schemaName = identifier(Limits.MAX_IDENTIFIER_LENGTH, true)
 	{
 		return (QueryTreeNode) nodeFactory.getNode(
 								C_NodeTypes.SET_SCHEMA_NODE,
@@ -9937,8 +9937,8 @@
 	}
 |	schemaName = string()
 	{
-		/* Max length for schema name is DB2Limit.DB2_MAX_IDENTIFIER_LENGTH128 */
-		checkIdentifierLengthLimit(schemaName, DB2Limit.DB2_MAX_IDENTIFIER_LENGTH30);
+		/* Max length for schema name is Limits.MAX_IDENTIFIER_LENGTH */
+		checkIdentifierLengthLimit(schemaName, Limits.MAX_IDENTIFIER_LENGTH);
 		return (QueryTreeNode) nodeFactory.getNode(
 								C_NodeTypes.SET_SCHEMA_NODE,
 								schemaName,
@@ -10283,7 +10283,7 @@
 	TableName	tableName = null;
 }
 {
-	tableName = qualifiedName(DB2Limit.DB2_MAX_IDENTIFIER_LENGTH128) [ &lt;LEFT_PAREN&gt; columnNameList(rcl) &lt;RIGHT_PAREN&gt; ]
+	tableName = qualifiedName(Limits.MAX_IDENTIFIER_LENGTH) [ &lt;LEFT_PAREN&gt; columnNameList(rcl) &lt;RIGHT_PAREN&gt; ]
 	{
 		return tableName;
 	}
@@ -10477,7 +10477,7 @@
 	String schemaName;
 }
 {
-	&lt;SCHEMA&gt; schemaName = identifier(DB2Limit.DB2_MAX_IDENTIFIER_LENGTH30, true) &lt;RESTRICT&gt;
+	&lt;SCHEMA&gt; schemaName = identifier(Limits.MAX_IDENTIFIER_LENGTH, true) &lt;RESTRICT&gt;
 	{
 		QueryTreeNode stmt =  nodeFactory.getNode(
 							C_NodeTypes.DROP_SCHEMA_NODE,
@@ -10496,7 +10496,7 @@
 	TableName			tableName;
 }
 {
-	&lt;TABLE&gt; tableName = qualifiedName(DB2Limit.DB2_MAX_IDENTIFIER_LENGTH128) node = alterTableBody(tableName)
+	&lt;TABLE&gt; tableName = qualifiedName(Limits.MAX_IDENTIFIER_LENGTH) node = alterTableBody(tableName)
 	{
 		return node;
 	}
@@ -10553,7 +10553,7 @@
 	String newTableName;
 }
 {
-	&lt;TO&gt; newTableName = identifier(DB2Limit.DB2_MAX_IDENTIFIER_LENGTH128, true)
+	&lt;TO&gt; newTableName = identifier(Limits.MAX_IDENTIFIER_LENGTH, true)
 	{
 		return (QueryTreeNode) nodeFactory.getNode(
 							C_NodeTypes.RENAME_NODE,
@@ -10578,7 +10578,7 @@
 	String newColumnName;
 }
 {
-	oldColumnName = identifier(DB2Limit.DB2_MAX_IDENTIFIER_LENGTH30, true) &lt;TO&gt; newColumnName = identifier(DB2Limit.DB2_MAX_IDENTIFIER_LENGTH30, true)
+	oldColumnName = identifier(Limits.MAX_IDENTIFIER_LENGTH, true) &lt;TO&gt; newColumnName = identifier(Limits.MAX_IDENTIFIER_LENGTH, true)
 	{
 		return (QueryTreeNode) nodeFactory.getNode(
 							C_NodeTypes.RENAME_NODE,
@@ -10621,7 +10621,7 @@
 		return lockGranularity;
 	}
 |
-	&lt;ALTER&gt; [ &lt;COLUMN&gt; ] columnName = identifier(DB2Limit.DB2_MAX_IDENTIFIER_LENGTH30, true) &lt;SET&gt;
+	&lt;ALTER&gt; [ &lt;COLUMN&gt; ] columnName = identifier(Limits.MAX_IDENTIFIER_LENGTH, true) &lt;SET&gt;
 		typeDescriptor = DB2AlterColumn(autoIncrementInfo)
 	{
 		changeType[0] = CreateStatementNode.MODIFY_TYPE;
@@ -10681,7 +10681,7 @@
 	TableElementNode tn;
 }
 {
-	columnName = identifier(DB2Limit.DB2_MAX_IDENTIFIER_LENGTH30, true) tn = columnAlterClause(columnName)
+	columnName = identifier(Limits.MAX_IDENTIFIER_LENGTH, true) tn = columnAlterClause(columnName)
 	{
 		return tn;
 	}
@@ -10784,7 +10784,7 @@
 {
 	LOOKAHEAD( {getToken(2).kind == CONSTRAINT} )
 	/* changed constraintName() to qualifiedName() for compaction */
-	&lt;DROP&gt; &lt;CONSTRAINT&gt; constraintName = qualifiedName(DB2Limit.DB2_MAX_IDENTIFIER_LENGTH18)
+	&lt;DROP&gt; &lt;CONSTRAINT&gt; constraintName = qualifiedName(Limits.MAX_IDENTIFIER_LENGTH)
 	{
 		return (TableElementNode) nodeFactory.getNode(
 						C_NodeTypes.CONSTRAINT_DEFINITION_NODE,
@@ -10816,7 +10816,7 @@
 	}
 |
 	LOOKAHEAD( {getToken(2).kind == FOREIGN} )
-        &lt;DROP&gt; &lt;FOREIGN&gt; &lt;KEY&gt; constraintName = qualifiedName(DB2Limit.DB2_MAX_IDENTIFIER_LENGTH18)
+        &lt;DROP&gt; &lt;FOREIGN&gt; &lt;KEY&gt; constraintName = qualifiedName(Limits.MAX_IDENTIFIER_LENGTH)
 	{
 		return (TableElementNode) nodeFactory.getNode(
 						C_NodeTypes.CONSTRAINT_DEFINITION_NODE,
@@ -10833,7 +10833,7 @@
 	}
 |
 	LOOKAHEAD( {getToken(2).kind == UNIQUE} )
-        &lt;DROP&gt; &lt;UNIQUE&gt; constraintName = qualifiedName(DB2Limit.DB2_MAX_IDENTIFIER_LENGTH18)
+        &lt;DROP&gt; &lt;UNIQUE&gt; constraintName = qualifiedName(Limits.MAX_IDENTIFIER_LENGTH)
 	{
 		return (TableElementNode) nodeFactory.getNode(
 						C_NodeTypes.CONSTRAINT_DEFINITION_NODE,
@@ -10849,7 +10849,7 @@
 						);
 	}
 |
-        &lt;DROP&gt; &lt;CHECK&gt; constraintName = qualifiedName(DB2Limit.DB2_MAX_IDENTIFIER_LENGTH18)
+        &lt;DROP&gt; &lt;CHECK&gt; constraintName = qualifiedName(Limits.MAX_IDENTIFIER_LENGTH)
 	{
 		return (TableElementNode) nodeFactory.getNode(
 						C_NodeTypes.CONSTRAINT_DEFINITION_NODE,
@@ -10875,7 +10875,7 @@
 	TableName tableName;
 }
 {
-	&lt;TABLE&gt; tableName = qualifiedName(DB2Limit.DB2_MAX_IDENTIFIER_LENGTH128) 
+	&lt;TABLE&gt; tableName = qualifiedName(Limits.MAX_IDENTIFIER_LENGTH) 
 	{
 		// DB2 does not support a drop behaviour
 		return (QueryTreeNode) nodeFactory.getNode(
@@ -10895,7 +10895,7 @@
 	TableName indexName;
 }
 {
-	&lt;INDEX&gt; indexName = qualifiedName(DB2Limit.DB2_MAX_IDENTIFIER_LENGTH18)
+	&lt;INDEX&gt; indexName = qualifiedName(Limits.MAX_IDENTIFIER_LENGTH)
 	{
 		return (QueryTreeNode) nodeFactory.getNode(
 								C_NodeTypes.DROP_INDEX_NODE,
@@ -10913,11 +10913,11 @@
 	Object aliasName;
 }
 {
-  	&lt;PROCEDURE&gt; aliasName = qualifiedName(DB2Limit.DB2_MAX_IDENTIFIER_LENGTH128) 
+  	&lt;PROCEDURE&gt; aliasName = qualifiedName(Limits.MAX_IDENTIFIER_LENGTH) 
 	{
 		return dropAliasNode(aliasName, AliasInfo.ALIAS_TYPE_PROCEDURE_AS_CHAR);
 	}  
-|  	&lt;FUNCTION&gt; aliasName = qualifiedName(DB2Limit.DB2_MAX_IDENTIFIER_LENGTH128) 
+|  	&lt;FUNCTION&gt; aliasName = qualifiedName(Limits.MAX_IDENTIFIER_LENGTH) 
 	{
 		return dropAliasNode(aliasName, AliasInfo.ALIAS_TYPE_FUNCTION_AS_CHAR);
 	}  
@@ -10929,7 +10929,7 @@
 	TableName viewName;
 }
 {
-	&lt;VIEW&gt; viewName = qualifiedName(DB2Limit.DB2_MAX_IDENTIFIER_LENGTH128) 
+	&lt;VIEW&gt; viewName = qualifiedName(Limits.MAX_IDENTIFIER_LENGTH) 
 	{
 		return (QueryTreeNode) nodeFactory.getNode(
 								C_NodeTypes.DROP_VIEW_NODE,
@@ -10944,7 +10944,7 @@
 	TableName triggerName;
 }
 {
-	&lt;TRIGGER&gt; triggerName = qualifiedName(DB2Limit.DB2_MAX_IDENTIFIER_LENGTH18) 
+	&lt;TRIGGER&gt; triggerName = qualifiedName(Limits.MAX_IDENTIFIER_LENGTH) 
 	{
 		return (QueryTreeNode) nodeFactory.getNode(
 								C_NodeTypes.DROP_TRIGGER_NODE,
@@ -10960,7 +10960,7 @@
 	TableName tableName;
 }
 {
-	&lt;TRUNCATE&gt; &lt;TABLE&gt; tableName = qualifiedName(DB2Limit.DB2_MAX_IDENTIFIER_LENGTH128) 
+	&lt;TRUNCATE&gt; &lt;TABLE&gt; tableName = qualifiedName(Limits.MAX_IDENTIFIER_LENGTH) 
 	{
 		return (QueryTreeNode) nodeFactory.getNode(
 							C_NodeTypes.ALTER_TABLE_NODE,
@@ -11463,7 +11463,7 @@
 	String str;
 }
 {
-	str = identifier(DB2Limit.DB2_MAX_IDENTIFIER_LENGTH128, true)
+	str = identifier(Limits.MAX_IDENTIFIER_LENGTH, true)
 	{
 		return str;
 	}
Index: java/engine/org/apache/derby/impl/sql/compile/CreateViewNode.java
===================================================================
--- java/engine/org/apache/derby/impl/sql/compile/CreateViewNode.java	(revision 170002)
+++ java/engine/org/apache/derby/impl/sql/compile/CreateViewNode.java	(working copy)
@@ -45,7 +45,7 @@
 import org.apache.derby.iapi.sql.depend.ProviderList;
 
 import org.apache.derby.iapi.reference.SQLState;
-import org.apache.derby.iapi.reference.DB2Limit;
+import org.apache.derby.iapi.reference.Limits;
 
 import org.apache.derby.iapi.sql.execute.ConstantAction;
 
@@ -221,12 +221,12 @@
 
 
 		/* Only 5000 columns allowed per view */
-		if (queryExpression.getResultColumns().size() &gt; DB2Limit.DB2_MAX_COLUMNS_IN_VIEW)
+		if (queryExpression.getResultColumns().size() &gt; Limits.DB2_MAX_COLUMNS_IN_VIEW)
 		{
 			throw StandardException.newException(SQLState.LANG_TOO_MANY_COLUMNS_IN_TABLE_OR_VIEW,
 				String.valueOf(queryExpression.getResultColumns().size()),
 				getRelativeName(),
-				String.valueOf(DB2Limit.DB2_MAX_COLUMNS_IN_VIEW));
+				String.valueOf(Limits.DB2_MAX_COLUMNS_IN_VIEW));
 		}
 
 		// for each column, stuff system.column
Index: java/engine/org/apache/derby/impl/sql/compile/ConcatenationOperatorNode.java
===================================================================
--- java/engine/org/apache/derby/impl/sql/compile/ConcatenationOperatorNode.java	(revision 170002)
+++ java/engine/org/apache/derby/impl/sql/compile/ConcatenationOperatorNode.java	(working copy)
@@ -40,7 +40,7 @@
 import org.apache.derby.iapi.services.compiler.LocalField;
 import org.apache.derby.impl.sql.compile.ExpressionClassBuilder;
 
-import org.apache.derby.iapi.reference.DB2Limit;
+import org.apache.derby.iapi.reference.Limits;
 import org.apache.derby.iapi.reference.SQLState;
 import org.apache.derby.iapi.reference.ClassName;
 
@@ -374,7 +374,7 @@
 			{
 				case Types.CHAR:
 				case Types.BINARY:
-					if (resultLength &gt; DB2Limit.DB2_CHAR_MAXWIDTH) {
+					if (resultLength &gt; Limits.DB2_CHAR_MAXWIDTH) {
 						if (rightTypeId.getJDBCTypeId() == Types.CHAR)
 								//operands CHAR(A) CHAR(B) and A+B&gt;254 then result is VARCHAR(A+B)
 								higherType = TypeId.VARCHAR_NAME;
@@ -386,7 +386,7 @@
 
 				case Types.VARCHAR:
 				case Types.VARBINARY:
-					if (resultLength &gt; DB2Limit.DB2_CONCAT_VARCHAR_LENGTH) {
+					if (resultLength &gt; Limits.DB2_CONCAT_VARCHAR_LENGTH) {
 						if (rightTypeId.getJDBCTypeId() == Types.VARCHAR)
 								//operands CHAR(A) VARCHAR(B) and A+B&gt;4000 then result is LONG VARCHAR
 								higherType = TypeId.LONGVARCHAR_NAME;
@@ -408,7 +408,7 @@
 			{
 				case Types.CHAR: //operands CHAR(A) VARCHAR(B) and A+B&gt;4000 then result is LONG VARCHAR
 				case Types.VARCHAR: //operands VARCHAR(A) VARCHAR(B) and A+B&gt;4000 then result is LONG VARCHAR
-					if (resultLength &gt; DB2Limit.DB2_CONCAT_VARCHAR_LENGTH)
+					if (resultLength &gt; Limits.DB2_CONCAT_VARCHAR_LENGTH)
 						higherType = TypeId.LONGVARCHAR_NAME;
 					break;
 
@@ -422,7 +422,7 @@
 			{
 				case Types.BINARY: //operands CHAR FOR BIT DATA(A) VARCHAR FOR BIT DATA(B) and A+B&gt;4000 then result is LONG VARCHAR FOR BIT DATA
 				case Types.VARBINARY://operands VARCHAR FOR BIT DATA(A) VARCHAR FOR BIT DATA(B) and A+B&gt;4000 then result is LONG VARCHAR FOR BIT DATA
-					if (resultLength &gt; DB2Limit.DB2_CONCAT_VARCHAR_LENGTH)
+					if (resultLength &gt; Limits.DB2_CONCAT_VARCHAR_LENGTH)
 						higherType = TypeId.LONGVARBIT_NAME;
 					break;
 
Index: java/engine/org/apache/derby/impl/sql/conn/GenericLanguageConnectionContext.java
===================================================================
--- java/engine/org/apache/derby/impl/sql/conn/GenericLanguageConnectionContext.java	(revision 170002)
+++ java/engine/org/apache/derby/impl/sql/conn/GenericLanguageConnectionContext.java	(working copy)
@@ -59,7 +59,7 @@
 import org.apache.derby.iapi.sql.depend.DependencyManager;
 import org.apache.derby.iapi.sql.depend.Provider;
 import org.apache.derby.iapi.reference.SQLState;
-import org.apache.derby.iapi.reference.DB2Limit;
+import org.apache.derby.iapi.reference.Limits;
 import org.apache.derby.iapi.sql.execute.ConstantAction;
 import org.apache.derby.iapi.sql.execute.CursorActivation;
 import org.apache.derby.iapi.sql.execute.ExecPreparedStatement;
@@ -2084,7 +2084,7 @@
 		}
 
 		/* Maximum 16 nesting levels allowed */
-		if (triggerExecutionContexts.size() &gt;= DB2Limit.DB2_MAX_TRIGGER_RECURSION)
+		if (triggerExecutionContexts.size() &gt;= Limits.DB2_MAX_TRIGGER_RECURSION)
 		{
 			throw StandardException.newException(SQLState.LANG_TRIGGER_RECURSION_EXCEEDED);
 		}
Index: java/engine/org/apache/derby/impl/sql/execute/SetSchemaConstantAction.java
===================================================================
--- java/engine/org/apache/derby/impl/sql/execute/SetSchemaConstantAction.java	(revision 170002)
+++ java/engine/org/apache/derby/impl/sql/execute/SetSchemaConstantAction.java	(working copy)
@@ -31,6 +31,8 @@
 
 import org.apache.derby.iapi.types.DataValueDescriptor;
 
+import org.apache.derby.iapi.reference.Limits;
+
 import org.apache.derby.iapi.error.StandardException;
 
 import org.apache.derby.iapi.sql.Activation;
@@ -109,7 +111,7 @@
 			DataValueDescriptor dvs = pvs.getParameter(0);
 			thisSchemaName = dvs.getString();
 			//null parameter is not allowed
-			if (thisSchemaName == null || thisSchemaName.length() &gt; 128)
+			if (thisSchemaName == null || thisSchemaName.length() &gt; Limits.MAX_IDENTIFIER_LENGTH)
 				throw StandardException.newException(SQLState.LANG_DB2_REPLACEMENT_ERROR, "CURRENT SCHEMA");
 		}
 		else if (type == StatementType.SET_SCHEMA_USER)
Index: java/engine/org/apache/derby/impl/sql/catalog/DataDictionaryImpl.java
===================================================================
--- java/engine/org/apache/derby/impl/sql/catalog/DataDictionaryImpl.java	(revision 170002)
+++ java/engine/org/apache/derby/impl/sql/catalog/DataDictionaryImpl.java	(working copy)
@@ -23,7 +23,7 @@
 import org.apache.derby.iapi.reference.JDBC30Translation;
 import org.apache.derby.iapi.reference.Property;
 import org.apache.derby.iapi.reference.SQLState;
-import org.apache.derby.iapi.reference.DB2Limit;
+import org.apache.derby.iapi.reference.Limits;
 
 import org.apache.derby.iapi.sql.compile.CompilerContext;
 
@@ -8180,7 +8180,7 @@
 
 
         // void SYSCS_UTIL.SYSCS_SET_DATABASE_PROPERTY(
-        //     varchar(128), varchar(DB2Limit.DB2_VARCHAR_MAXWIDTH))
+        //     varchar(128), varchar(Limits.DB2_VARCHAR_MAXWIDTH))
         {
 
             // procedure argument names
@@ -8193,7 +8193,7 @@
                 DataTypeDescriptor.getBuiltInDataTypeDescriptor(
                     Types.VARCHAR, 128),
                 DataTypeDescriptor.getBuiltInDataTypeDescriptor(
-                    Types.VARCHAR, DB2Limit.DB2_VARCHAR_MAXWIDTH)
+                    Types.VARCHAR, Limits.DB2_VARCHAR_MAXWIDTH)
             };
 
             createSystemProcedureOrFunction(
@@ -8279,7 +8279,7 @@
                 tc);
         }
 
-        // void SYSCS_UTIL.SYSCS_BACKUP_DATABASE(varchar DB2Limit.DB2_VARCHAR_MAXWIDTH)
+        // void SYSCS_UTIL.SYSCS_BACKUP_DATABASE(varchar Limits.DB2_VARCHAR_MAXWIDTH)
         {
             // procedure argument names
             String[] arg_names = {"BACKUPDIR"};
@@ -8287,7 +8287,7 @@
             // procedure argument types
             TypeDescriptor[] arg_types = {
                 DataTypeDescriptor.getBuiltInDataTypeDescriptor(
-                    Types.VARCHAR, DB2Limit.DB2_VARCHAR_MAXWIDTH)
+                    Types.VARCHAR, Limits.DB2_VARCHAR_MAXWIDTH)
             };
 
             createSystemProcedureOrFunction(
@@ -8303,7 +8303,7 @@
         }
 
         // void SYSCS_UTIL.SYSCS_BACKUP_DATABASE_AND_ENABLE_LOG_ARCHIVE_MODE(
-        //     varchar DB2Limit.DB2_VARCHAR_MAXWIDTH, smallint)
+        //     varchar Limits.DB2_VARCHAR_MAXWIDTH, smallint)
         {
             // procedure argument names
             String[] arg_names = {"BACKUPDIR", "DELETE_ARCHIVED_LOG_FILES"};
@@ -8311,7 +8311,7 @@
             // procedure argument types
             TypeDescriptor[] arg_types = {
                 DataTypeDescriptor.getBuiltInDataTypeDescriptor(
-                    Types.VARCHAR, DB2Limit.DB2_VARCHAR_MAXWIDTH),
+                    Types.VARCHAR, Limits.DB2_VARCHAR_MAXWIDTH),
                 DataTypeDescriptor.getBuiltInDataTypeDescriptor(
                     Types.SMALLINT)
             };
@@ -8404,7 +8404,7 @@
         // the following need to be functions when that is supported.
         // until then calling them will not work.
 
-        // VARCHAR(DB2Limit.DB2_VARCHAR_MAXWIDTH) 
+        // VARCHAR(Limits.DB2_VARCHAR_MAXWIDTH) 
         // SYSCS_UTIL.SYSCS_GET_DATABASE_PROPERTY(varchar(128))
 
         {
@@ -8426,7 +8426,7 @@
 				0,
                 RoutineAliasInfo.READS_SQL_DATA,
                 DataTypeDescriptor.getBuiltInDataTypeDescriptor(
-                    Types.VARCHAR, DB2Limit.DB2_VARCHAR_MAXWIDTH),
+                    Types.VARCHAR, Limits.DB2_VARCHAR_MAXWIDTH),
                 tc);
         }
 
@@ -8468,13 +8468,13 @@
 				0,
                 RoutineAliasInfo.CONTAINS_SQL,
                 DataTypeDescriptor.getBuiltInDataTypeDescriptor(
-                    Types.VARCHAR, DB2Limit.DB2_VARCHAR_MAXWIDTH),
+                    Types.VARCHAR, Limits.DB2_VARCHAR_MAXWIDTH),
 
                 /*
                 TODO - mikem, wants to be a CLOB, but don't know how to do 
                 that yet.  Testing it with varchar for now.
                 DataTypeDescriptor.getBuiltInDataTypeDescriptor(
-                    Types.CLOB, DB2Limit.DB2_LOB_MAXWIDTH),
+                    Types.CLOB, Limits.DB2_LOB_MAXWIDTH),
                 */
                 tc);
         }
@@ -8867,7 +8867,7 @@
 				DataTypeDescriptor.getBuiltInDataTypeDescriptor(Types.INTEGER),
 				DataTypeDescriptor.getBuiltInDataTypeDescriptor(Types.SMALLINT),
 				DataTypeDescriptor.getBuiltInDataTypeDescriptor(
-						Types.VARCHAR, DB2Limit.DB2_JCC_MAX_EXCEPTION_PARAM_LENGTH),
+						Types.VARCHAR, Limits.DB2_JCC_MAX_EXCEPTION_PARAM_LENGTH),
 				DataTypeDescriptor.getBuiltInDataTypeDescriptor(Types.CHAR, 8),
 				DataTypeDescriptor.getBuiltInDataTypeDescriptor(Types.INTEGER),
 				DataTypeDescriptor.getBuiltInDataTypeDescriptor(Types.INTEGER),
Index: java/engine/org/apache/derby/impl/sql/catalog/DD_Version.java
===================================================================
--- java/engine/org/apache/derby/impl/sql/catalog/DD_Version.java	(revision 170002)
+++ java/engine/org/apache/derby/impl/sql/catalog/DD_Version.java	(working copy)
@@ -47,7 +47,7 @@
 import org.apache.derby.iapi.services.info.ProductGenusNames;
 import org.apache.derby.iapi.services.info.ProductVersionHolder;
 import org.apache.derby.iapi.reference.JDBC30Translation;
-import org.apache.derby.iapi.reference.DB2Limit;
+import org.apache.derby.iapi.reference.Limits;
 
 import org.apache.derby.iapi.services.uuid.UUIDFactory;
 import org.apache.derby.catalog.UUID;
Index: java/engine/org/apache/derby/impl/load/ImportResultSetMetaData.java
===================================================================
--- java/engine/org/apache/derby/impl/load/ImportResultSetMetaData.java	(revision 170002)
+++ java/engine/org/apache/derby/impl/load/ImportResultSetMetaData.java	(working copy)
@@ -23,7 +23,7 @@
 import java.sql.SQLException;
 import org.apache.derby.vti.VTIMetaDataTemplate;
 
-import org.apache.derby.iapi.reference.DB2Limit;
+import org.apache.derby.iapi.reference.Limits;
 
 class ImportResultSetMetaData extends VTIMetaDataTemplate {
 
@@ -55,7 +55,7 @@
   }
 	public int getColumnDisplaySize(int column) {
     if (columnWidths == null)
-       return DB2Limit.DB2_VARCHAR_MAXWIDTH;
+       return Limits.DB2_VARCHAR_MAXWIDTH;
     else
        return columnWidths[column-1];
   }
Index: java/engine/org/apache/derby/impl/jdbc/authentication/AuthenticationServiceBase.java
===================================================================
--- java/engine/org/apache/derby/impl/jdbc/authentication/AuthenticationServiceBase.java	(revision 170002)
+++ java/engine/org/apache/derby/impl/jdbc/authentication/AuthenticationServiceBase.java	(working copy)
@@ -24,7 +24,7 @@
 import org.apache.derby.iapi.reference.Property;
 import org.apache.derby.iapi.jdbc.AuthenticationService;
 
-import org.apache.derby.iapi.reference.DB2Limit;
+import org.apache.derby.iapi.reference.Limits;
 
 import org.apache.derby.iapi.error.StandardException;
 import org.apache.derby.iapi.services.i18n.MessageService;
@@ -188,7 +188,7 @@
 			return false;
 
 		String userName = userInfo.getProperty(Attribute.USERNAME_ATTR);
-		if ((userName != null) &amp;&amp; userName.length() &gt; DB2Limit.MAX_USERID_LENGTH) {
+		if ((userName != null) &amp;&amp; userName.length() &gt; Limits.DB2_MAX_USERID_LENGTH) {
 		// DB2 has limits on length of the user id, so we enforce the same.
 		// This used to be error 28000 "Invalid authorization ID", but with v82,
 		// DB2 changed the behavior to return a normal "authorization failure
Index: java/engine/org/apache/derby/impl/jdbc/EmbedConnection30.java
===================================================================
--- java/engine/org/apache/derby/impl/jdbc/EmbedConnection30.java	(revision 170002)
+++ java/engine/org/apache/derby/impl/jdbc/EmbedConnection30.java	(working copy)
@@ -28,7 +28,7 @@
 import org.apache.derby.jdbc.InternalDriver;
 
 import org.apache.derby.iapi.reference.SQLState;
-import org.apache.derby.iapi.reference.DB2Limit;
+import org.apache.derby.iapi.reference.Limits;
 
 import org.apache.derby.iapi.error.ExceptionSeverity;
 
@@ -138,8 +138,8 @@
 				if (userSuppliedSavepointName &amp;&amp; (name == null))//make sure that if it is a named savepoint then supplied name is not null
 					throw newSQLException(SQLState.NULL_NAME_FOR_SAVEPOINT);
 				//make sure that if it is a named savepoint then supplied name length is not &gt; 128
-				if (userSuppliedSavepointName &amp;&amp; (name.length() &gt; DB2Limit.DB2_MAX_IDENTIFIER_LENGTH128))
-					throw newSQLException(SQLState.LANG_IDENTIFIER_TOO_LONG, name, String.valueOf(DB2Limit.DB2_MAX_IDENTIFIER_LENGTH128));
+				if (userSuppliedSavepointName &amp;&amp; (name.length() &gt; Limits.MAX_IDENTIFIER_LENGTH))
+					throw newSQLException(SQLState.LANG_IDENTIFIER_TOO_LONG, name, String.valueOf(Limits.MAX_IDENTIFIER_LENGTH));
 				if (userSuppliedSavepointName &amp;&amp; name.startsWith("SYS")) //to enforce DB2 restriction which is savepoint name can't start with SYS
 					throw newSQLException(SQLState.INVALID_SCHEMA_SYS, "SYS");
 				Savepoint savePt = new EmbedSavepoint30(this, name);
Index: java/engine/org/apache/derby/impl/jdbc/EmbedDatabaseMetaData.java
===================================================================
--- java/engine/org/apache/derby/impl/jdbc/EmbedDatabaseMetaData.java	(revision 170002)
+++ java/engine/org/apache/derby/impl/jdbc/EmbedDatabaseMetaData.java	(working copy)
@@ -34,7 +34,7 @@
 import org.apache.derby.impl.sql.execute.GenericConstantActionFactory;
 import org.apache.derby.impl.sql.execute.GenericExecutionFactory;
 
-import org.apache.derby.iapi.reference.DB2Limit;
+import org.apache.derby.iapi.reference.Limits;
 import org.apache.derby.iapi.reference.JDBC20Translation;
 import org.apache.derby.iapi.reference.JDBC30Translation;
 
@@ -1095,7 +1095,7 @@
      * @return max literal length
      */
 	public int getMaxColumnNameLength() {
-		return DB2Limit.DB2_MAX_IDENTIFIER_LENGTH30;
+		return Limits.MAX_IDENTIFIER_LENGTH;
 	}
 
     /**
@@ -1160,7 +1160,7 @@
      * @return max cursor name length in bytes
      */
 	public int getMaxCursorNameLength() {
-		return DB2Limit.DB2_MAX_IDENTIFIER_LENGTH18;
+		return Limits.MAX_IDENTIFIER_LENGTH;
 	}
 
     /**
@@ -1178,7 +1178,7 @@
      * @return max name length in bytes
      */
 	public int getMaxSchemaNameLength()  {
-		return DB2Limit.DB2_MAX_IDENTIFIER_LENGTH30;
+		return Limits.MAX_IDENTIFIER_LENGTH;
 	}
 
     /**
@@ -1187,7 +1187,7 @@
      * @return max name length in bytes
      */
 	public int getMaxProcedureNameLength() {
-		return DB2Limit.DB2_MAX_IDENTIFIER_LENGTH128;
+		return Limits.MAX_IDENTIFIER_LENGTH;
 	}
 
     /**
@@ -1243,7 +1243,7 @@
      * @return max name length in bytes
      */
 	public int getMaxTableNameLength() {
-		return DB2Limit.DB2_MAX_IDENTIFIER_LENGTH128;
+		return Limits.MAX_IDENTIFIER_LENGTH;
 	}
 
     /**
@@ -1261,7 +1261,7 @@
      * @return max name length  in bytes
      */
 	public int getMaxUserNameLength() {
-		return DB2Limit.DB2_MAX_IDENTIFIER_LENGTH30;
+		return Limits.DB2_MAX_USERID_LENGTH;
 	}
 
     //----------------------------------------------------------------------
Index: java/engine/org/apache/derby/impl/store/raw/data/FileContainer.java
===================================================================
--- java/engine/org/apache/derby/impl/store/raw/data/FileContainer.java	(revision 170002)
+++ java/engine/org/apache/derby/impl/store/raw/data/FileContainer.java	(working copy)
@@ -22,7 +22,7 @@
 
 import org.apache.derby.iapi.reference.Property;
 
-import org.apache.derby.iapi.reference.DB2Limit;
+import org.apache.derby.iapi.reference.Limits;
 import org.apache.derby.iapi.reference.SQLState;
 
 import org.apache.derby.impl.store.raw.data.BaseContainer;
@@ -1111,8 +1111,8 @@
 		pageSize = 
 			PropertyUtil.getServiceInt(tc, createArgs,
 				Property.PAGE_SIZE_PARAMETER,  
-				DB2Limit.DB2_MIN_PAGE_SIZE, 
-				DB2Limit.DB2_MAX_PAGE_SIZE, 
+				Limits.DB2_MIN_PAGE_SIZE, 
+				Limits.DB2_MAX_PAGE_SIZE, 
 				RawStoreFactory.PAGE_SIZE_DEFAULT); 
 
         // rather than throw error, just automatically set page size to 
Index: java/engine/org/apache/derby/iapi/sql/compile/TypeCompiler.java
===================================================================
--- java/engine/org/apache/derby/iapi/sql/compile/TypeCompiler.java	(revision 170002)
+++ java/engine/org/apache/derby/iapi/sql/compile/TypeCompiler.java	(working copy)
@@ -31,7 +31,7 @@
 
 import org.apache.derby.iapi.error.StandardException;
 
-import org.apache.derby.iapi.reference.DB2Limit;
+import org.apache.derby.iapi.reference.Limits;
 
 /**
  * This interface defines methods associated with a TypeId that are used
@@ -61,9 +61,9 @@
 	// Need to leave space for '-' and decimal point
 	public static final int REAL_MAXWIDTH_AS_CHAR	= 25;
 
-	public static final int DEFAULT_DECIMAL_PRECISION	= DB2Limit.DEFAULT_DECIMAL_PRECISION;
-	public static final int DEFAULT_DECIMAL_SCALE 		= DB2Limit.DEFAULT_DECIMAL_SCALE;
-	public static final int MAX_DECIMAL_PRECISION_SCALE = DB2Limit.MAX_DECIMAL_PRECISION_SCALE;
+	public static final int DEFAULT_DECIMAL_PRECISION	= Limits.DB2_DEFAULT_DECIMAL_PRECISION;
+	public static final int DEFAULT_DECIMAL_SCALE 		= Limits.DB2_DEFAULT_DECIMAL_SCALE;
+	public static final int MAX_DECIMAL_PRECISION_SCALE = Limits.DB2_MAX_DECIMAL_PRECISION_SCALE;
 
 	public static final int BOOLEAN_MAXWIDTH_AS_CHAR	= 5;
 
Index: java/engine/org/apache/derby/iapi/types/TypeId.java
===================================================================
--- java/engine/org/apache/derby/iapi/types/TypeId.java	(revision 170002)
+++ java/engine/org/apache/derby/iapi/types/TypeId.java	(working copy)
@@ -31,7 +31,7 @@
 import org.apache.derby.catalog.types.DecimalTypeIdImpl;
 import org.apache.derby.catalog.types.UserDefinedTypeIdImpl;
 
-import org.apache.derby.iapi.reference.DB2Limit;
+import org.apache.derby.iapi.reference.Limits;
 
 import java.io.ObjectOutput;
 import java.io.ObjectInput;
@@ -94,21 +94,21 @@
         public static final int REAL_SCALE                              = 0;
         public static final int REAL_MAXWIDTH                   = 4;
 
-        public static final int DECIMAL_PRECISION                       = DB2Limit.MAX_DECIMAL_PRECISION_SCALE;
-        public static final int DECIMAL_SCALE                           = DB2Limit.MAX_DECIMAL_PRECISION_SCALE;
-        public static final int DECIMAL_MAXWIDTH                        = DB2Limit.MAX_DECIMAL_PRECISION_SCALE;
+        public static final int DECIMAL_PRECISION                       = Limits.DB2_MAX_DECIMAL_PRECISION_SCALE;
+        public static final int DECIMAL_SCALE                           = Limits.DB2_MAX_DECIMAL_PRECISION_SCALE;
+        public static final int DECIMAL_MAXWIDTH                        = Limits.DB2_MAX_DECIMAL_PRECISION_SCALE;
 
         public static final int BOOLEAN_MAXWIDTH                        = 1;
 
-        public static final int CHAR_MAXWIDTH           = DB2Limit.DB2_CHAR_MAXWIDTH;
-        public static final int VARCHAR_MAXWIDTH        = DB2Limit.DB2_VARCHAR_MAXWIDTH;
-        public static final int LONGVARCHAR_MAXWIDTH = DB2Limit.DB2_LONGVARCHAR_MAXWIDTH;
+        public static final int CHAR_MAXWIDTH           = Limits.DB2_CHAR_MAXWIDTH;
+        public static final int VARCHAR_MAXWIDTH        = Limits.DB2_VARCHAR_MAXWIDTH;
+        public static final int LONGVARCHAR_MAXWIDTH = Limits.DB2_LONGVARCHAR_MAXWIDTH;
         public static final int NATIONAL_CHAR_MAXWIDTH  = Integer.MAX_VALUE;
         public static final int NATIONAL_VARCHAR_MAXWIDTH       = Integer.MAX_VALUE;
-        public static final int NATIONAL_LONGVARCHAR_MAXWIDTH = DB2Limit.DB2_LONGVARCHAR_MAXWIDTH;
-        public static final int BIT_MAXWIDTH            = DB2Limit.DB2_CHAR_MAXWIDTH;
-        public static final int VARBIT_MAXWIDTH         = DB2Limit.DB2_VARCHAR_MAXWIDTH;
-        public static final int LONGVARBIT_MAXWIDTH = DB2Limit.DB2_LONGVARCHAR_MAXWIDTH;
+        public static final int NATIONAL_LONGVARCHAR_MAXWIDTH = Limits.DB2_LONGVARCHAR_MAXWIDTH;
+        public static final int BIT_MAXWIDTH            = Limits.DB2_CHAR_MAXWIDTH;
+        public static final int VARBIT_MAXWIDTH         = Limits.DB2_VARCHAR_MAXWIDTH;
+        public static final int LONGVARBIT_MAXWIDTH = Limits.DB2_LONGVARCHAR_MAXWIDTH;
 
         // not supposed to be limited! 4096G should be ok(?), if Cloudscape can handle...
         public static final int BLOB_MAXWIDTH = Integer.MAX_VALUE; // to change long
Index: java/engine/org/apache/derby/iapi/types/NumberDataType.java
===================================================================
--- java/engine/org/apache/derby/iapi/types/NumberDataType.java	(revision 170002)
+++ java/engine/org/apache/derby/iapi/types/NumberDataType.java	(working copy)
@@ -28,7 +28,7 @@
 import org.apache.derby.iapi.types.DataValueDescriptor;
 import org.apache.derby.iapi.types.TypeId;
 import org.apache.derby.iapi.reference.SQLState;
-import org.apache.derby.iapi.reference.DB2Limit;
+import org.apache.derby.iapi.reference.Limits;
 
 import org.apache.derby.iapi.types.*;
 
@@ -476,9 +476,9 @@
     public static float normalizeREAL(float v) throws StandardException
 	{
         if ( (Float.isNaN(v) || Float.isInfinite(v)) ||
-             ((v &lt; DB2Limit.DB2_SMALLEST_REAL) || (v &gt; DB2Limit.DB2_LARGEST_REAL)) ||
-             ((v &gt; 0) &amp;&amp; (v &lt; DB2Limit.DB2_SMALLEST_POSITIVE_REAL)) ||
-             ((v &lt; 0) &amp;&amp; (v &gt; DB2Limit.DB2_LARGEST_NEGATIVE_REAL)) )
+             ((v &lt; Limits.DB2_SMALLEST_REAL) || (v &gt; Limits.DB2_LARGEST_REAL)) ||
+             ((v &gt; 0) &amp;&amp; (v &lt; Limits.DB2_SMALLEST_POSITIVE_REAL)) ||
+             ((v &lt; 0) &amp;&amp; (v &gt; Limits.DB2_LARGEST_NEGATIVE_REAL)) )
         {
 			throw StandardException.newException(SQLState.LANG_OUTSIDE_RANGE_FOR_DATATYPE, TypeId.REAL_NAME);
         }
@@ -502,9 +502,9 @@
     {
         // can't just cast it to float and call normalizeFloat(float) since casting can round down to 0.0
         if ( (Double.isNaN(v) || Double.isInfinite(v)) ||
-             ((v &lt; DB2Limit.DB2_SMALLEST_REAL) || (v &gt; DB2Limit.DB2_LARGEST_REAL)) ||
-             ((v &gt; 0) &amp;&amp; (v &lt; DB2Limit.DB2_SMALLEST_POSITIVE_REAL)) ||
-             ((v &lt; 0) &amp;&amp; (v &gt; DB2Limit.DB2_LARGEST_NEGATIVE_REAL)) )
+             ((v &lt; Limits.DB2_SMALLEST_REAL) || (v &gt; Limits.DB2_LARGEST_REAL)) ||
+             ((v &gt; 0) &amp;&amp; (v &lt; Limits.DB2_SMALLEST_POSITIVE_REAL)) ||
+             ((v &lt; 0) &amp;&amp; (v &gt; Limits.DB2_LARGEST_NEGATIVE_REAL)) )
         {
 			throw StandardException.newException(SQLState.LANG_OUTSIDE_RANGE_FOR_DATATYPE, TypeId.REAL_NAME);
         }
@@ -522,9 +522,9 @@
     public static double normalizeDOUBLE(double v) throws StandardException
 	{
         if ( (Double.isNaN(v) || Double.isInfinite(v)) ||
-             ((v &lt; DB2Limit.DB2_SMALLEST_DOUBLE) || (v &gt; DB2Limit.DB2_LARGEST_DOUBLE)) ||
-             ((v &gt; 0) &amp;&amp; (v &lt; DB2Limit.DB2_SMALLEST_POSITIVE_DOUBLE)) ||
-             ((v &lt; 0) &amp;&amp; (v &gt; DB2Limit.DB2_LARGEST_NEGATIVE_DOUBLE)) )
+             ((v &lt; Limits.DB2_SMALLEST_DOUBLE) || (v &gt; Limits.DB2_LARGEST_DOUBLE)) ||
+             ((v &gt; 0) &amp;&amp; (v &lt; Limits.DB2_SMALLEST_POSITIVE_DOUBLE)) ||
+             ((v &lt; 0) &amp;&amp; (v &gt; Limits.DB2_LARGEST_NEGATIVE_DOUBLE)) )
         {
 			throw StandardException.newException(SQLState.LANG_OUTSIDE_RANGE_FOR_DATATYPE, TypeId.DOUBLE_NAME);
         }
Index: java/engine/org/apache/derby/iapi/reference/Limits.java
===================================================================
--- java/engine/org/apache/derby/iapi/reference/Limits.java	(revision 168097)
+++ java/engine/org/apache/derby/iapi/reference/Limits.java	(working copy)
@@ -1,6 +1,6 @@
 /*
 
-   Derby - Class org.apache.derby.iapi.reference.DB2Limit
+   Derby - Class org.apache.derby.iapi.reference.Limits
 
    Copyright 2004 The Apache Software Foundation or its licensors, as applicable.
 
@@ -20,11 +20,11 @@
 
 package org.apache.derby.iapi.reference;
 
-public interface DB2Limit
+public interface Limits
 {
 	/**
-     * Various fixed numbers related to DB2 limits.
-     */
+        * Various fixed Limits. DB2 related limits are prefixed with "DB2_".
+        */
 
 	public static final int DB2_MAX_TRIGGER_RECURSION = 16; /* Maximum nesting level for triggers */
 
@@ -53,13 +53,11 @@
 	// SQLCAMESSAGE procedure. See org.apache.derby.impl.sql.catalog.
 	public static final int DB2_JCC_MAX_EXCEPTION_PARAM_LENGTH = 2400;
 
-	/* Some identifiers like Constraint name, Cursor name, Function name, Index name, Trigger name
-	* are limited to 18 character in DB2*/
-	public static final int DB2_MAX_IDENTIFIER_LENGTH18 = 18;
-	/* Some identifiers like Column name, Schema name are limited to 30 characters in DB2*/
-	public static final int DB2_MAX_IDENTIFIER_LENGTH30 = 30;
-	/* Some identifiers like Savepoint names, Table names, view names etc are limited to 128 characters in DB2*/
-	public static final int DB2_MAX_IDENTIFIER_LENGTH128 = 128;
+        /* Identifiers (Constraint, Cursor, Function/Procedure, Index,
+         * Trigger, Column, Schema, Savepoint, Table and View names)
+         * are limited to 128 */ 
+        public static final int MAX_IDENTIFIER_LENGTH = 128;
+
 	public static final int	DB2_CHAR_MAXWIDTH = 254;
 	public static final int	DB2_VARCHAR_MAXWIDTH = 32672;
 	public static final int DB2_LOB_MAXWIDTH = 2147483647;
@@ -69,9 +67,9 @@
 	public static final int DB2_MAX_CHARACTER_LITERAL_LENGTH = 32672;
 	public static final int DB2_MAX_HEX_LITERAL_LENGTH = 16336;
 
-	public static final int MIN_COL_LENGTH_FOR_CURRENT_USER = 8;
-	public static final int MIN_COL_LENGTH_FOR_CURRENT_SCHEMA = 128;     
-	public static final int MAX_USERID_LENGTH = 30;
+	public static final int DB2_MIN_COL_LENGTH_FOR_CURRENT_USER = 8;
+	public static final int DB2_MIN_COL_LENGTH_FOR_CURRENT_SCHEMA = 128;     
+	public static final int DB2_MAX_USERID_LENGTH = 30;
 
     /**
      * DB2 TABLESPACE page size limits
@@ -83,9 +81,9 @@
      * DECIMAL type limits
      */
 
-	public static final int MAX_DECIMAL_PRECISION_SCALE = 31;
-	public static final int DEFAULT_DECIMAL_PRECISION   = 5;
-	public static final int DEFAULT_DECIMAL_SCALE       = 0;
+	public static final int DB2_MAX_DECIMAL_PRECISION_SCALE = 31;
+	public static final int DB2_DEFAULT_DECIMAL_PRECISION   = 5;
+	public static final int DB2_DEFAULT_DECIMAL_SCALE       = 0;
 
     /**
      * REAL/DOUBLE range limits
Index: java/engine/org/apache/derby/iapi/reference/DB2Limit.java
===================================================================
--- java/engine/org/apache/derby/iapi/reference/DB2Limit.java	(revision 170002)
+++ java/engine/org/apache/derby/iapi/reference/DB2Limit.java	(working copy)
@@ -1,105 +0,0 @@
-/*
-
-   Derby - Class org.apache.derby.iapi.reference.DB2Limit
-
-   Copyright 2004 The Apache Software Foundation or its licensors, as applicable.
-
-   Licensed under the Apache License, Version 2.0 (the "License");
-   you may not use this file except in compliance with the License.
-   You may obtain a copy of the License at
-
-      <a class="moz-txt-link-freetext" href="http://www.apache.org/licenses/LICENSE-2.0">http://www.apache.org/licenses/LICENSE-2.0</a>
-
-   Unless required by applicable law or agreed to in writing, software
-   distributed under the License is distributed on an "AS IS" BASIS,
-   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-   See the License for the specific language governing permissions and
-   limitations under the License.
-
- */
-
-package org.apache.derby.iapi.reference;
-
-public interface DB2Limit
-{
-	/**
-     * Various fixed numbers related to DB2 limits.
-     */
-
-	public static final int DB2_MAX_TRIGGER_RECURSION = 16; /* Maximum nesting level for triggers */
-
-	/** Maximum number of indexes on a table */
-	public static final int DB2_MAX_INDEXES_ON_TABLE = 32767;
-	/* Maximum number of columns in a table */
-	public static final int DB2_MAX_COLUMNS_IN_TABLE = 1012;
-
-	/* Maximum number of columns in a view */
-	public static final int DB2_MAX_COLUMNS_IN_VIEW = 5000;
-
-	/* Maximum number of parameters in a stored procedure */
-	public static final int DB2_MAX_PARAMS_IN_STORED_PROCEDURE = 90;
-
-	/* Maximum number of elements in a select list */
-	public static final int DB2_MAX_ELEMENTS_IN_SELECT_LIST = 1012;
-	/* Maximum number of columns in a group by list */
-	public static final int DB2_MAX_ELEMENTS_IN_GROUP_BY = 32677;
-	/* Maximum number of columns in an order by list */
-	public static final int DB2_MAX_ELEMENTS_IN_ORDER_BY = 1012;
-
-	// Max length for an exception parameter string over CCC server.
-	public static final int DB2_CCC_MAX_EXCEPTION_PARAM_LENGTH = 70;
-
-	// Warning. Changing this value will affect upgrade and the creation of the
-	// SQLCAMESSAGE procedure. See org.apache.derby.impl.sql.catalog.
-	public static final int DB2_JCC_MAX_EXCEPTION_PARAM_LENGTH = 2400;
-
-	/* Some identifiers like Constraint name, Cursor name, Function name, Index name, Trigger name
-	* are limited to 18 character in DB2*/
-	public static final int DB2_MAX_IDENTIFIER_LENGTH18 = 18;
-	/* Some identifiers like Column name, Schema name are limited to 30 characters in DB2*/
-	public static final int DB2_MAX_IDENTIFIER_LENGTH30 = 30;
-	/* Some identifiers like Savepoint names, Table names, view names etc are limited to 128 characters in DB2*/
-	public static final int DB2_MAX_IDENTIFIER_LENGTH128 = 128;
-	public static final int	DB2_CHAR_MAXWIDTH = 254;
-	public static final int	DB2_VARCHAR_MAXWIDTH = 32672;
-	public static final int DB2_LOB_MAXWIDTH = 2147483647;
-	public static final int	DB2_LONGVARCHAR_MAXWIDTH = 32700;
-    public static final int DB2_CONCAT_VARCHAR_LENGTH = 4000;
-	public static final int DB2_MAX_FLOATINGPOINT_LITERAL_LENGTH = 30; // note, this value 30 is also contained in err msg 42820
-	public static final int DB2_MAX_CHARACTER_LITERAL_LENGTH = 32672;
-	public static final int DB2_MAX_HEX_LITERAL_LENGTH = 16336;
-
-	public static final int MIN_COL_LENGTH_FOR_CURRENT_USER = 8;
-	public static final int MIN_COL_LENGTH_FOR_CURRENT_SCHEMA = 128;     
-	public static final int MAX_USERID_LENGTH = 30;
-
-    /**
-     * DB2 TABLESPACE page size limits
-     */
-    public static final int DB2_MIN_PAGE_SIZE = 4096;   //  4k
-    public static final int DB2_MAX_PAGE_SIZE = 32768;  // 32k
-
-    /**
-     * DECIMAL type limits
-     */
-
-	public static final int MAX_DECIMAL_PRECISION_SCALE = 31;
-	public static final int DEFAULT_DECIMAL_PRECISION   = 5;
-	public static final int DEFAULT_DECIMAL_SCALE       = 0;
-
-    /**
-     * REAL/DOUBLE range limits
-     */
-
-    static final float DB2_SMALLEST_REAL = -3.402E+38f;
-    static final float DB2_LARGEST_REAL  = +3.402E+38f;
-    static final float DB2_SMALLEST_POSITIVE_REAL = +1.175E-37f;
-    static final float DB2_LARGEST_NEGATIVE_REAL  = -1.175E-37f;
-
-    static final double DB2_SMALLEST_DOUBLE = -1.79769E+308d;
-    static final double DB2_LARGEST_DOUBLE  = +1.79769E+308d;
-    static final double DB2_SMALLEST_POSITIVE_DOUBLE = +2.225E-307d;
-    static final double DB2_LARGEST_NEGATIVE_DOUBLE  = -2.225E-307d;
-
-    
-}
Index: java/engine/org/apache/derby/diag/ErrorMessages.java
===================================================================
--- java/engine/org/apache/derby/diag/ErrorMessages.java	(revision 170002)
+++ java/engine/org/apache/derby/diag/ErrorMessages.java	(working copy)
@@ -35,7 +35,7 @@
 import org.apache.derby.iapi.error.StandardException;
 import org.apache.derby.iapi.error.ExceptionSeverity;
 import org.apache.derby.iapi.services.i18n.MessageService;
-import org.apache.derby.iapi.reference.DB2Limit;
+import org.apache.derby.iapi.reference.Limits;
 import org.apache.derby.iapi.util.StringUtil;
 
 import org.apache.derby.vti.VTITemplate;
@@ -113,7 +113,7 @@
 		if (retCode) {
 		  SQLState =StandardException.getSQLStateFromIdentifier(k);
 		  message = MessageService.getTextMessage(k);
-		  message = StringUtil.truncate(message, DB2Limit.DB2_VARCHAR_MAXWIDTH);
+		  message = StringUtil.truncate(message, Limits.DB2_VARCHAR_MAXWIDTH);
 		}
 		return retCode;
 	}
@@ -228,7 +228,7 @@
 	private static final ResultColumnDescriptor[] columnInfo = {
 
 		EmbedResultSetMetaData.getResultColumnDescriptor("SQL_STATE",  Types.VARCHAR, true, 5),
-		EmbedResultSetMetaData.getResultColumnDescriptor("MESSAGE",    Types.VARCHAR, true, DB2Limit.DB2_VARCHAR_MAXWIDTH),
+		EmbedResultSetMetaData.getResultColumnDescriptor("MESSAGE",    Types.VARCHAR, true, Limits.DB2_VARCHAR_MAXWIDTH),
 		EmbedResultSetMetaData.getResultColumnDescriptor("SEVERITY",   Types.INTEGER, true),
 	};
 	
Index: java/engine/org/apache/derby/diag/StatementCache.java
===================================================================
--- java/engine/org/apache/derby/diag/StatementCache.java	(revision 170002)
+++ java/engine/org/apache/derby/diag/StatementCache.java	(working copy)
@@ -29,7 +29,7 @@
 
 import org.apache.derby.iapi.sql.ResultColumnDescriptor;
 import org.apache.derby.impl.jdbc.EmbedResultSetMetaData;
-import org.apache.derby.iapi.reference.DB2Limit;
+import org.apache.derby.iapi.reference.Limits;
 import org.apache.derby.iapi.util.StringUtil;
 
 import java.sql.Types;
@@ -147,7 +147,7 @@
 			return ((GenericStatement) currentPs.statement).getCompilationSchema();
 		case 3:
 			String sql = currentPs.getSource();
-			sql = StringUtil.truncate(sql, DB2Limit.DB2_VARCHAR_MAXWIDTH);
+			sql = StringUtil.truncate(sql, Limits.DB2_VARCHAR_MAXWIDTH);
 			return sql;
 		default:
 			return null;
@@ -184,7 +184,7 @@
 
 		EmbedResultSetMetaData.getResultColumnDescriptor("ID",		  Types.CHAR, false, 36),
 		EmbedResultSetMetaData.getResultColumnDescriptor("SCHEMANAME",    Types.VARCHAR, true, 128),
-		EmbedResultSetMetaData.getResultColumnDescriptor("SQL_TEXT",  Types.VARCHAR, false, DB2Limit.DB2_VARCHAR_MAXWIDTH),
+		EmbedResultSetMetaData.getResultColumnDescriptor("SQL_TEXT",  Types.VARCHAR, false, Limits.DB2_VARCHAR_MAXWIDTH),
 		EmbedResultSetMetaData.getResultColumnDescriptor("UNICODE",   Types.BIT, false),
 		EmbedResultSetMetaData.getResultColumnDescriptor("VALID",  Types.BIT, false),
 		EmbedResultSetMetaData.getResultColumnDescriptor("COMPILED_AT",  Types.TIMESTAMP, true),
Index: java/engine/org/apache/derby/diag/StatementDuration.java
===================================================================
--- java/engine/org/apache/derby/diag/StatementDuration.java	(revision 170002)
+++ java/engine/org/apache/derby/diag/StatementDuration.java	(working copy)
@@ -36,7 +36,7 @@
 import org.apache.derby.vti.VTITemplate;
 import org.apache.derby.iapi.sql.ResultColumnDescriptor;
 import org.apache.derby.impl.jdbc.EmbedResultSetMetaData;
-import org.apache.derby.iapi.reference.DB2Limit;
+import org.apache.derby.iapi.reference.Limits;
 import org.apache.derby.iapi.util.StringUtil;
 
 /**
@@ -306,7 +306,7 @@
 				}
 				}
 
-				output = StringUtil.truncate(output, DB2Limit.DB2_VARCHAR_MAXWIDTH);
+				output = StringUtil.truncate(output, Limits.DB2_VARCHAR_MAXWIDTH);
 
 
 				return output;
@@ -334,7 +334,7 @@
 		EmbedResultSetMetaData.getResultColumnDescriptor("THREADID",  Types.VARCHAR, false, 80),
 		EmbedResultSetMetaData.getResultColumnDescriptor("XID",       Types.VARCHAR, false, 15),
 		EmbedResultSetMetaData.getResultColumnDescriptor("LCCID",     Types.VARCHAR, false, 10),
-		EmbedResultSetMetaData.getResultColumnDescriptor("LOGTEXT",   Types.VARCHAR, true, DB2Limit.DB2_VARCHAR_MAXWIDTH),
+		EmbedResultSetMetaData.getResultColumnDescriptor("LOGTEXT",   Types.VARCHAR, true, Limits.DB2_VARCHAR_MAXWIDTH),
 		EmbedResultSetMetaData.getResultColumnDescriptor("DURATION",  Types.VARCHAR, false, 10),
 	};
 	
Index: java/engine/org/apache/derby/diag/TransactionTable.java
===================================================================
--- java/engine/org/apache/derby/diag/TransactionTable.java	(revision 170002)
+++ java/engine/org/apache/derby/diag/TransactionTable.java	(working copy)
@@ -35,7 +35,7 @@
 import org.apache.derby.iapi.sql.ResultColumnDescriptor;
 import org.apache.derby.impl.jdbc.EmbedResultSetMetaData;
 
-import org.apache.derby.iapi.reference.DB2Limit;
+import org.apache.derby.iapi.reference.Limits;
 import org.apache.derby.iapi.util.StringUtil;
 
 import java.sql.ResultSetMetaData;
@@ -175,7 +175,7 @@
 		case 7:
 
 			str = info.getStatementTextString();
-			str = StringUtil.truncate(str, DB2Limit.DB2_VARCHAR_MAXWIDTH);
+			str = StringUtil.truncate(str, Limits.DB2_VARCHAR_MAXWIDTH);
 			break;
 
 		default:
@@ -235,7 +235,7 @@
 		EmbedResultSetMetaData.getResultColumnDescriptor("TYPE",          Types.VARCHAR, false, 30),
 		EmbedResultSetMetaData.getResultColumnDescriptor("STATUS",        Types.VARCHAR, false, 8),
 		EmbedResultSetMetaData.getResultColumnDescriptor("FIRST_INSTANT", Types.VARCHAR, true,  20),
-		EmbedResultSetMetaData.getResultColumnDescriptor("SQL_TEXT",      Types.VARCHAR, true,  DB2Limit.DB2_VARCHAR_MAXWIDTH),
+		EmbedResultSetMetaData.getResultColumnDescriptor("SQL_TEXT",      Types.VARCHAR, true,  Limits.DB2_VARCHAR_MAXWIDTH),
 	};
 	
 	private static final ResultSetMetaData metadata = new EmbedResultSetMetaData(columnInfo);
Index: java/engine/org/apache/derby/diag/ErrorLogReader.java
===================================================================
--- java/engine/org/apache/derby/diag/ErrorLogReader.java	(revision 170002)
+++ java/engine/org/apache/derby/diag/ErrorLogReader.java	(working copy)
@@ -33,7 +33,7 @@
 import java.sql.SQLException;
 import java.sql.Types;
 import org.apache.derby.vti.VTITemplate;
-import org.apache.derby.iapi.reference.DB2Limit;
+import org.apache.derby.iapi.reference.Limits;
 import org.apache.derby.iapi.util.StringUtil;
 
 import org.apache.derby.iapi.sql.ResultColumnDescriptor;
@@ -294,7 +294,7 @@
 				}
 				}
 
-				output = StringUtil.truncate(output, DB2Limit.DB2_VARCHAR_MAXWIDTH);
+				output = StringUtil.truncate(output, Limits.DB2_VARCHAR_MAXWIDTH);
 
 				return output;
 
@@ -329,7 +329,7 @@
 		EmbedResultSetMetaData.getResultColumnDescriptor("LCCID", Types.VARCHAR, false, 15),
 		EmbedResultSetMetaData.getResultColumnDescriptor("DATABASE", Types.VARCHAR, false, 128),
 		EmbedResultSetMetaData.getResultColumnDescriptor("DRDAID", Types.VARCHAR, true, 50),
-		EmbedResultSetMetaData.getResultColumnDescriptor("LOGTEXT",Types.VARCHAR, false, DB2Limit.DB2_VARCHAR_MAXWIDTH)
+		EmbedResultSetMetaData.getResultColumnDescriptor("LOGTEXT",Types.VARCHAR, false, Limits.DB2_VARCHAR_MAXWIDTH)
 	};
 	private static final ResultSetMetaData metadata = new EmbedResultSetMetaData(columnInfo);
 
Index: java/drda/org/apache/derby/impl/drda/FdocaConstants.java
===================================================================
--- java/drda/org/apache/derby/impl/drda/FdocaConstants.java	(revision 170002)
+++ java/drda/org/apache/derby/impl/drda/FdocaConstants.java	(working copy)
@@ -22,7 +22,7 @@
 import java.sql.Types;
 import org.apache.derby.iapi.reference.JDBC30Translation;
 import java.sql.SQLException;
-import org.apache.derby.iapi.reference.DB2Limit;
+import org.apache.derby.iapi.reference.Limits;
 
 class FdocaConstants
 {
@@ -240,8 +240,8 @@
 	// their toString() method and their limit is 64K as well.
 	// BUT, that said, we ultimately have to match DB2's limit,
 	// so just use that...
-	protected static int LONGVARCHAR_MAX_LEN = DB2Limit.DB2_LONGVARCHAR_MAXWIDTH;
-	protected static int LONGVARBINARY_MAX_LEN = DB2Limit.DB2_LONGVARCHAR_MAXWIDTH;
+	protected static int LONGVARCHAR_MAX_LEN = Limits.DB2_LONGVARCHAR_MAXWIDTH;
+	protected static int LONGVARBINARY_MAX_LEN = Limits.DB2_LONGVARCHAR_MAXWIDTH;
 	protected static int LONGVARCHAR_LEN_NUMBYTES = 2;
 
 	// JCC  only supports a max precision of 31 like DB2
Index: java/drda/org/apache/derby/impl/drda/AppRequester.java
===================================================================
--- java/drda/org/apache/derby/impl/drda/AppRequester.java	(revision 170002)
+++ java/drda/org/apache/derby/impl/drda/AppRequester.java	(working copy)
@@ -20,7 +20,7 @@
 
 package org.apache.derby.impl.drda;
 import org.apache.derby.iapi.services.sanity.SanityManager;
-import org.apache.derby.iapi.reference.DB2Limit;
+import org.apache.derby.iapi.reference.Limits;
 
 /**
 	AppRequester stores information about the application requester.
@@ -232,12 +232,12 @@
 
 			case JCC_CLIENT:
 			case DNC_CLIENT:
-				return DB2Limit.DB2_JCC_MAX_EXCEPTION_PARAM_LENGTH;
+				return Limits.DB2_JCC_MAX_EXCEPTION_PARAM_LENGTH;
 			default:
 			// Default is the max for C clients, since that is more
 			// restricted than for JCC clients.  Note, though, that
 			// JCC clients are the only ones supported right now.
-				return DB2Limit.DB2_CCC_MAX_EXCEPTION_PARAM_LENGTH;
+				return Limits.DB2_CCC_MAX_EXCEPTION_PARAM_LENGTH;
 
 		}
 
Index: java/testing/org/apache/derbyTesting/functionTests/tests/lang/identifier.sql
===================================================================
--- java/testing/org/apache/derbyTesting/functionTests/tests/lang/identifier.sql	(revision 170002)
+++ java/testing/org/apache/derbyTesting/functionTests/tests/lang/identifier.sql	(working copy)
@@ -61,15 +61,45 @@
 select c1, "c1 ", " C1", " C1 ", "  C1  "  from success1;
 
 -- negative test for max identifier width
--- 4567890123456789012345678901234567890123456789012345678901234567890
+-- NOTE: no negative test for max identifier length of function, savepoint and cursor
+-- tables needed for index, trigger and view test
+create table idtest1 (i integer, j integer);
+create table idtest2 (i integer, j integer);
+-- table
+
 create table
 asdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfaslast6
 (c1 int);
 create table
 "asdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfaslast7"
 (c1 int);
+-- column
+create table fail1 (ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccx integer);
+create table fail2 ("ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccx" integer);
+-- view
+create view vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvx as select * from idtest1;
+create view "vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvy" as select * from idtest1;
+-- trigger
+create trigger ttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttx after insert on idtest1 for each row mode db2sql update idtest2 set i=i;
+create trigger "ttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttx" after insert on idtest1 for each row mode db2sql update idtest2 set i=i;
+-- schema
+create schema ssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssx;
+create schema "ssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssx";
+-- index
+CREATE INDEX iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiix 
+ON idtest1 (i);
+CREATE INDEX "iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiix" 
+ON idtest1 (j);
+-- constraint
+create table fail3 (i integer, constraint ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccx check (i &gt; 0));
+create table fail4 (i integer, constraint "ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccx" check (i &gt; 0));
+--- procedure
+create procedure ppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppx(in i integer) external name 'a.b.c.d' language java parameter style java;
+create procedure "ppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppx"(in i integer) external name 'a.b.c.d' language java parameter style java;
 
 -- positive test for max identifier width
+-- NOTE: no positive test for max identifier length of function, savepoint and cursor
+-- table
 create table
 asdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfaslast
 (c1 int);
@@ -87,16 +117,55 @@
 values (2);
 select * from 
 "delimitedsdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfaslast";
+-- column
+create table longid1 (cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc integer);
+create table longid2 ("cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc" integer);
+-- view
+create view vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv as select * from idtest1;
+create view "vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvw" as select * from idtest1;
+-- trigger
+create trigger tttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttt after insert on idtest1 for each row mode db2sql update idtest2 set i=i;
+create trigger "tttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttt" after insert on idtest1 for each row mode db2sql update idtest2 set i=i;
+-- schema
+create schema ssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssss;
+create schema "ssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssss";
+-- index
+CREATE INDEX iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii 
+ON idtest1 (i);
+CREATE INDEX "iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii" 
+ON idtest1 (j);
+-- constraint
+create table longid3 (i integer, constraint cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc check (i &gt; 0));
+create table longid4 (i integer, constraint "cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc" check (i &gt; 0));
+--- procedure
+create procedure pppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppp(in i integer) external name 'a.b.c.d' language java parameter style java;
+create procedure "pppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppp"(in i integer) external name 'a.b.c.d' language java parameter style java;
 
--- drop the tables
+-- drop the tables etc.
+drop view vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv;
+drop view "vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvw";
+drop trigger tttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttt;
+drop trigger "tttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttt";
+drop schema ssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssss restrict;
+drop schema "ssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssss" restrict;
+drop index iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii;
+drop index "iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii";
 drop table success1;
 drop table success2;
 drop table success3;
 drop table success4;
+drop table idtest1;
+drop table idtest2;
+drop table longid1;
+drop table longid2;
+drop table longid3;
+drop table longid4;
 drop table
 asdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfaslast;
 drop table
 "delimitedsdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfaslast";
+drop procedure pppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppp;
+drop procedure "pppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppp";
 
 
 -- 2003-04-14 14:04:38 
Index: java/testing/org/apache/derbyTesting/functionTests/tests/lang/currentSchema.sql
===================================================================
--- java/testing/org/apache/derbyTesting/functionTests/tests/lang/currentSchema.sql	(revision 170002)
+++ java/testing/org/apache/derbyTesting/functionTests/tests/lang/currentSchema.sql	(working copy)
@@ -170,18 +170,18 @@
 
 values current schema;
 
--- the following should fail - 31 length
-create schema t234567890123456789012345678901;
+-- the following should fail - 129 length
+create schema TTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTT;
 
-set schema t234567890123456789012345678901;
+set schema TTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTT;
 
-set schema 'T234567890123456789012345678901';
+set schema 'TTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTT';
 
-execute p1 using 'values(''T234567890123456789012345678901'')';
+execute p1 using 'values(''TTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTT'')';
 
 rollback;
 autocommit on;
 
 -- clean up
 drop schema judy restrict;
-drop schema t234567890123456789012345678901 restrict;
+drop schema TTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTT restrict;
Index: java/testing/org/apache/derbyTesting/functionTests/tests/lang/dbManagerLimits.java
===================================================================
--- java/testing/org/apache/derbyTesting/functionTests/tests/lang/dbManagerLimits.java	(revision 170002)
+++ java/testing/org/apache/derbyTesting/functionTests/tests/lang/dbManagerLimits.java	(working copy)
@@ -23,7 +23,7 @@
 import java.sql.*;
 
 import org.apache.derby.tools.ij;
-import org.apache.derby.iapi.reference.DB2Limit;
+import org.apache.derby.iapi.reference.Limits;
 import org.apache.derbyTesting.functionTests.util.Formatters;
 
 /**
@@ -206,7 +206,7 @@
 			String tempString = new String();
 			int i = 0;
 			sbTableElements.append("create table t1 (");
-			for (i = 0; i &lt; DB2Limit.DB2_MAX_COLUMNS_IN_TABLE-2; i++)
+			for (i = 0; i &lt; Limits.DB2_MAX_COLUMNS_IN_TABLE-2; i++)
 				sbTableElements.append("c" + i +" int, ");
 
 			Statement s = conn.createStatement();
@@ -296,7 +296,7 @@
 			StringBuffer sbViewColumnNames = new StringBuffer();
 			String tempString = new String();
 			int i = 0;
-			for (i = 0; i &lt; DB2Limit.DB2_MAX_COLUMNS_IN_VIEW-2; i++) {
+			for (i = 0; i &lt; Limits.DB2_MAX_COLUMNS_IN_VIEW-2; i++) {
 				sbValuesClause.append(1 + ", ");
 				sbViewColumnNames.append("c" + i + ", ");
 			}
@@ -355,7 +355,7 @@
 			String tempString = new String();
 			int i = 0;
 			sb.append("create table t1 (");
-			for (i = 0; i &lt; DB2Limit.DB2_MAX_COLUMNS_IN_TABLE-2; i++)
+			for (i = 0; i &lt; Limits.DB2_MAX_COLUMNS_IN_TABLE-2; i++)
 				sb.append("c" + i +" int, <a class="moz-txt-link-rfc2396E" href="mailto:);Statements=conn.createStatement();@@-408,7+408,7@@StringtempString=newString();inti=0;sbOrderBy.append(">");
 
 			Statement s = conn.createStatement();
@@ -408,7 +408,7 @@
 			String tempString = new String();
 			int i = 0;
 			sbOrderBy.append("</a>select * from t1 order by ");
-			for (i = 0; i &lt; DB2Limit.DB2_MAX_ELEMENTS_IN_ORDER_BY-2; i++)
+			for (i = 0; i &lt; Limits.DB2_MAX_ELEMENTS_IN_ORDER_BY-2; i++)
 				sbOrderBy.append("c1, ");
 
 			Statement s = conn.createStatement();
@@ -467,11 +467,11 @@
 
 			//first create 7 views with 5000 columns each
 			int i = 0;
-			for (i = 0; i &lt; DB2Limit.DB2_MAX_COLUMNS_IN_VIEW-1; i++)
+			for (i = 0; i &lt; Limits.DB2_MAX_COLUMNS_IN_VIEW-1; i++)
 				sbValuesClause.append(1 + ", ");
 
 			for (int j = 1; j &lt; 8; j++) {
-				for (i = 0; i &lt; DB2Limit.DB2_MAX_COLUMNS_IN_VIEW-1; i++) {
+				for (i = 0; i &lt; Limits.DB2_MAX_COLUMNS_IN_VIEW-1; i++) {
 					sbViewColumnNames.append("c" + j + "" + i + ", ");
 				}
 				tempString = "create view v" + j + "(" + sbViewColumnNames.toString() + "c" + j + "" + i + ") as values (" + sbValuesClause.toString() + "1)";
@@ -480,7 +480,7 @@
 			}
       
 			for (int j = 1; j &lt; 7; j++) {
-				for (i = 0; i &lt; DB2Limit.DB2_MAX_COLUMNS_IN_VIEW; i++)
+				for (i = 0; i &lt; Limits.DB2_MAX_COLUMNS_IN_VIEW; i++)
 					sbGroupBy.append("c" + j + "" + i + ", ");
 			}
 			for (i = 0; i &lt; 2675; i++)
@@ -533,7 +533,7 @@
 			String tempString = new String();
 			int i = 0;
 
-			for (i = 0; i &lt; DB2Limit.DB2_MAX_PARAMS_IN_STORED_PROCEDURE-2; i++) {
+			for (i = 0; i &lt; Limits.DB2_MAX_PARAMS_IN_STORED_PROCEDURE-2; i++) {
 				sbCreateProcParams.append("i" + i + " int, ");
 				sbExecuteProcParams.append("1, ");
 			}
@@ -584,7 +584,7 @@
 
 			s.executeUpdate("create table t1 (c1 int not null, c2 int, primary key(c1))");
 			System.out.println("First create one index less than maximum allowed number of indexes");
-			for (i = 0; i &lt; DB2Limit.DB2_MAX_INDEXES_ON_TABLE-2; i++) {
+			for (i = 0; i &lt; Limits.DB2_MAX_INDEXES_ON_TABLE-2; i++) {
 				s.executeUpdate("create index i" + i + " on t1(c1,c2)");
 			System.out.println("   create index" + i);
 			}
Index: java/testing/org/apache/derbyTesting/functionTests/tests/store/streamingColumn.java
===================================================================
--- java/testing/org/apache/derbyTesting/functionTests/tests/store/streamingColumn.java	(revision 170002)
+++ java/testing/org/apache/derbyTesting/functionTests/tests/store/streamingColumn.java	(working copy)
@@ -32,7 +32,7 @@
 import org.apache.derby.tools.JDBCDisplayUtil;
 import org.apache.derbyTesting.functionTests.util.Formatters;
 import org.apache.derbyTesting.functionTests.util.TestUtil;
-import org.apache.derby.iapi.reference.DB2Limit;
+import org.apache.derby.iapi.reference.Limits;
 import java.io.*;
 import java.sql.CallableStatement;
 import java.sql.PreparedStatement;
@@ -167,8 +167,8 @@
 					System.out.println("No truncation and hence no error");
 				}
 				catch (SQLException e) {
-					if (fileLength[i] &gt; DB2Limit.DB2_LONGVARCHAR_MAXWIDTH &amp;&amp; e.getSQLState().equals("22001")) //was getting data longer than maxValueAllowed
-						System.out.println("expected exception for data &gt; " + DB2Limit.DB2_LONGVARCHAR_MAXWIDTH + " in length");
+					if (fileLength[i] &gt; Limits.DB2_LONGVARCHAR_MAXWIDTH &amp;&amp; e.getSQLState().equals("22001")) //was getting data longer than maxValueAllowed
+						System.out.println("expected exception for data &gt; " + Limits.DB2_LONGVARCHAR_MAXWIDTH + " in length");
 					else
 						dumpSQLExceptions(e);
 				}
@@ -941,8 +941,8 @@
 					System.out.println("No truncation and hence no error");
 				}
 				catch (SQLException e) {
-					if (fileLength[i] &gt; DB2Limit.DB2_LONGVARCHAR_MAXWIDTH &amp;&amp; e.getSQLState().equals("22001")) //was getting data longer than maxValueAllowed
-						System.out.println("expected exception for data &gt; " + DB2Limit.DB2_LONGVARCHAR_MAXWIDTH + " in length");
+					if (fileLength[i] &gt; Limits.DB2_LONGVARCHAR_MAXWIDTH &amp;&amp; e.getSQLState().equals("22001")) //was getting data longer than maxValueAllowed
+						System.out.println("expected exception for data &gt; " + Limits.DB2_LONGVARCHAR_MAXWIDTH + " in length");
 					else
 						dumpSQLExceptions(e);
 				}
@@ -1067,24 +1067,24 @@
 
 			// prepare an InputStream from the file which has 3 trailing blanks in the end, so after blank truncation, there won't be any overflow
 			// try this using setAsciiStream, setCharacterStream, setString and setObject
-			insertDataUsingAsciiStream(ps, 1, fileName1, DB2Limit.DB2_VARCHAR_MAXWIDTH);
-			insertDataUsingCharacterStream(ps, 2, fileName1, DB2Limit.DB2_VARCHAR_MAXWIDTH);
-			insertDataUsingStringOrObject(ps, 3, DB2Limit.DB2_VARCHAR_MAXWIDTH, true, true);
-			insertDataUsingStringOrObject(ps, 4, DB2Limit.DB2_VARCHAR_MAXWIDTH, true, false);
+			insertDataUsingAsciiStream(ps, 1, fileName1, Limits.DB2_VARCHAR_MAXWIDTH);
+			insertDataUsingCharacterStream(ps, 2, fileName1, Limits.DB2_VARCHAR_MAXWIDTH);
+			insertDataUsingStringOrObject(ps, 3, Limits.DB2_VARCHAR_MAXWIDTH, true, true);
+			insertDataUsingStringOrObject(ps, 4, Limits.DB2_VARCHAR_MAXWIDTH, true, false);
 			System.out.println("===&gt; testing trailing blanks using concatenation");
-			insertDataUsingConcat(stmt, 5, DB2Limit.DB2_VARCHAR_MAXWIDTH, true, false);
+			insertDataUsingConcat(stmt, 5, Limits.DB2_VARCHAR_MAXWIDTH, true, false);
 
 			// prepare an InputStream from the file which has 3 trailing non-blanks in the end, and hence there would be overflow exception
 			// try this using setAsciiStream, setCharacterStream, setString and setObject
-			insertDataUsingAsciiStream(ps, 6, fileName2, DB2Limit.DB2_VARCHAR_MAXWIDTH);
-			insertDataUsingCharacterStream(ps, 7, fileName2, DB2Limit.DB2_VARCHAR_MAXWIDTH);
-			insertDataUsingStringOrObject(ps, 8, DB2Limit.DB2_VARCHAR_MAXWIDTH, false, true);
-			insertDataUsingStringOrObject(ps, 9, DB2Limit.DB2_VARCHAR_MAXWIDTH, false, false);
+			insertDataUsingAsciiStream(ps, 6, fileName2, Limits.DB2_VARCHAR_MAXWIDTH);
+			insertDataUsingCharacterStream(ps, 7, fileName2, Limits.DB2_VARCHAR_MAXWIDTH);
+			insertDataUsingStringOrObject(ps, 8, Limits.DB2_VARCHAR_MAXWIDTH, false, true);
+			insertDataUsingStringOrObject(ps, 9, Limits.DB2_VARCHAR_MAXWIDTH, false, false);
 			System.out.println("===&gt; testing trailing non-blank characters using concatenation");
-			insertDataUsingConcat(stmt, 10, DB2Limit.DB2_VARCHAR_MAXWIDTH, false, false);
+			insertDataUsingConcat(stmt, 10, Limits.DB2_VARCHAR_MAXWIDTH, false, false);
 
 			rs = stmt.executeQuery("select a, b from testVarChar");
-			streamTestDataVerification(rs, DB2Limit.DB2_VARCHAR_MAXWIDTH);
+			streamTestDataVerification(rs, Limits.DB2_VARCHAR_MAXWIDTH);
     }
 		catch (SQLException e) {
 			dumpSQLExceptions(e);
@@ -1114,26 +1114,26 @@
 
 			// prepare an InputStream from the file which has 3 trailing blanks in the end. For long varchar, this would throw a truncation error
 			// try this using setAsciiStream, setCharacterStream, setString and setObject
-			insertDataUsingAsciiStream(ps, 1, fileName1, DB2Limit.DB2_LONGVARCHAR_MAXWIDTH);
-			insertDataUsingCharacterStream(ps, 2, fileName1, DB2Limit.DB2_LONGVARCHAR_MAXWIDTH);
-			insertDataUsingStringOrObject(ps, 3, DB2Limit.DB2_LONGVARCHAR_MAXWIDTH, true, true);
-			insertDataUsingStringOrObject(ps, 4, DB2Limit.DB2_LONGVARCHAR_MAXWIDTH, true, false);
+			insertDataUsingAsciiStream(ps, 1, fileName1, Limits.DB2_LONGVARCHAR_MAXWIDTH);
+			insertDataUsingCharacterStream(ps, 2, fileName1, Limits.DB2_LONGVARCHAR_MAXWIDTH);
+			insertDataUsingStringOrObject(ps, 3, Limits.DB2_LONGVARCHAR_MAXWIDTH, true, true);
+			insertDataUsingStringOrObject(ps, 4, Limits.DB2_LONGVARCHAR_MAXWIDTH, true, false);
 			//bug 5600- Can't test data overflow in longvarchar using concatenation because longvarchar concatenated string can't be longer than 32700
 			//System.out.println("===&gt; testing trailing blanks using concatenation");
-			//insertDataUsingConcat(stmt, 5, DB2Limit.DB2_LONGVARCHAR_MAXWIDTH, true, true);
+			//insertDataUsingConcat(stmt, 5, Limits.DB2_LONGVARCHAR_MAXWIDTH, true, true);
 
 			// prepare an InputStream from the file which has 3 trailing non-blanks in the end, and hence there would be overflow exception
 			// try this using setAsciiStream, setCharacterStream, setString and setObject
-			insertDataUsingAsciiStream(ps, 6, fileName2, DB2Limit.DB2_LONGVARCHAR_MAXWIDTH);
-			insertDataUsingCharacterStream(ps, 7, fileName2, DB2Limit.DB2_LONGVARCHAR_MAXWIDTH);
-			insertDataUsingStringOrObject(ps, 7, DB2Limit.DB2_LONGVARCHAR_MAXWIDTH, false, true);
-			insertDataUsingStringOrObject(ps, 9, DB2Limit.DB2_LONGVARCHAR_MAXWIDTH, false, false);
+			insertDataUsingAsciiStream(ps, 6, fileName2, Limits.DB2_LONGVARCHAR_MAXWIDTH);
+			insertDataUsingCharacterStream(ps, 7, fileName2, Limits.DB2_LONGVARCHAR_MAXWIDTH);
+			insertDataUsingStringOrObject(ps, 7, Limits.DB2_LONGVARCHAR_MAXWIDTH, false, true);
+			insertDataUsingStringOrObject(ps, 9, Limits.DB2_LONGVARCHAR_MAXWIDTH, false, false);
 			//bug 5600 - Can't test data overflow in longvarchar using concatenation because longvarchar concatenated string can't be longer than 32700
 			//System.out.println("===&gt; testing trailing non-blank characters using concatenation");
-			//insertDataUsingConcat(stmt, 10, DB2Limit.DB2_LONGVARCHAR_MAXWIDTH, false, true);
+			//insertDataUsingConcat(stmt, 10, Limits.DB2_LONGVARCHAR_MAXWIDTH, false, true);
 
 			rs = stmt.executeQuery("select a, b from testLongVarChars");
-			streamTestDataVerification(rs, DB2Limit.DB2_LONGVARCHAR_MAXWIDTH);
+			streamTestDataVerification(rs, Limits.DB2_LONGVARCHAR_MAXWIDTH);
 		}
 		catch (SQLException e) {
 			dumpSQLExceptions(e);
Index: java/testing/org/apache/derbyTesting/functionTests/master/currentSchema.out
===================================================================
--- java/testing/org/apache/derbyTesting/functionTests/master/currentSchema.out	(revision 170002)
+++ java/testing/org/apache/derbyTesting/functionTests/master/currentSchema.out	(working copy)
@@ -305,20 +305,20 @@
 1                                                                                                                               
 --------------------------------------------------------------------------------------------------------------------------------
 T23456789012345678901234567890                                                                                                  
-ij&gt; -- the following should fail - 31 length
-create schema t234567890123456789012345678901;
-ERROR 42622: The name 'T234567890123456789012345678901' is too long. The maximum length is '30'.
-ij&gt; set schema t234567890123456789012345678901;
-ERROR 42622: The name 'T234567890123456789012345678901' is too long. The maximum length is '30'.
-ij&gt; set schema 'T234567890123456789012345678901';
-ERROR 42622: The name 'T234567890123456789012345678901' is too long. The maximum length is '30'.
-ij&gt; execute p1 using 'values(''T234567890123456789012345678901'')';
-ERROR 42Y07: Schema 'T234567890123456789012345678901' does not exist
+ij&gt; -- the following should fail - 129 length
+create schema TTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTT;
+ERROR 42622: The name 'TTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTT' is too long. The maximum length is '128'.
+ij&gt; set schema TTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTT;
+ERROR 42622: The name 'TTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTT' is too long. The maximum length is '128'.
+ij&gt; set schema 'TTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTT';
+ERROR 42622: The name 'TTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTT' is too long. The maximum length is '128'.
+ij&gt; execute p1 using 'values(''TTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTT'')';
+ERROR 42815: The replacement value for 'CURRENT SCHEMA' is invalid.
 ij&gt; rollback;
 ij&gt; autocommit on;
 ij&gt; -- clean up
 drop schema judy restrict;
 0 rows inserted/updated/deleted
-ij&gt; drop schema t234567890123456789012345678901 restrict;
-ERROR 42622: The name 'T234567890123456789012345678901' is too long. The maximum length is '30'.
+ij&gt; drop schema TTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTT restrict;
+ERROR 42622: The name 'TTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTT' is too long. The maximum length is '128'.
 ij&gt; 
Index: java/testing/org/apache/derbyTesting/functionTests/master/DerbyNet/dbMetaDataJdbc30.out
===================================================================
--- java/testing/org/apache/derbyTesting/functionTests/master/DerbyNet/dbMetaDataJdbc30.out	(revision 170002)
+++ java/testing/org/apache/derbyTesting/functionTests/master/DerbyNet/dbMetaDataJdbc30.out	(working copy)
@@ -14,9 +14,9 @@
 getDatabaseMajorVersion() : 10
 getDatabaseMinorVersion() : 1
 supportsStatementPooling() : false
-getMaxColumnNameLength() = 30
-getMaxCursorNameLength() = 18
-getMaxSchemaNameLength() = 30
+getMaxColumnNameLength() = 128
+getMaxCursorNameLength() = 128
+getMaxSchemaNameLength() = 128
 getMaxProcedureNameLength() = 128
 getMaxTableNameLength() = 128
 getMaxUserNameLength() = 30
Index: java/testing/org/apache/derbyTesting/functionTests/master/DerbyNet/metadata.out
===================================================================
--- java/testing/org/apache/derbyTesting/functionTests/master/DerbyNet/metadata.out	(revision 170002)
+++ java/testing/org/apache/derbyTesting/functionTests/master/DerbyNet/metadata.out	(working copy)
@@ -12,7 +12,7 @@
 JDBC Driver 'IBM DB2 JDBC Universal Driver Architecture', version (EXPECTED VERSION)
 The URL is: jdbc:derby:net://localhost:1527/wombat;create=true
 allTablesAreSelectable(): true
-maxColumnNameLength(): 30
+maxColumnNameLength(): 128
 getSchemas():
 TABLE_SCHEM[VARCHAR]
 APP
@@ -131,9 +131,9 @@
 getMaxColumnsInSelect(): 0
 getMaxColumnsInTable(): 0
 getMaxConnections(): 0
-getMaxCursorNameLength(): 18
+getMaxCursorNameLength(): 128
 getMaxIndexLength(): 0
-getMaxSchemaNameLength(): 30
+getMaxSchemaNameLength(): 128
 getMaxProcedureNameLength(): 128
 getMaxCatalogNameLength(): 0
 getMaxRowSize(): 0
Index: java/testing/org/apache/derbyTesting/functionTests/master/DerbyNet/odbc_metadata.out
===================================================================
--- java/testing/org/apache/derbyTesting/functionTests/master/DerbyNet/odbc_metadata.out	(revision 170002)
+++ java/testing/org/apache/derbyTesting/functionTests/master/DerbyNet/odbc_metadata.out	(working copy)
@@ -42,7 +42,7 @@
 JDBC Driver 'IBM DB2 JDBC Universal Driver Architecture', version (EXPECTED VERSION)
 The URL is: jdbc:derby:net://localhost:1527/wombat;create=true
 allTablesAreSelectable(): true
-maxColumnNameLength(): 30
+maxColumnNameLength(): 128
 getSchemas():
 TABLE_SCHEM[VARCHAR]
 APP
@@ -161,9 +161,9 @@
 getMaxColumnsInSelect(): 0
 getMaxColumnsInTable(): 0
 getMaxConnections(): 0
-getMaxCursorNameLength(): 18
+getMaxCursorNameLength(): 128
 getMaxIndexLength(): 0
-getMaxSchemaNameLength(): 30
+getMaxSchemaNameLength(): 128
 getMaxProcedureNameLength(): 128
 getMaxCatalogNameLength(): 0
 getMaxRowSize(): 0
Index: java/testing/org/apache/derbyTesting/functionTests/master/DerbyNetClient/dbMetaDataJdbc30.out
===================================================================
--- java/testing/org/apache/derbyTesting/functionTests/master/DerbyNetClient/dbMetaDataJdbc30.out	(revision 170002)
+++ java/testing/org/apache/derbyTesting/functionTests/master/DerbyNetClient/dbMetaDataJdbc30.out	(working copy)
@@ -14,9 +14,9 @@
 getDatabaseMajorVersion() : 10
 getDatabaseMinorVersion() : 1
 supportsStatementPooling() : false
-getMaxColumnNameLength() = 30
-getMaxCursorNameLength() = 18
-getMaxSchemaNameLength() = 30
+getMaxColumnNameLength() = 128
+getMaxCursorNameLength() = 128
+getMaxSchemaNameLength() = 128
 getMaxProcedureNameLength() = 128
 getMaxTableNameLength() = 128
 getMaxUserNameLength() = 30
Index: java/testing/org/apache/derbyTesting/functionTests/master/DerbyNetClient/metadata.out
===================================================================
--- java/testing/org/apache/derbyTesting/functionTests/master/DerbyNetClient/metadata.out	(revision 170002)
+++ java/testing/org/apache/derbyTesting/functionTests/master/DerbyNetClient/metadata.out	(working copy)
@@ -12,7 +12,7 @@
 JDBC Driver 'Apache Derby Network Client JDBC Driver', version 10.1 (10.1.0.0 alpha)
 The URL is: jdbc:derby://localhost:1527/wombat;create=true
 allTablesAreSelectable(): true
-maxColumnNameLength(): 30
+maxColumnNameLength(): 128
 getSchemas():
 TABLE_SCHEM[VARCHAR]
 APP
@@ -131,9 +131,9 @@
 getMaxColumnsInSelect(): 0
 getMaxColumnsInTable(): 0
 getMaxConnections(): 0
-getMaxCursorNameLength(): 18
+getMaxCursorNameLength(): 128
 getMaxIndexLength(): 0
-getMaxSchemaNameLength(): 30
+getMaxSchemaNameLength(): 128
 getMaxProcedureNameLength(): 128
 getMaxCatalogNameLength(): 0
 getMaxRowSize(): 0
Index: java/testing/org/apache/derbyTesting/functionTests/master/DerbyNetClient/odbc_metadata.out
===================================================================
--- java/testing/org/apache/derbyTesting/functionTests/master/DerbyNetClient/odbc_metadata.out	(revision 170002)
+++ java/testing/org/apache/derbyTesting/functionTests/master/DerbyNetClient/odbc_metadata.out	(working copy)
@@ -42,7 +42,7 @@
 JDBC Driver 'Apache Derby Network Client JDBC Driver', version 10.1 (10.1.0.0 alpha)
 The URL is: jdbc:derby://localhost:1527/wombat;create=true
 allTablesAreSelectable(): true
-maxColumnNameLength(): 30
+maxColumnNameLength(): 128
 getSchemas():
 TABLE_SCHEM[VARCHAR]
 APP
@@ -161,9 +161,9 @@
 getMaxColumnsInSelect(): 0
 getMaxColumnsInTable(): 0
 getMaxConnections(): 0
-getMaxCursorNameLength(): 18
+getMaxCursorNameLength(): 128
 getMaxIndexLength(): 0
-getMaxSchemaNameLength(): 30
+getMaxSchemaNameLength(): 128
 getMaxProcedureNameLength(): 128
 getMaxCatalogNameLength(): 0
 getMaxRowSize(): 0
Index: java/testing/org/apache/derbyTesting/functionTests/master/metadata.out
===================================================================
--- java/testing/org/apache/derbyTesting/functionTests/master/metadata.out	(revision 170002)
+++ java/testing/org/apache/derbyTesting/functionTests/master/metadata.out	(working copy)
@@ -12,7 +12,7 @@
 JDBC Driver 'Apache Derby Embedded JDBC Driver', version 10.1 (10.1.0.0 alpha)
 The URL is: jdbc:derby:wombat
 allTablesAreSelectable(): true
-maxColumnNameLength(): 30
+maxColumnNameLength(): 128
 getSchemas():
 TABLE_SCHEM[VARCHAR]
 APP
@@ -131,9 +131,9 @@
 getMaxColumnsInSelect(): 0
 getMaxColumnsInTable(): 0
 getMaxConnections(): 0
-getMaxCursorNameLength(): 18
+getMaxCursorNameLength(): 128
 getMaxIndexLength(): 0
-getMaxSchemaNameLength(): 30
+getMaxSchemaNameLength(): 128
 getMaxProcedureNameLength(): 128
 getMaxCatalogNameLength(): 0
 getMaxRowSize(): 0
Index: java/testing/org/apache/derbyTesting/functionTests/master/dbMetaDataJdbc30.out
===================================================================
--- java/testing/org/apache/derbyTesting/functionTests/master/dbMetaDataJdbc30.out	(revision 170002)
+++ java/testing/org/apache/derbyTesting/functionTests/master/dbMetaDataJdbc30.out	(working copy)
@@ -14,9 +14,9 @@
 getDatabaseMajorVersion() : 10
 getDatabaseMinorVersion() : 1
 supportsStatementPooling() : false
-getMaxColumnNameLength() = 30
-getMaxCursorNameLength() = 18
-getMaxSchemaNameLength() = 30
+getMaxColumnNameLength() = 128
+getMaxCursorNameLength() = 128
+getMaxSchemaNameLength() = 128
 getMaxProcedureNameLength() = 128
 getMaxTableNameLength() = 128
 getMaxUserNameLength() = 30
Index: java/testing/org/apache/derbyTesting/functionTests/master/odbc_metadata.out
===================================================================
--- java/testing/org/apache/derbyTesting/functionTests/master/odbc_metadata.out	(revision 170002)
+++ java/testing/org/apache/derbyTesting/functionTests/master/odbc_metadata.out	(working copy)
@@ -42,7 +42,7 @@
 JDBC Driver 'Apache Derby Embedded JDBC Driver', version 10.1 (10.1.0.0 alpha)
 The URL is: jdbc:derby:wombat
 allTablesAreSelectable(): true
-maxColumnNameLength(): 30
+maxColumnNameLength(): 128
 getSchemas():
 TABLE_SCHEM[VARCHAR]
 APP
@@ -161,9 +161,9 @@
 getMaxColumnsInSelect(): 0
 getMaxColumnsInTable(): 0
 getMaxConnections(): 0
-getMaxCursorNameLength(): 18
+getMaxCursorNameLength(): 128
 getMaxIndexLength(): 0
-getMaxSchemaNameLength(): 30
+getMaxSchemaNameLength(): 128
 getMaxProcedureNameLength(): 128
 getMaxCatalogNameLength(): 0
 getMaxRowSize(): 0
Index: java/testing/org/apache/derbyTesting/functionTests/master/identifier.out
===================================================================
--- java/testing/org/apache/derbyTesting/functionTests/master/identifier.out	(revision 170002)
+++ java/testing/org/apache/derbyTesting/functionTests/master/identifier.out	(working copy)
@@ -61,7 +61,13 @@
 select c1, "c1 ", " C1", " C1 ", "  C1  "  from success1;
 ERROR 42X04: Column 'c1 ' is not in any table in the FROM list or it appears within a join specification and is outside the scope of the join specification or it appears in a HAVING clause and is not in the GROUP BY list.  If this is a CREATE or ALTER TABLE statement then 'c1 ' is not a column in the target table.
 ij&gt; -- negative test for max identifier width
--- 4567890123456789012345678901234567890123456789012345678901234567890
+-- NOTE: no negative test for max identifier length of function, savepoint and cursor
+-- tables needed for index, trigger and view test
+create table idtest1 (i integer, j integer);
+0 rows inserted/updated/deleted
+ij&gt; create table idtest2 (i integer, j integer);
+0 rows inserted/updated/deleted
+ij&gt; -- table
 create table
 asdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfaslast6
 (c1 int);
@@ -70,7 +76,46 @@
 "asdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfaslast7"
 (c1 int);
 ERROR 42622: The name 'asdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfaslast7' is too long. The maximum length is '128'.
+ij&gt; -- column
+create table fail1 (ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccx integer);
+ERROR 42622: The name 'CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCX' is too long. The maximum length is '128'.
+ij&gt; create table fail2 ("ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccx" integer);
+ERROR 42622: The name 'ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccx' is too long. The maximum length is '128'.
+ij&gt; -- view
+create view vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvx as select * from idtest1;
+ERROR 42622: The name 'VVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVX' is too long. The maximum length is '128'.
+ij&gt; create view "vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvy" as select * from idtest1;
+ERROR 42622: The name 'vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvy' is too long. The maximum length is '128'.
+ij&gt; -- trigger
+create trigger ttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttx after insert on idtest1 for each row mode db2sql update idtest2 set i=i;
+ERROR 42622: The name 'TTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTX' is too long. The maximum length is '128'.
+ij&gt; create trigger "ttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttx" after insert on idtest1 for each row mode db2sql update idtest2 set i=i;
+ERROR 42622: The name 'ttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttx' is too long. The maximum length is '128'.
+ij&gt; -- schema
+create schema ssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssx;
+ERROR 42622: The name 'SSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSX' is too long. The maximum length is '128'.
+ij&gt; create schema "ssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssx";
+ERROR 42622: The name 'ssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssx' is too long. The maximum length is '128'.
+ij&gt; -- index
+CREATE INDEX iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiix 
+ON idtest1 (i);
+ERROR 42622: The name 'IIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIX' is too long. The maximum length is '128'.
+ij&gt; CREATE INDEX "iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiix" 
+ON idtest1 (j);
+ERROR 42622: The name 'iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiix' is too long. The maximum length is '128'.
+ij&gt; -- constraint
+create table fail3 (i integer, constraint ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccx check (i &gt; 0));
+ERROR 42622: The name 'CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCX' is too long. The maximum length is '128'.
+ij&gt; create table fail4 (i integer, constraint "ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccx" check (i &gt; 0));
+ERROR 42622: The name 'ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccx' is too long. The maximum length is '128'.
+ij&gt; --- procedure
+create procedure ppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppx(in i integer) external name 'a.b.c.d' language java parameter style java;
+ERROR 42622: The name 'PPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPX' is too long. The maximum length is '128'.
+ij&gt; create procedure "ppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppx"(in i integer) external name 'a.b.c.d' language java parameter style java;
+ERROR 42622: The name 'ppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppx' is too long. The maximum length is '128'.
 ij&gt; -- positive test for max identifier width
+-- NOTE: no positive test for max identifier length of function, savepoint and cursor
+-- table
 create table
 asdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfaslast
 (c1 int);
@@ -97,21 +142,90 @@
 C1         
 -----------
 2          
-ij&gt; -- drop the tables
-drop table success1;
+ij&gt; -- column
+create table longid1 (cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc integer);
 0 rows inserted/updated/deleted
+ij&gt; create table longid2 ("cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc" integer);
+0 rows inserted/updated/deleted
+ij&gt; -- view
+create view vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv as select * from idtest1;
+0 rows inserted/updated/deleted
+ij&gt; create view "vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvw" as select * from idtest1;
+0 rows inserted/updated/deleted
+ij&gt; -- trigger
+create trigger tttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttt after insert on idtest1 for each row mode db2sql update idtest2 set i=i;
+0 rows inserted/updated/deleted
+ij&gt; create trigger "tttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttt" after insert on idtest1 for each row mode db2sql update idtest2 set i=i;
+0 rows inserted/updated/deleted
+ij&gt; -- schema
+create schema ssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssss;
+0 rows inserted/updated/deleted
+ij&gt; create schema "ssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssss";
+0 rows inserted/updated/deleted
+ij&gt; -- index
+CREATE INDEX iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii 
+ON idtest1 (i);
+0 rows inserted/updated/deleted
+ij&gt; CREATE INDEX "iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii" 
+ON idtest1 (j);
+0 rows inserted/updated/deleted
+ij&gt; -- constraint
+create table longid3 (i integer, constraint cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc check (i &gt; 0));
+0 rows inserted/updated/deleted
+ij&gt; create table longid4 (i integer, constraint "cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc" check (i &gt; 0));
+0 rows inserted/updated/deleted
+ij&gt; --- procedure
+create procedure pppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppp(in i integer) external name 'a.b.c.d' language java parameter style java;
+0 rows inserted/updated/deleted
+ij&gt; create procedure "pppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppp"(in i integer) external name 'a.b.c.d' language java parameter style java;
+0 rows inserted/updated/deleted
+ij&gt; -- drop the tables etc.
+drop view vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv;
+0 rows inserted/updated/deleted
+ij&gt; drop view "vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvw";
+0 rows inserted/updated/deleted
+ij&gt; drop trigger tttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttt;
+0 rows inserted/updated/deleted
+ij&gt; drop trigger "tttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttt";
+0 rows inserted/updated/deleted
+ij&gt; drop schema ssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssss restrict;
+0 rows inserted/updated/deleted
+ij&gt; drop schema "ssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssss" restrict;
+0 rows inserted/updated/deleted
+ij&gt; drop index iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii;
+0 rows inserted/updated/deleted
+ij&gt; drop index "iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii";
+0 rows inserted/updated/deleted
+ij&gt; drop table success1;
+0 rows inserted/updated/deleted
 ij&gt; drop table success2;
 0 rows inserted/updated/deleted
 ij&gt; drop table success3;
 0 rows inserted/updated/deleted
 ij&gt; drop table success4;
 0 rows inserted/updated/deleted
+ij&gt; drop table idtest1;
+0 rows inserted/updated/deleted
+ij&gt; drop table idtest2;
+0 rows inserted/updated/deleted
+ij&gt; drop table longid1;
+0 rows inserted/updated/deleted
+ij&gt; drop table longid2;
+0 rows inserted/updated/deleted
+ij&gt; drop table longid3;
+0 rows inserted/updated/deleted
+ij&gt; drop table longid4;
+0 rows inserted/updated/deleted
 ij&gt; drop table
 asdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfaslast;
 0 rows inserted/updated/deleted
 ij&gt; drop table
 "delimitedsdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfaslast";
 0 rows inserted/updated/deleted
+ij&gt; drop procedure pppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppp;
+0 rows inserted/updated/deleted
+ij&gt; drop procedure "pppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppp";
+0 rows inserted/updated/deleted
 ij&gt; -- xxxxxxFILTERED-TIMESTAMPxxxxx
 -- new testcases for SQL92 reserved keywords as identifiers
 CREATE TABLE WHEN (WHEN INT, A INT);
  </pre>
</blockquote>
</body>
</html>


Mime
View raw message