From djd@apache.org Mon Jan 10 04:02:06 2005 Return-Path: Mailing-List: contact derby-commits-help@db.apache.org; run by ezmlm Delivered-To: mailing list derby-commits@db.apache.org Received: (qmail 91868 invoked by uid 500); 10 Jan 2005 04:02:06 -0000 Delivered-To: apmail-incubator-derby-cvs@incubator.apache.org Received: (qmail 91864 invoked by uid 99); 10 Jan 2005 04:02:06 -0000 X-ASF-Spam-Status: No, hits=-9.8 required=10.0 tests=ALL_TRUSTED,NO_REAL_NAME X-Spam-Check-By: apache.org Received: from minotaur.apache.org (HELO minotaur.apache.org) (209.237.227.194) by apache.org (qpsmtpd/0.28) with SMTP; Sun, 09 Jan 2005 20:02:05 -0800 Received: (qmail 29393 invoked by uid 65534); 10 Jan 2005 04:02:04 -0000 Date: 10 Jan 2005 04:02:04 -0000 Message-ID: <20050110040204.29387.qmail@minotaur.apache.org> From: djd@apache.org To: derby-cvs@incubator.apache.org Subject: svn commit: r124762 - in incubator/derby/code/trunk: java/engine/org/apache/derby/iapi/services/io java/engine/org/apache/derby/iapi/sql java/engine/org/apache/derby/iapi/sql/compile java/engine/org/apache/derby/impl/jdbc java/engine/org/apache/derby/impl/sql java/engine/org/apache/derby/impl/sql/catalog java/engine/org/apache/derby/impl/sql/compile java/engine/org/apache/derby/impl/sql/execute java/testing/org/apache/derbyTesting/functionTests/master tools/jar MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 X-Virus-Checked: Checked Author: djd Date: Sun Jan 9 20:02:02 2005 New Revision: 124762 URL: http://svn.apache.org/viewcvs?view=rev&rev=124762 Log: Cleanup of SPS (stored prepared statement) code that is no longer required or used. SPS were a non-standard mechanism for pre-compiled statements in Cloudscape. Internally triggers and the network server use SPS's thus some of the runtime infrastructure remains. - - Remove support for DROP STATEMENT - - Remove support for ALTER STATEMENT - - Remove support for USING clause of EXECUTE STATEMENT. EXECUTE STATEMENT is still used by the network server Removed: incubator/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/AlterSPSNode.java incubator/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/DropSPSNode.java incubator/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/AlterSPSConstantAction.java incubator/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/CreateSPSConstantAction.java incubator/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/DropSPSConstantAction.java incubator/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/GenericSPSConstantAction.java Modified: incubator/derby/code/trunk/java/engine/org/apache/derby/iapi/services/io/RegisteredFormatIds.java incubator/derby/code/trunk/java/engine/org/apache/derby/iapi/sql/ParameterValueSet.java incubator/derby/code/trunk/java/engine/org/apache/derby/iapi/sql/compile/C_NodeTypes.java incubator/derby/code/trunk/java/engine/org/apache/derby/impl/jdbc/EmbedParameterSetMetaData.java incubator/derby/code/trunk/java/engine/org/apache/derby/impl/sql/GenericParameterValueSet.java incubator/derby/code/trunk/java/engine/org/apache/derby/impl/sql/catalog/SPSNameCacheable.java incubator/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/C_NodeNames.java incubator/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/ExecSPSNode.java incubator/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/NodeFactoryImpl.java incubator/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/sqlgrammar.jj incubator/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/GenericConstantActionFactory.java incubator/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/db2Compatibility.out incubator/derby/code/trunk/tools/jar/DBMSnodes.properties Modified: incubator/derby/code/trunk/java/engine/org/apache/derby/iapi/services/io/RegisteredFormatIds.java Url: http://svn.apache.org/viewcvs/incubator/derby/code/trunk/java/engine/org/apache/derby/iapi/services/io/RegisteredFormatIds.java?view=diff&rev=124762&p1=incubator/derby/code/trunk/java/engine/org/apache/derby/iapi/services/io/RegisteredFormatIds.java&r1=124761&p2=incubator/derby/code/trunk/java/engine/org/apache/derby/iapi/services/io/RegisteredFormatIds.java&r2=124762 ============================================================================== --- incubator/derby/code/trunk/java/engine/org/apache/derby/iapi/services/io/RegisteredFormatIds.java (original) +++ incubator/derby/code/trunk/java/engine/org/apache/derby/iapi/services/io/RegisteredFormatIds.java Sun Jan 9 20:02:02 2005 @@ -386,7 +386,7 @@ /* 332 */ null, /* 333 */ null, /* 334 */ "org.apache.derby.impl.sql.execute.rts.RealDistinctScanStatistics", - /* 335 */ "org.apache.derby.impl.sql.execute.AlterSPSConstantAction", + /* 335 */ null, /* 336 */ null, /* 337 */ null, /* 338 */ null, Modified: incubator/derby/code/trunk/java/engine/org/apache/derby/iapi/sql/ParameterValueSet.java Url: http://svn.apache.org/viewcvs/incubator/derby/code/trunk/java/engine/org/apache/derby/iapi/sql/ParameterValueSet.java?view=diff&rev=124762&p1=incubator/derby/code/trunk/java/engine/org/apache/derby/iapi/sql/ParameterValueSet.java&r1=124761&p2=incubator/derby/code/trunk/java/engine/org/apache/derby/iapi/sql/ParameterValueSet.java&r2=124762 ============================================================================== --- incubator/derby/code/trunk/java/engine/org/apache/derby/iapi/sql/ParameterValueSet.java (original) +++ incubator/derby/code/trunk/java/engine/org/apache/derby/iapi/sql/ParameterValueSet.java Sun Jan 9 20:02:02 2005 @@ -205,22 +205,6 @@ */ public boolean checkNoDeclaredOutputParameters(); - - // bug 4552 - "exec statement using" will return no parameters through parametermetadata - /** - * Is this pvs for using clause. - * - * @return true if it has a output parameter - * - */ - public boolean isUsingParameterValueSet(); - - // bug 4552 - "exec statement using" will return no parameters through parametermetadata - /** - * Setthis pvs for using clause. - */ - public void setUsingParameterValueSet(); - /** * Set the parameter values of the pvstarget to equal those * set in this PVS. Modified: incubator/derby/code/trunk/java/engine/org/apache/derby/iapi/sql/compile/C_NodeTypes.java Url: http://svn.apache.org/viewcvs/incubator/derby/code/trunk/java/engine/org/apache/derby/iapi/sql/compile/C_NodeTypes.java?view=diff&rev=124762&p1=incubator/derby/code/trunk/java/engine/org/apache/derby/iapi/sql/compile/C_NodeTypes.java&r1=124761&p2=incubator/derby/code/trunk/java/engine/org/apache/derby/iapi/sql/compile/C_NodeTypes.java&r2=124762 ============================================================================== --- incubator/derby/code/trunk/java/engine/org/apache/derby/iapi/sql/compile/C_NodeTypes.java (original) +++ incubator/derby/code/trunk/java/engine/org/apache/derby/iapi/sql/compile/C_NodeTypes.java Sun Jan 9 20:02:02 2005 @@ -93,7 +93,7 @@ static final int CHAR_CONSTANT_NODE = 61; static final int COLUMN_REFERENCE = 62; static final int DROP_INDEX_NODE = 63; - static final int DROP_SPS_NODE = 64; + // 64 available; static final int DROP_TRIGGER_NODE = 65; static final int READ_CURSOR_NODE = 66; static final int DECIMAL_CONSTANT_NODE = 67; @@ -160,7 +160,7 @@ static final int SELECT_NODE = 129; static final int CREATE_VIEW_NODE = 130; static final int CONSTRAINT_DEFINITION_NODE = 131; - static final int ALTER_SPS_NODE = 132; + // 132 available; static final int NEW_INVOCATION_NODE = 133; static final int CREATE_SCHEMA_NODE = 134; static final int FROM_BASE_TABLE = 135; Modified: incubator/derby/code/trunk/java/engine/org/apache/derby/impl/jdbc/EmbedParameterSetMetaData.java Url: http://svn.apache.org/viewcvs/incubator/derby/code/trunk/java/engine/org/apache/derby/impl/jdbc/EmbedParameterSetMetaData.java?view=diff&rev=124762&p1=incubator/derby/code/trunk/java/engine/org/apache/derby/impl/jdbc/EmbedParameterSetMetaData.java&r1=124761&p2=incubator/derby/code/trunk/java/engine/org/apache/derby/impl/jdbc/EmbedParameterSetMetaData.java&r2=124762 ============================================================================== --- incubator/derby/code/trunk/java/engine/org/apache/derby/impl/jdbc/EmbedParameterSetMetaData.java (original) +++ incubator/derby/code/trunk/java/engine/org/apache/derby/impl/jdbc/EmbedParameterSetMetaData.java Sun Jan 9 20:02:02 2005 @@ -57,13 +57,7 @@ ////////////////////////////////////////////////////////////// protected EmbedParameterSetMetaData(ParameterValueSet pvs, DataTypeDescriptor[] types) { int paramCount; - if (pvs.isUsingParameterValueSet()) { - pvs = null; - types = null; - paramCount = 0; - } else { - paramCount = pvs.getParameterCount(); - } + paramCount = pvs.getParameterCount(); this.pvs = pvs; this.paramCount = paramCount; this.types = types; Modified: incubator/derby/code/trunk/java/engine/org/apache/derby/impl/sql/GenericParameterValueSet.java Url: http://svn.apache.org/viewcvs/incubator/derby/code/trunk/java/engine/org/apache/derby/impl/sql/GenericParameterValueSet.java?view=diff&rev=124762&p1=incubator/derby/code/trunk/java/engine/org/apache/derby/impl/sql/GenericParameterValueSet.java&r1=124761&p2=incubator/derby/code/trunk/java/engine/org/apache/derby/impl/sql/GenericParameterValueSet.java&r2=124762 ============================================================================== --- incubator/derby/code/trunk/java/engine/org/apache/derby/impl/sql/GenericParameterValueSet.java (original) +++ incubator/derby/code/trunk/java/engine/org/apache/derby/impl/sql/GenericParameterValueSet.java Sun Jan 9 20:02:02 2005 @@ -57,8 +57,6 @@ final ClassInspector ci; private final boolean hasReturnOutputParam; - //bug 4552 - "exec statement using" will return no parameters through parametermetadata - private boolean isUsingPVS; /** * Constructor for a GenericParameterValueSet @@ -110,9 +108,6 @@ */ public void clearParameters() { - if (isUsingPVS) - return; - for (int i = 0; i < parms.length; i++) { parms[i].clear(); @@ -149,9 +144,6 @@ public DataValueDescriptor getParameterForSet(int position) throws StandardException { - if (isUsingPVS) - throw StandardException.newException(SQLState.NO_SETXXX_FOR_EXEC_USING); - try { GenericParameter gp = parms[position]; @@ -170,9 +162,6 @@ public DataValueDescriptor getParameterForGet(int position) throws StandardException { - if (isUsingPVS) - throw StandardException.newException(SQLState.NO_SETXXX_FOR_EXEC_USING); - try { GenericParameter gp = parms[position]; @@ -266,7 +255,6 @@ pvstarget.getParameterForSet(i).setValue(oldp.getValue()); } } - ((GenericParameterValueSet) pvstarget).isUsingPVS = isUsingPVS; } /* @@ -510,27 +498,6 @@ public boolean hasReturnOutputParameter() { return hasReturnOutputParam; - } - - // bug 4552 - "exec statement using" will return no parameters through parametermetadata - /** - * Is this pvs for using clause. - * - * @return true if this pvs for using clause. - * - */ - public boolean isUsingParameterValueSet() - { - return isUsingPVS; - } - - // bug 4552 - "exec statement using" will return no parameters through parametermetadata - /** - * Set pvs for using clause. - */ - public void setUsingParameterValueSet() - { - isUsingPVS = true; } /** Modified: incubator/derby/code/trunk/java/engine/org/apache/derby/impl/sql/catalog/SPSNameCacheable.java Url: http://svn.apache.org/viewcvs/incubator/derby/code/trunk/java/engine/org/apache/derby/impl/sql/catalog/SPSNameCacheable.java?view=diff&rev=124762&p1=incubator/derby/code/trunk/java/engine/org/apache/derby/impl/sql/catalog/SPSNameCacheable.java&r1=124761&p2=incubator/derby/code/trunk/java/engine/org/apache/derby/impl/sql/catalog/SPSNameCacheable.java&r2=124762 ============================================================================== --- incubator/derby/code/trunk/java/engine/org/apache/derby/impl/sql/catalog/SPSNameCacheable.java (original) +++ incubator/derby/code/trunk/java/engine/org/apache/derby/impl/sql/catalog/SPSNameCacheable.java Sun Jan 9 20:02:02 2005 @@ -32,8 +32,6 @@ import org.apache.derby.iapi.services.sanity.SanityManager; -import java.util.Hashtable; - /** * This class implements a Cacheable for a DataDictionary cache of * sps descriptors, with the lookup key being the name/schema of the sps. Deleted: /incubator/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/AlterSPSNode.java Url: http://svn.apache.org/viewcvs/incubator/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/AlterSPSNode.java?view=auto&rev=124761 ============================================================================== Modified: incubator/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/C_NodeNames.java Url: http://svn.apache.org/viewcvs/incubator/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/C_NodeNames.java?view=diff&rev=124762&p1=incubator/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/C_NodeNames.java&r1=124761&p2=incubator/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/C_NodeNames.java&r2=124762 ============================================================================== --- incubator/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/C_NodeNames.java (original) +++ incubator/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/C_NodeNames.java Sun Jan 9 20:02:02 2005 @@ -46,8 +46,6 @@ static final String ALL_RESULT_COLUMN_NAME = "org.apache.derby.impl.sql.compile.AllResultColumn"; - static final String ALTER_SPS_NODE_NAME = "org.apache.derby.impl.sql.compile.AlterSPSNode"; - static final String ALTER_TABLE_NODE_NAME = "org.apache.derby.impl.sql.compile.AlterTableNode"; static final String AND_NODE_NAME = "org.apache.derby.impl.sql.compile.AndNode"; @@ -119,8 +117,6 @@ static final String DROP_ALIAS_NODE_NAME = "org.apache.derby.impl.sql.compile.DropAliasNode"; static final String DROP_INDEX_NODE_NAME = "org.apache.derby.impl.sql.compile.DropIndexNode"; - - static final String DROP_SPS_NODE_NAME = "org.apache.derby.impl.sql.compile.DropSPSNode"; static final String DROP_SCHEMA_NODE_NAME = "org.apache.derby.impl.sql.compile.DropSchemaNode"; Deleted: /incubator/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/DropSPSNode.java Url: http://svn.apache.org/viewcvs/incubator/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/DropSPSNode.java?view=auto&rev=124761 ============================================================================== Modified: incubator/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/ExecSPSNode.java Url: http://svn.apache.org/viewcvs/incubator/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/ExecSPSNode.java?view=diff&rev=124762&p1=incubator/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/ExecSPSNode.java&r1=124761&p2=incubator/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/ExecSPSNode.java&r2=124762 ============================================================================== --- incubator/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/ExecSPSNode.java (original) +++ incubator/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/ExecSPSNode.java Sun Jan 9 20:02:02 2005 @@ -20,10 +20,6 @@ package org.apache.derby.impl.sql.compile; -import org.apache.derby.iapi.services.context.ContextManager; - -import org.apache.derby.iapi.services.monitor.Monitor; - import org.apache.derby.iapi.services.sanity.SanityManager; import org.apache.derby.iapi.services.loader.GeneratedClass; @@ -32,36 +28,21 @@ import org.apache.derby.iapi.sql.compile.CompilerContext; -import org.apache.derby.iapi.sql.conn.LanguageConnectionContext; - -import org.apache.derby.iapi.sql.dictionary.DataDictionaryContext; import org.apache.derby.iapi.sql.dictionary.DataDictionary; import org.apache.derby.iapi.sql.dictionary.SchemaDescriptor; -import org.apache.derby.iapi.sql.dictionary.DataDescriptorGenerator; import org.apache.derby.iapi.sql.dictionary.SPSDescriptor; -import org.apache.derby.iapi.types.DataValueFactory; -import org.apache.derby.iapi.types.TypeId; - import org.apache.derby.iapi.sql.depend.DependencyManager; -import org.apache.derby.iapi.sql.depend.Dependent; import org.apache.derby.iapi.reference.SQLState; import org.apache.derby.iapi.sql.execute.ConstantAction; import org.apache.derby.iapi.sql.execute.ExecPreparedStatement; -import org.apache.derby.iapi.sql.execute.ExecRow; import org.apache.derby.iapi.types.DataTypeDescriptor; -import org.apache.derby.iapi.types.DataValueDescriptor; import org.apache.derby.iapi.sql.PreparedStatement; -import org.apache.derby.iapi.sql.ParameterValueSet; import org.apache.derby.iapi.sql.ResultDescription; -import org.apache.derby.iapi.sql.ResultSet; -import org.apache.derby.impl.sql.compile.ActivationClassBuilder; -import org.apache.derby.impl.sql.execute.BaseActivation; -import org.apache.derby.impl.sql.execute.ColumnInfo; import org.apache.derby.impl.sql.CursorInfo; import org.apache.derby.iapi.util.ByteArray; @@ -87,28 +68,19 @@ private TableName name; private SPSDescriptor spsd; private ExecPreparedStatement ps; - private ResultSetNode usingClause; - private String usingText; /** * Initializer for a ExecSPSNode * * @param newObjectName The name of the table to be created - * @param usingClause The using clause - * @param usingText The text of the using clause * * @exception StandardException Thrown on error */ public void init( - Object newObjectName, - Object usingClause, - Object usingText) - throws StandardException + Object newObjectName) { this.name = (TableName) newObjectName; - this.usingClause = (ResultSetNode) usingClause; - this.usingText = (String) usingText; } /** @@ -123,20 +95,12 @@ */ public QueryTreeNode bind() throws StandardException { - DataDictionary dd; - /* ** Grab the compiler context each time we bind just ** to make sure we have the write one (even though ** we are caching it). */ - dd = getDataDictionary(); - - // bind the using Clause - if (usingClause != null) - { - usingClause.bind(); - } + DataDictionary dd = getDataDictionary(); String schemaName = name.getSchemaName(); SchemaDescriptor sd = getSchemaDescriptor(name.getSchemaName()); @@ -224,11 +188,6 @@ getCompilerContext().setSavedObjects(ps.getSavedObjects()); getCompilerContext().setCursorInfo(ps.getCursorInfo()); GeneratedClass gc = ps.getActivationClass(); - - /* - ** Set up the params for our using clause. - */ - setupParams(); return gc; } @@ -347,94 +306,7 @@ // PRIVATE // ///////////////////////////////////////////////////////////////////// - /* - ** Set up the parameters for this node. Takes - ** the usingClause and executes it. The results - ** are used to set the parameters for the - ** statement. - */ - private void setupParams() throws StandardException - { - if (usingClause == null) - return; - DataTypeDescriptor[] types = spsd.getParams(); - /* - ** If the sps doesn't support any - ** parameters, then don't bother. - */ - if (types == null) - { - return; - } - - /* - ** Get the results the easy way: create - ** a statement from the text and execute - ** it. - */ - LanguageConnectionContext lcc = getLanguageConnectionContext(); - - PreparedStatement ps = lcc.prepareInternalStatement(usingText); - - ResultSet rs = ps.execute(lcc, false); - - try { - ExecRow row = rs.getNextRow(); - if (row == null) - { - throw StandardException.newException(SQLState.LANG_NO_ROWS_FROM_USING); - } - - /* - ** Get the row and set the parameters based on that - */ - ParameterValueSet params = lcc.getLanguageFactory().newParameterValueSet( - lcc.getLanguageConnectionFactory().getClassFactory().getClassInspector(), types.length, false); - - DataValueDescriptor[] rowArray = row.getRowArray(); - // Check at compile time that the using clause has the correct number of parameters. - if (rowArray.length != types.length) { - throw StandardException.newException(SQLState.LANG_NUM_PARAMS_INCORRECT, - Integer.toString(rowArray.length), Integer.toString(types.length)); - } - - for (int i = 0; i < types.length; i++) - { - TypeId typeId = types[i].getTypeId(); - - params.setStorableDataValue( - typeId.getNull(), - i, typeId.getJDBCTypeId(), typeId.getCorrespondingJavaTypeName()); - - params.getParameterForSet(i).setValue(rowArray[i]); - } - - /* - ** If there are any other rows, then throw an - ** exception - */ - if (rs.getNextRow() != null) - { - throw StandardException.newException(SQLState.LANG_USING_CARDINALITY_VIOLATION); - } - //bug 4552 - "exec statement using" will return no parameters through parametermetadata - params.setUsingParameterValueSet(); - - /* - ** Stash the parameters in the compiler context - */ - getCompilerContext().setParams(params); - } - finally { - - rs.close(); - } - - - - - } ///////////////////////////////////////////////////////////////////// // @@ -447,13 +319,8 @@ } // called after bind only - SPSDescriptor getSPSDescriptor() + private final SPSDescriptor getSPSDescriptor() { return spsd; - } - - String getUsingText() - { - return usingText; } } Modified: incubator/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/NodeFactoryImpl.java Url: http://svn.apache.org/viewcvs/incubator/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/NodeFactoryImpl.java?view=diff&rev=124762&p1=incubator/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/NodeFactoryImpl.java&r1=124761&p2=incubator/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/NodeFactoryImpl.java&r2=124762 ============================================================================== --- incubator/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/NodeFactoryImpl.java (original) +++ incubator/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/NodeFactoryImpl.java Sun Jan 9 20:02:02 2005 @@ -327,9 +327,6 @@ case C_NodeTypes.DROP_INDEX_NODE: return C_NodeNames.DROP_INDEX_NODE_NAME; - case C_NodeTypes.DROP_SPS_NODE: - return C_NodeNames.DROP_SPS_NODE_NAME; - case C_NodeTypes.DROP_TRIGGER_NODE: return C_NodeNames.DROP_TRIGGER_NODE_NAME; @@ -478,9 +475,6 @@ case C_NodeTypes.CONSTRAINT_DEFINITION_NODE: return C_NodeNames.CONSTRAINT_DEFINITION_NODE_NAME; - - case C_NodeTypes.ALTER_SPS_NODE: - return C_NodeNames.ALTER_SPS_NODE_NAME; case C_NodeTypes.NEW_INVOCATION_NODE: return C_NodeNames.NEW_INVOCATION_NODE_NAME; Modified: incubator/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/sqlgrammar.jj Url: http://svn.apache.org/viewcvs/incubator/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/sqlgrammar.jj?view=diff&rev=124762&p1=incubator/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/sqlgrammar.jj&r1=124761&p2=incubator/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/sqlgrammar.jj&r2=124762 ============================================================================== --- incubator/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/sqlgrammar.jj (original) +++ incubator/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/sqlgrammar.jj Sun Jan 9 20:02:02 2005 @@ -21,7 +21,7 @@ Derby - File org.apache.derby.impl.sql.compile.sqlgrammar.jj - Copyright 1997, 2004 The Apache Software Foundation or its licensors, as applicable. + Copyright 1997, 2005 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. @@ -2421,7 +2421,6 @@ statementNode = dropIndexStatement() | statementNode = dropAliasStatement() | statementNode = dropViewStatement() | - statementNode = dropSPSStatement() | statementNode = dropTriggerStatement() ) { @@ -9742,39 +9741,13 @@ execStatement() throws StandardException : { TableName stmtName; - String usingText = null; - ResultSetNode usingClause = null; - Token usingToken = null; - Token endToken; } { stmtName = qualifiedName(DB2Limit.DB2_MAX_IDENTIFIER_LENGTH128) - [ LOOKAHEAD( { getToken(1).kind == USING } ) - usingToken = usingClause = - queryExpression(null, NO_SET_OP) ] { - endToken = getToken(0); - - if (usingClause != null) - { - HasNodeVisitor visitor = new HasNodeVisitor(ParameterNode.class); - usingClause.accept(visitor); - if (visitor.hasNode()) - { - throw StandardException.newException(SQLState.LANG_NO_PARAMS_IN_USING); - } - - // grab the USING text - usingText = getStringSlicer().slice( - usingToken.endOffset + 1, - getToken(0).endOffset,false); - } - return (QueryTreeNode) nodeFactory.getNode( C_NodeTypes.EXEC_SPS_NODE, stmtName, - usingClause, - usingText, getContextManager()); } } @@ -11003,23 +10976,6 @@ C_NodeTypes.DROP_VIEW_NODE, viewName, getContextManager()); - } -} - -QueryTreeNode -dropSPSStatement() throws StandardException : -{ - TableName statementName; -} -{ - statementName = qualifiedName(DB2Limit.DB2_MAX_IDENTIFIER_LENGTH128) - { - QueryTreeNode stmt = nodeFactory.getNode( - C_NodeTypes.DROP_SPS_NODE, - statementName, - getContextManager()); - - return stmt; } } Deleted: /incubator/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/AlterSPSConstantAction.java Url: http://svn.apache.org/viewcvs/incubator/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/AlterSPSConstantAction.java?view=auto&rev=124761 ============================================================================== Deleted: /incubator/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/CreateSPSConstantAction.java Url: http://svn.apache.org/viewcvs/incubator/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/CreateSPSConstantAction.java?view=auto&rev=124761 ============================================================================== Deleted: /incubator/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/DropSPSConstantAction.java Url: http://svn.apache.org/viewcvs/incubator/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/DropSPSConstantAction.java?view=auto&rev=124761 ============================================================================== Modified: incubator/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/GenericConstantActionFactory.java Url: http://svn.apache.org/viewcvs/incubator/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/GenericConstantActionFactory.java?view=diff&rev=124762&p1=incubator/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/GenericConstantActionFactory.java&r1=124761&p2=incubator/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/GenericConstantActionFactory.java&r2=124762 ============================================================================== --- incubator/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/GenericConstantActionFactory.java (original) +++ incubator/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/GenericConstantActionFactory.java Sun Jan 9 20:02:02 2005 @@ -85,32 +85,6 @@ // /////////////////////////////////////////////////////////////////////// - - - - /** - * Get ConstantAction for ALTER STATEMENT statement. - * - * @param sd descriptor of the schema in which - * our beloved stmt resides - * @param spsName Name of sps. if null, all statements - * are recompiled - * @param usingText the text of the USING clause - * @param invalidOnly only recompile if invalid. Only used - * for the case where all statements are - * recompiled. - */ - public ConstantAction getAlterSPSConstantAction - ( - SchemaDescriptor sd, - String spsName, - String usingText, - boolean invalidOnly - ) - { - return new AlterSPSConstantAction(sd, spsName, usingText, invalidOnly); - } - /** * Get ConstantAction for SET CONSTRAINTS statement. * @@ -280,35 +254,6 @@ (aliasName, schemaName, javaClassName, aliasInfo, aliasType ); } - - /** - * Make the ConstantAction for a CREATE STORED PREPARED STATEMENT statement. - * Adds an extra parameter that allows the user to designate whether - * this sps can be created in the SYS schema. - * - * @param schemaName name for the schema that table lives in. - * @param spsName Name of statement - * @param spsText Text of query expression for sps definition - * @param usingText the text of the USING clause - * @param okInSys ok to create in sys schema - * @param nocompile don't try to compile the sps when it is created - * @param compSchemaId the compilation schema id - */ - public ConstantAction getCreateSPSConstantAction - ( - String schemaName, - String spsName, - String spsText, - String usingText, - boolean okInSys, - boolean nocompile, - UUID compSchemaId - ) - { - return new CreateSPSConstantAction(schemaName, spsName, spsText, - usingText, compSchemaId, okInSys, nocompile); - } - /** * Make the ConstantAction for a CREATE SCHEMA statement. * @@ -568,24 +513,6 @@ { return new DropAliasConstantAction(sd, aliasName, aliasType ); } - - - /** - * Make the ConstantAction for a DROP STATEMENT statement. - * - * @param sd Schema that stored prepared statement lives in. - * @param spsName Name of the SPS - * - */ - public ConstantAction getDropSPSConstantAction - ( - SchemaDescriptor sd, - String spsName - ) - { - return new DropSPSConstantAction( sd, spsName ); - } - /** * Make the ConstantAction for a DROP TABLE statement. Deleted: /incubator/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/GenericSPSConstantAction.java Url: http://svn.apache.org/viewcvs/incubator/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/GenericSPSConstantAction.java?view=auto&rev=124761 ============================================================================== Modified: incubator/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/db2Compatibility.out Url: http://svn.apache.org/viewcvs/incubator/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/db2Compatibility.out?view=diff&rev=124762&p1=incubator/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/db2Compatibility.out&r1=124761&p2=incubator/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/db2Compatibility.out&r2=124762 ============================================================================== --- incubator/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/db2Compatibility.out (original) +++ incubator/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/db2Compatibility.out Sun Jan 9 20:02:02 2005 @@ -78,7 +78,7 @@ ERROR 42X01: Syntax error: Encountered "statement" at line 2, column 7. ij> -- following will give error because there is no stored prepared statement s1 in the database drop statement s1; -ERROR 42Y55: 'DROP STATEMENT' cannot be performed on 'S1' because it does not exist. +ERROR 42X01: Syntax error: Encountered "statement" at line 2, column 6. ij> -- clean up DROP TABLE t1; ERROR 42Y55: 'DROP TABLE' cannot be performed on 'T1' because it does not exist. @@ -87,7 +87,7 @@ ij> DROP CLASS ALIAS ExternalInsert; ERROR 42X01: Syntax error: Encountered "CLASS" at line 1, column 6. ij> DROP STATEMENT insert1; -ERROR 42Y55: 'DROP STATEMENT' cannot be performed on 'INSERT1' because it does not exist. +ERROR 42X01: Syntax error: Encountered "STATEMENT" at line 1, column 6. ij> -- Primary key constraint, DB2 requires NOT null on the columns. create table customer (id int primary key, name char(100)); ERROR 42831: 'ID' cannot be a column of a primary key or unique key because it can contain null values. Modified: incubator/derby/code/trunk/tools/jar/DBMSnodes.properties Url: http://svn.apache.org/viewcvs/incubator/derby/code/trunk/tools/jar/DBMSnodes.properties?view=diff&rev=124762&p1=incubator/derby/code/trunk/tools/jar/DBMSnodes.properties&r1=124761&p2=incubator/derby/code/trunk/tools/jar/DBMSnodes.properties&r2=124762 ============================================================================== --- incubator/derby/code/trunk/tools/jar/DBMSnodes.properties (original) +++ incubator/derby/code/trunk/tools/jar/DBMSnodes.properties Sun Jan 9 20:02:02 2005 @@ -42,7 +42,6 @@ derby.module.cloudscapenodes.ci=org.apache.derby.impl.sql.compile.CoalesceFunctionNode derby.module.cloudscapenodes.ck=org.apache.derby.impl.sql.compile.ColumnReference derby.module.cloudscapenodes.cl=org.apache.derby.impl.sql.compile.DropIndexNode -derby.module.cloudscapenodes.cm=org.apache.derby.impl.sql.compile.DropSPSNode derby.module.cloudscapenodes.cn=org.apache.derby.impl.sql.compile.DropTriggerNode derby.module.cloudscapenodes.co=org.apache.derby.impl.sql.compile.ReadCursorNode derby.module.cloudscapenodes.cp=org.apache.derby.impl.sql.compile.NumericConstantNode @@ -89,7 +88,6 @@ derby.module.cloudscapenodes.fa=org.apache.derby.impl.sql.compile.SelectNode derby.module.cloudscapenodes.fb=org.apache.derby.impl.sql.compile.CreateViewNode derby.module.cloudscapenodes.fc=org.apache.derby.impl.sql.compile.ConstraintDefinitionNode -derby.module.cloudscapenodes.fd=org.apache.derby.impl.sql.compile.AlterSPSNode derby.module.cloudscapenodes.fe=org.apache.derby.impl.sql.compile.NewInvocationNode derby.module.cloudscapenodes.ff=org.apache.derby.impl.sql.compile.CreateSchemaNode derby.module.cloudscapenodes.fg=org.apache.derby.impl.sql.compile.FromBaseTable