You are viewing a plain text version of this content. The canonical link for it is here.
Posted to derby-commits@db.apache.org by dj...@apache.org on 2004/12/16 04:33:37 UTC
svn commit: r116300 - in incubator/derby/code/trunk/java/engine/org/apache/derby: iapi/services/io iapi/sql/depend iapi/sql/dictionary impl/sql/catalog impl/sql/compile impl/sql/execute
Author: djd
Date: Wed Dec 15 19:33:34 2004
New Revision: 116300
URL: http://svn.apache.org/viewcvs?view=rev&rev=116300
Log:
Clean up some old replication code, remove ListOfRowLists and DependableList.
Removed:
incubator/derby/code/trunk/java/engine/org/apache/derby/iapi/sql/depend/DependableList.java
incubator/derby/code/trunk/java/engine/org/apache/derby/iapi/sql/dictionary/ListOfRowLists.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/services/io/StoredFormatIds.java
incubator/derby/code/trunk/java/engine/org/apache/derby/iapi/sql/dictionary/RowList.java
incubator/derby/code/trunk/java/engine/org/apache/derby/iapi/sql/dictionary/TabInfo.java
incubator/derby/code/trunk/java/engine/org/apache/derby/impl/sql/catalog/TabInfoImpl.java
incubator/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/AlterTableNode.java
incubator/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/GenericConstantActionFactory.java
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=116300&p1=incubator/derby/code/trunk/java/engine/org/apache/derby/iapi/services/io/RegisteredFormatIds.java&r1=116299&p2=incubator/derby/code/trunk/java/engine/org/apache/derby/iapi/services/io/RegisteredFormatIds.java&r2=116300
==============================================================================
--- 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 Wed Dec 15 19:33:34 2004
@@ -290,11 +290,11 @@
/* 236 */ null,
/* 237 */ "org.apache.derby.impl.sql.execute.ValueRow",
/* 238 */ "org.apache.derby.impl.sql.execute.IndexRow",
- /* 239 */ "org.apache.derby.iapi.sql.dictionary.RowList",
+ /* 239 */ null,
/* 240 */ null,
/* 241 */ "org.apache.derby.impl.store.raw.data.InitPageOperation",
/* 242 */ "org.apache.derby.impl.store.raw.data.ContainerOperation",
- /* 243 */ "org.apache.derby.iapi.sql.depend.DependableList",
+ /* 243 */ null,
/* 244 */ "org.apache.derby.iapi.types.DTSClassInfo", //InstanceGetter
/* 245 */ "org.apache.derby.iapi.types.DTSClassInfo", //InstanceGetter
/* 246 */ "org.apache.derby.iapi.types.DTSClassInfo", //InstanceGetter
Modified: incubator/derby/code/trunk/java/engine/org/apache/derby/iapi/services/io/StoredFormatIds.java
Url: http://svn.apache.org/viewcvs/incubator/derby/code/trunk/java/engine/org/apache/derby/iapi/services/io/StoredFormatIds.java?view=diff&rev=116300&p1=incubator/derby/code/trunk/java/engine/org/apache/derby/iapi/services/io/StoredFormatIds.java&r1=116299&p2=incubator/derby/code/trunk/java/engine/org/apache/derby/iapi/services/io/StoredFormatIds.java&r2=116300
==============================================================================
--- incubator/derby/code/trunk/java/engine/org/apache/derby/iapi/services/io/StoredFormatIds.java (original)
+++ incubator/derby/code/trunk/java/engine/org/apache/derby/iapi/services/io/StoredFormatIds.java Wed Dec 15 19:33:34 2004
@@ -569,9 +569,9 @@
**
******************************************************************/
/**
- class org.apache.derby.iapi.sql.depend.DependableList
+ Unused 243
*/
- static public final int DEPENDABLE_LIST_ID =
+ static public final int UNUSED_243 =
(MIN_ID_2 + 243);
/**
Deleted: /incubator/derby/code/trunk/java/engine/org/apache/derby/iapi/sql/depend/DependableList.java
Url: http://svn.apache.org/viewcvs/incubator/derby/code/trunk/java/engine/org/apache/derby/iapi/sql/depend/DependableList.java?view=auto&rev=116299
==============================================================================
Deleted: /incubator/derby/code/trunk/java/engine/org/apache/derby/iapi/sql/dictionary/ListOfRowLists.java
Url: http://svn.apache.org/viewcvs/incubator/derby/code/trunk/java/engine/org/apache/derby/iapi/sql/dictionary/ListOfRowLists.java?view=auto&rev=116299
==============================================================================
Modified: incubator/derby/code/trunk/java/engine/org/apache/derby/iapi/sql/dictionary/RowList.java
Url: http://svn.apache.org/viewcvs/incubator/derby/code/trunk/java/engine/org/apache/derby/iapi/sql/dictionary/RowList.java?view=diff&rev=116300&p1=incubator/derby/code/trunk/java/engine/org/apache/derby/iapi/sql/dictionary/RowList.java&r1=116299&p2=incubator/derby/code/trunk/java/engine/org/apache/derby/iapi/sql/dictionary/RowList.java&r2=116300
==============================================================================
--- incubator/derby/code/trunk/java/engine/org/apache/derby/iapi/sql/dictionary/RowList.java (original)
+++ incubator/derby/code/trunk/java/engine/org/apache/derby/iapi/sql/dictionary/RowList.java Wed Dec 15 19:33:34 2004
@@ -20,37 +20,9 @@
package org.apache.derby.iapi.sql.dictionary;
-import org.apache.derby.iapi.types.RowLocation;
-
-import org.apache.derby.iapi.sql.conn.LanguageConnectionContext;
-
-import org.apache.derby.iapi.store.access.TransactionController;
-import org.apache.derby.iapi.store.access.ConglomerateController;
-
-import org.apache.derby.iapi.sql.dictionary.DataDictionaryContext;
-import org.apache.derby.iapi.sql.dictionary.DataDictionary;
-
-import org.apache.derby.iapi.sql.dictionary.TabInfo;
-
-import org.apache.derby.iapi.sql.Row;
import org.apache.derby.iapi.sql.execute.ExecRow;
-import org.apache.derby.iapi.services.context.ContextService;
-
-import org.apache.derby.iapi.error.StandardException;
-
-import org.apache.derby.iapi.services.io.Formatable;
-import org.apache.derby.iapi.services.io.StoredFormatIds;
-import org.apache.derby.iapi.services.io.FormatIdUtil;
-
-import org.apache.derby.iapi.services.stream.HeaderPrintWriter;
-
import java.util.Vector;
-import java.util.Enumeration;
-
-import java.io.ObjectOutput;
-import java.io.ObjectInput;
-import java.io.IOException;
/**
* This interface wraps a list of Rows.
@@ -59,28 +31,8 @@
* @author Rick Hillegas
*/
-public class RowList extends Vector implements Formatable
+public class RowList extends Vector
{
- /********************************************************
- **
- ** This class implements Formatable. That means that it
- ** can write itself to and from a formatted stream. If
- ** you add more fields to this class, make sure that you
- ** also write/read them with the writeExternal()/readExternal()
- ** methods.
- **
- ** If, inbetween releases, you add more fields to this class,
- ** then you should bump the version number emitted by the getTypeFormatId()
- ** method.
- **
- ********************************************************/
-
- ///////////////////////////////////////////////////////////////////////
- //
- // CONSTANTS
- //
- ///////////////////////////////////////////////////////////////////////
-
///////////////////////////////////////////////////////////////////////
//
// STATE
@@ -89,7 +41,7 @@
private String tableName;
- protected transient TabInfo tableInfo;
+ private transient TabInfo tableInfo;
///////////////////////////////////////////////////////////////////////
@@ -118,17 +70,6 @@
}
- /**
- * Constructor used for testing.
- *
- * @param tableName name of table that this RowList buffers tuples for.
- *
- */
- public RowList( String tableName )
- {
- this.tableName = tableName;
- }
-
///////////////////////////////////////////////////////////////////////
//
// ROW LIST INTERFACE
@@ -148,145 +89,6 @@
{
super.addElement(row);
}
-
- /**
- * Get the name of the table that this list is for.
- *
- *
- * @return name of table that this Rowlist holds tuples for.
- *
- * @exception StandardException Thrown on error
- */
-
- public String getTableName() throws StandardException
- {
- return getTableInfo().getTableName();
- }
-
- /**
- * Get the Conglomerate ID of the table that this list is for.
- *
- *
- * @return conglomerate id of table that this Rowlist holds tuples for.
- *
- * @exception StandardException Thrown on error
- */
-
- public long getTableID() throws StandardException
- {
- return getTableInfo().getHeapConglomerate();
- }
-
- /**
- * Execution-time routine to delete all the keys on the list from the
- * corresponding system table.
- *
- * @param lcc language state variable
- *
- *
- * @exception StandardException Thrown on error
- */
-
- public void deleteFromCatalog(LanguageConnectionContext lcc)
- throws StandardException
- {
- getTableInfo().deleteRowList( this, lcc );
- }
-
-
- /**
- * Execution-time routine to stuff all the rows on the list into the
- * corresponding system table.
- *
- * @param lcc language state variable
- *
- *
- * @exception StandardException Thrown on error
- */
-
- public void stuffCatalog(LanguageConnectionContext lcc)
- throws StandardException
- {
- getTableInfo().insertRowList( this, lcc );
- }
-
-
- private TabInfo getTableInfo() throws StandardException
- {
- if ( tableInfo == null )
- {
- DataDictionaryContext ddc = (DataDictionaryContext)
- ContextService.getContext(DataDictionaryContext.CONTEXT_ID);
- DataDictionary dd = ddc.getDataDictionary();
-
- tableInfo = dd.getTabInfo( tableName );
- }
- return tableInfo;
- }
-
- ///////////////////////////////////////////////////////////////////////
- //
- // FORMATABLE INTERFACE
- //
- ///////////////////////////////////////////////////////////////////////
-
- /**
- * Read this object from a stream of stored objects.
- *
- * @param in read this.
- *
- * @exception IOException thrown on error
- * @exception ClassNotFoundException thrown on error
- */
- public void readExternal( ObjectInput in )
- throws IOException, ClassNotFoundException
- {
- tableName = (String) in.readObject();
-
- int rowCount = in.readInt();
- ExecRow row;
- for ( int ictr = 0; ictr < rowCount; ictr++ )
- {
- row = (ExecRow) in.readObject();
- add( row );
- }
- }
-
- /**
- * Write this object to a stream of stored objects.
- *
- * @param out write bytes here.
- *
- * @exception IOException thrown on error
- */
- public void writeExternal( ObjectOutput out )
- throws IOException
- {
- out.writeObject( tableName );
-
- int rowCount = size();
- out.writeInt( rowCount );
- for ( int ictr = 0; ictr < rowCount; ictr++ )
- {
- out.writeObject( elementAt( ictr ) );
- }
- }
-
- /**
- * Get the formatID which corresponds to this class.
- *
- * @return the formatID of this class
- */
- public int getTypeFormatId() { return StoredFormatIds.ROW_LIST_V01_ID; }
-
-
- ///////////////////////////////////////////////////////////////////////
- //
- // MINIONS
- //
- ///////////////////////////////////////////////////////////////////////
-
-
}
Modified: incubator/derby/code/trunk/java/engine/org/apache/derby/iapi/sql/dictionary/TabInfo.java
Url: http://svn.apache.org/viewcvs/incubator/derby/code/trunk/java/engine/org/apache/derby/iapi/sql/dictionary/TabInfo.java?view=diff&rev=116300&p1=incubator/derby/code/trunk/java/engine/org/apache/derby/iapi/sql/dictionary/TabInfo.java&r1=116299&p2=incubator/derby/code/trunk/java/engine/org/apache/derby/iapi/sql/dictionary/TabInfo.java&r2=116300
==============================================================================
--- incubator/derby/code/trunk/java/engine/org/apache/derby/iapi/sql/dictionary/TabInfo.java (original)
+++ incubator/derby/code/trunk/java/engine/org/apache/derby/iapi/sql/dictionary/TabInfo.java Wed Dec 15 19:33:34 2004
@@ -244,20 +244,6 @@
throws StandardException;
/**
- * Deletes a list of keyed rows from a catalog and all the corresponding
- * index rows.
- *
- * @param rowList List of keyed rows to delete
- * @param lcc language state variable
- *
- * @return the number of rows deleted.
- *
- * @exception StandardException Thrown on failure
- */
- public int deleteRowList( RowList rowList, LanguageConnectionContext lcc )
- throws StandardException;
-
- /**
* Inserts a list of base rows into a catalog and inserts all the corresponding
* index rows.
*
@@ -271,22 +257,6 @@
* @exception StandardException Thrown on failure
*/
public int insertRowList( RowList rowList, TransactionController tc )
- throws StandardException;
-
- /**
- * Inserts a list of base rows into a catalog and inserts all the corresponding
- * index rows.
- *
- * @param rowList List of rows to insert
- * @param lcc language state variable
- *
- *
- * @return row number (>= 0) if duplicate row inserted into an index
- * ROWNOTDUPLICATE otherwise
- *
- * @exception StandardException Thrown on failure
- */
- public int insertRowList( RowList rowList, LanguageConnectionContext lcc )
throws StandardException;
/**
Modified: incubator/derby/code/trunk/java/engine/org/apache/derby/impl/sql/catalog/TabInfoImpl.java
Url: http://svn.apache.org/viewcvs/incubator/derby/code/trunk/java/engine/org/apache/derby/impl/sql/catalog/TabInfoImpl.java?view=diff&rev=116300&p1=incubator/derby/code/trunk/java/engine/org/apache/derby/impl/sql/catalog/TabInfoImpl.java&r1=116299&p2=incubator/derby/code/trunk/java/engine/org/apache/derby/impl/sql/catalog/TabInfoImpl.java&r2=116300
==============================================================================
--- incubator/derby/code/trunk/java/engine/org/apache/derby/impl/sql/catalog/TabInfoImpl.java (original)
+++ incubator/derby/code/trunk/java/engine/org/apache/derby/impl/sql/catalog/TabInfoImpl.java Wed Dec 15 19:33:34 2004
@@ -462,39 +462,6 @@
}
/**
- * Deletes a list of keyed rows from a catalog and all the corresponding
- * index rows. Deletes through the first index--all tuples are assumed to
- * be keys into the first index.
- *
- * @param rowList List of keyed rows to delete
- * @param lcc language state variable
- *
- * @return the number of rows deleted.
- *
- * @exception StandardException Thrown on failure
- */
- public int deleteRowList( RowList rowList, LanguageConnectionContext lcc )
- throws StandardException
- {
- int totalRows = 0;
- int indexNumber;
- ExecIndexRow key;
- Enumeration iterator;
- TransactionController tc = lcc.getTransactionExecute();
-
- // loop through rows on this list, deleting them through the first index.
- for (iterator = rowList.elements(); iterator.hasMoreElements(); )
- {
- indexNumber = crf.getPrimaryKeyIndexNumber();
-
- key = (ExecIndexRow) iterator.nextElement();
- totalRows += deleteRow( tc, key, indexNumber );
- }
-
- return totalRows;
- }
-
- /**
* Inserts a list of base rows into a catalog and inserts all the corresponding
* index rows.
*
@@ -528,7 +495,7 @@
*
* @exception StandardException Thrown on failure
*/
- public int insertRowList( RowList rowList, LanguageConnectionContext lcc )
+ private int insertRowList( RowList rowList, LanguageConnectionContext lcc )
throws StandardException
{
TransactionController tc = lcc.getTransactionExecute();
Modified: incubator/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/AlterTableNode.java
Url: http://svn.apache.org/viewcvs/incubator/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/AlterTableNode.java?view=diff&rev=116300&p1=incubator/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/AlterTableNode.java&r1=116299&p2=incubator/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/AlterTableNode.java&r2=116300
==============================================================================
--- incubator/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/AlterTableNode.java (original)
+++ incubator/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/AlterTableNode.java Wed Dec 15 19:33:34 2004
@@ -341,7 +341,6 @@
TableDescriptor.BASE_TABLE_TYPE,
colInfos,
conActions,
- null, null, null, null, null, null,
lockGranularity,
compressTable,
behavior,
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=116300&p1=incubator/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/GenericConstantActionFactory.java&r1=116299&p2=incubator/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/GenericConstantActionFactory.java&r2=116300
==============================================================================
--- 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 Wed Dec 15 19:33:34 2004
@@ -20,8 +20,6 @@
package org.apache.derby.impl.sql.execute;
-import org.apache.derby.iapi.sql.depend.DependableList;
-
import org.apache.derby.iapi.error.StandardException;
import org.apache.derby.iapi.services.context.ContextService;
@@ -36,7 +34,6 @@
import org.apache.derby.iapi.sql.dictionary.ConstraintDescriptorList;
import org.apache.derby.iapi.sql.dictionary.GenericDescriptorList;
import org.apache.derby.iapi.sql.dictionary.IndexRowGenerator;
-import org.apache.derby.iapi.sql.dictionary.ListOfRowLists;
import org.apache.derby.iapi.sql.dictionary.TableDescriptor;
import org.apache.derby.iapi.sql.dictionary.SchemaDescriptor;
@@ -151,11 +148,6 @@
* @param tableType Type of table (e.g., BASE).
* @param columnInfo Information on all the columns in the table.
* @param constraintActions ConstraintConstantAction[] for constraints
- * @param stageTokens Compiled array of versioned metadata tokens.
- * @param deleteRowLists lists of tuples to be deleted from Publication catalogs.
- * @param insertRowLists lists of tuples to be inserted into Publication catalogs.
- * @param publicationIDs IDs of publications which must be altered
- * @param dependableLists List, per publication, of objects that this publication depends on.
* @param lockGranularity The lock granularity.
* @param compressTable Whether or not this is a compress table
* @param behavior drop behavior of dropping column
@@ -172,13 +164,6 @@
ColumnInfo[] columnInfo,
ConstraintConstantAction[] constraintActions,
- Object[] stageControl,
- Object[] ddlList,
- ListOfRowLists deleteRowLists,
- ListOfRowLists insertRowLists,
-
- UUID[] publicationIDs,
- DependableList[] dependableLists,
char lockGranularity,
boolean compressTable,
int behavior,
@@ -186,7 +171,6 @@
boolean truncateTable
)
{
- // the replication arguments should be null
return new AlterTableConstantAction( sd, tableName, tableId, tableConglomerateId,
tableType, columnInfo, constraintActions,
lockGranularity, compressTable,