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 mi...@apache.org on 2007/04/12 18:58:33 UTC
svn commit: r528033 [2/2] - in /db/derby/code/trunk/java:
engine/org/apache/derby/iapi/services/io/ engine/org/apache/derby/iapi/sql/
engine/org/apache/derby/iapi/sql/dictionary/
engine/org/apache/derby/iapi/store/access/ engine/org/apache/derby/iapi/s...
Propchange: db/derby/code/trunk/java/engine/org/apache/derby/impl/store/access/btree/index/B2I_v10_2.java
------------------------------------------------------------------------------
svn:eol-style = native
Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/store/access/conglomerate/ConglomerateUtil.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/impl/store/access/conglomerate/ConglomerateUtil.java?view=diff&rev=528033&r1=528032&r2=528033
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/store/access/conglomerate/ConglomerateUtil.java (original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/store/access/conglomerate/ConglomerateUtil.java Thu Apr 12 09:58:30 2007
@@ -24,16 +24,20 @@
import org.apache.derby.iapi.reference.Property;
import org.apache.derby.iapi.services.sanity.SanityManager;
+import org.apache.derby.iapi.services.io.CompressedNumber;
import org.apache.derby.iapi.services.io.Formatable;
import org.apache.derby.iapi.services.io.FormatIdUtil;
+import org.apache.derby.iapi.store.access.ColumnOrdering;
import org.apache.derby.iapi.store.access.RowUtil;
+
import org.apache.derby.iapi.store.raw.FetchDescriptor;
import org.apache.derby.iapi.store.raw.Page;
import org.apache.derby.iapi.store.raw.RawStoreFactory;
import org.apache.derby.iapi.store.raw.RecordHandle;
import org.apache.derby.iapi.types.DataValueDescriptor;
+import org.apache.derby.iapi.types.StringDataValue;
import java.io.IOException;
import java.io.ObjectInput;
@@ -186,7 +190,7 @@
* Write a format id array to a stream.
* <p>
*
- * @param format_id_array The number of format ids to read.
+ * @param format_id_array The array of format ids to write.
* @param out The stream to write the array of format id's to.
*
* @exception IOException Thown on write error.
@@ -201,6 +205,137 @@
FormatIdUtil.writeFormatIdInteger(out, format_id_array[i]);
}
}
+
+ /**
+ * Given an array of columnOrderings, return an array of collation ids.
+ * <p>
+ * If input array is null, produce a default collation_id array of all
+ * StringDataValue.COLLATION_TYPE_UCS_BASIC values.
+ *
+ * @return An array of collation id's describing the input array of objects.
+ *
+ * @param template a row.
+ *
+ **/
+ public static int[] createCollationIds(
+ int sizeof_ids,
+ int[] collationIds)
+ {
+ int[] collation_ids = new int[sizeof_ids];
+ if (collationIds != null)
+ {
+ if (SanityManager.DEBUG)
+ {
+ if (sizeof_ids != collationIds.length)
+ {
+ SanityManager.THROWASSERT(
+ "sizeof_ids = " + sizeof_ids +
+ ";collationIds.length = " + collationIds.length);
+ }
+ }
+ System.arraycopy(
+ collationIds, 0, collation_ids, 0, collationIds.length);
+ }
+ else
+ {
+ for (int i = 0; i < collation_ids.length; i++)
+ {
+ collation_ids[i] = StringDataValue.COLLATION_TYPE_UCS_BASIC;
+ }
+ }
+
+ return(collation_ids);
+ }
+
+ /**
+ * Write array of collation id's as a sparse array.
+ * <p>
+ * The format only writes out those array entries which are not
+ * StringDataValue.COLLATION_TYPE_UCS_BASIC. The sparse array
+ * first writes the number of entries as a compressed int. And
+ * then for each non-COLLATION_TYPE_UCS_BASIC, it writes out a
+ * pair of compressed ints:
+ *
+ * (array offset, array entry value)
+ *
+ * @param collation_id_array The array of collation ids to write.
+ * @param out The stream to write the collation id's to.
+ *
+ * @exception IOException Thown on write error.
+ **/
+ public static void writeCollationIdArray(
+ int[] collation_id_array,
+ ObjectOutput out)
+ throws IOException
+ {
+ // count non COLLATION_TYPE_UCS_BASIC values.
+ int non_collate_val_count = 0;
+ for (int i = 0; i < collation_id_array.length; i++)
+ {
+ if (collation_id_array[i] !=
+ StringDataValue.COLLATION_TYPE_UCS_BASIC)
+ {
+ non_collate_val_count++;
+ }
+ }
+
+ // write number of sparse entries as compressed int
+ CompressedNumber.writeInt(out, non_collate_val_count);
+
+ for (int i = 0; i < collation_id_array.length; i++)
+ {
+ if (collation_id_array[i] !=
+ StringDataValue.COLLATION_TYPE_UCS_BASIC)
+ {
+ // write array index as compressed number
+ CompressedNumber.writeInt(out, i);
+
+ // write array[i] value as compressed number
+ CompressedNumber.writeInt(out, collation_id_array[i]);
+ }
+ }
+ }
+
+ /**
+ * Read "sparse" array of collation id's
+ * <p>
+ * The format to be read first has the number of entries as a compressed
+ * int. And then for each non-COLLATION_TYPE_UCS_BASIC value there is
+ * pair of compressed ints:
+ *
+ * (array offset, array entry value)
+ * <p>
+ * reads the sparse array as written by writeCollationIdArray().
+ *
+ * @param collation_id_array update's only those array entries that have
+ * been set in the sparse array stream.
+ * Those values are set as indicated by reading
+ * the sparse array from the stream.
+ *
+ * @param in The stream to read the collation info from.
+ *
+ **/
+ public static void readCollationIdArray(
+ int[] collation_id_array,
+ ObjectInput in)
+ throws IOException
+ {
+
+ // A sparse array is stored on disk, only
+ // non-COLLATION_TYPE_UCS_BASIC values are stored.
+ // These are stored as pairs of compressed ints:
+ // (array offset, array entry value)
+
+
+ // 1st on disk is number of entries stored as compressed a int
+ int num_compressed_entries = CompressedNumber.readInt(in);
+ for (int i = 0; i < num_compressed_entries; i++)
+ {
+ // values are stored in the stream as pairs: (index, value)
+ int array_index = CompressedNumber.readInt(in);
+ collation_id_array[array_index] = CompressedNumber.readInt(in);
+ }
+ }
/**
** Format a page of data, as access see's it.
Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/store/access/heap/Heap.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/impl/store/access/heap/Heap.java?view=diff&rev=528033&r1=528032&r2=528033
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/store/access/heap/Heap.java (original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/store/access/heap/Heap.java Thu Apr 12 09:58:30 2007
@@ -47,6 +47,7 @@
import org.apache.derby.iapi.store.access.conglomerate.TransactionManager;
import org.apache.derby.iapi.store.access.AccessFactoryGlobals;
+import org.apache.derby.iapi.store.access.ColumnOrdering;
import org.apache.derby.iapi.store.access.ConglomerateController;
import org.apache.derby.iapi.store.access.DynamicCompiledOpenConglomInfo;
import org.apache.derby.iapi.store.access.Qualifier;
@@ -64,6 +65,7 @@
import org.apache.derby.iapi.store.raw.RawStoreFactory;
import org.apache.derby.iapi.types.DataValueDescriptor;
+import org.apache.derby.iapi.types.StringDataValue;
import org.apache.derby.iapi.services.cache.ClassSize;
@@ -73,35 +75,78 @@
import org.apache.derby.impl.store.access.conglomerate.OpenConglomerateScratchSpace;
/**
- * @format_id ACCESS_HEAP_V1_ID
+ * @format_id ACCESS_HEAP_V2_ID
*
* @purpose The tag that describes the on disk representation of the Heap
- * conglomerate object. The Heap conglomerate object is stored in
- * a field of a row in the Conglomerate directory.
+ * conglomerate object. Access contains no "directory" of
+ * conglomerate information. In order to bootstrap opening a file
+ * it encodes the factory that can open the conglomerate in the
+ * conglomerate id itself. There exists a single HeapFactory which
+ * must be able to read all heap format id's.
*
- * @upgrade This format was made obsolete in the kimono release.
+ * This format was used for all Derby database Heap's in version
+ * 10.2 and previous versions.
+ *
+ * @upgrade The format id of this object is currently always read from disk
+ * as the first field of the conglomerate itself. A bootstrap
+ * problem exists as we don't know the format id of the heap
+ * until we are in the "middle" of reading the Heap. Thus the
+ * base Heap implementation must be able to read and write
+ * all formats based on the reading the
+ * "format_of_this_conglomerate".
+ *
+ * soft upgrade to ACCESS_HEAP_V3_ID:
+ * read:
+ * old format is readable by current Heap implementation,
+ * with automatic in memory creation of default collation
+ * id needed by new format. No code other than
+ * readExternal and writeExternal need know about old format.
+ * write:
+ * will never write out new format id in soft upgrade mode.
+ * Code in readExternal and writeExternal handles writing
+ * correct version. Code in the factory handles making
+ * sure new conglomerates use the Heap_v10_2 class to
+ * that will write out old format info.
+ *
+ * hard upgrade to ACCESS_HEAP_V3_ID:
+ * read:
+ * old format is readable by current Heap implementation,
+ * with automatic in memory creation of default collation
+ * id needed by new format.
+ * write:
+ * Only "lazy" upgrade will happen. New format will only
+ * get written for new conglomerate created after the
+ * upgrade. Old conglomerates continue to be handled the
+ * same as soft upgrade.
*
* @disk_layout
+ * format_of_this_conlgomerate(byte[])
* containerid(long)
* segmentid(int)
+ * number_of_columns(int)
+ * array_of_format_ids(byte[][])
**/
/**
- * @format_id ACCESS_HEAP_V2_ID
+ * @format_id ACCESS_HEAP_V3_ID
*
* @purpose The tag that describes the on disk representation of the Heap
* conglomerate object. The Heap conglomerate object is stored in
* a field of a row in the Conglomerate directory.
*
- * @upgrade The format id of this object is currently always read from disk
- * as a separate column in the conglomerate directory. To read
- * A conglomerate object from disk and upgrade it to the current
- * version do the following:
+ * @purpose The tag that describes the on disk representation of the Heap
+ * conglomerate object. Access contains no "directory" of
+ * conglomerate information. In order to bootstrap opening a file
+ * it encodes the factory that can open the conglomerate in the
+ * conglomerate id itself. There exists a single HeapFactory which
+ * must be able to read all heap format id's.
*
- * format_id = get format id from a separate column
- * Upgradable conglom_obj = instantiate empty obj(format_id)
- * read in conglom_obj from disk
- * conglom = conglom_obj.upgradeToCurrent();
+ * This format is used for all Derby database Heap's in versions
+ * subsequent to 10.2. The format is contains first the
+ * ACCESS_HEAP_V2_ID format, followed by a compressed representation
+ * of the collation id's of each column in the heap.
+ *
+ * @upgrade This is the current version, no upgrade necessary.
*
* @disk_layout
* format_of_this_conlgomerate(byte[])
@@ -109,6 +154,7 @@
* segmentid(int)
* number_of_columns(int)
* array_of_format_ids(byte[][])
+ * collation_ids(compressed array of ints)
**/
/**
@@ -118,15 +164,21 @@
**/
-public final class Heap
+public class Heap
extends GenericConglomerate
implements Conglomerate, StaticCompiledOpenConglomInfo
{
+
/*
** Fields of Heap.
*/
+ /**
+ * Format id of the conglomerate.
+ **/
+ protected int conglom_format_id;
+
private ContainerKey id;
/**
@@ -134,6 +186,11 @@
**/
int[] format_ids;
+ /**
+ The array of collation id's for each column in the template.
+ **/
+ protected int[] collation_ids;
+
private static final int BASE_MEMORY_USAGE = ClassSize.estimateBaseFromCatalog( Heap.class);
private static final int CONTAINER_KEY_MEMORY_USAGE = ClassSize.estimateBaseFromCatalog( ContainerKey.class);
@@ -177,7 +234,10 @@
int segmentId,
long input_containerid,
DataValueDescriptor[] template,
+ ColumnOrdering[] columnOrder,
+ int[] collationIds,
Properties properties,
+ int conglom_format_id,
int tmpFlag)
throws StandardException
{
@@ -237,6 +297,14 @@
// conglomerate state.
this.format_ids = ConglomerateUtil.createFormatIds(template);
+ // copy the format id of the conglomerate.
+ this.conglom_format_id = conglom_format_id;
+
+ // get collation ids from input collation ids, store it in the
+ // conglom state.
+ collation_ids =
+ ConglomerateUtil.createCollationIds(
+ format_ids.length, collationIds);
// need to open the container and insert the row. Since we are
// creating it no need to bother with locking since no one can get
@@ -316,13 +384,15 @@
*
* @param column_id The column number to add this column at.
* @param template_column An instance of the column to be added to table.
+ * @param collation_id Collation id of the column added.
*
* @exception StandardException Standard exception policy.
**/
public void addColumn(
TransactionManager xact_manager,
int column_id,
- Storable template_column)
+ Storable template_column,
+ int collation_id)
throws StandardException
{
// need to open the container and update the row containing the
@@ -366,6 +436,15 @@
format_ids[old_format_ids.length] =
template_column.getTypeFormatId();
+ // create a new collation array, and copy old values to it.
+ int[] old_collation_ids = collation_ids;
+ collation_ids = new int[old_collation_ids.length + 1];
+ System.arraycopy(
+ old_collation_ids, 0, collation_ids, 0,
+ old_collation_ids.length);
+
+ // add the new column's collation id.
+ collation_ids[old_collation_ids.length] = collation_id;
// row in slot 0 of heap page 1 which is just a single column with
// the heap entry.
@@ -1016,7 +1095,7 @@
**/
public int getTypeFormatId()
{
- return StoredFormatIds.ACCESS_HEAP_V2_ID;
+ return StoredFormatIds.ACCESS_HEAP_V3_ID;
}
/**
@@ -1044,7 +1123,17 @@
* Store the stored representation of the column value in the stream.
*
**/
- public void writeExternal(ObjectOutput out) throws IOException
+
+ /**
+ * Store the 10.2 format stored representation of column value in stream.
+ * <p>
+ * This routine stores the 10.2 version the Heap, ie. the ACCESS_HEAP_V2_ID
+ * format. It is used by any database which has been created in
+ * 10.2 or a previous release and has not been hard upgraded to a
+ * version subsequent to 10.2.
+ * <p>
+ **/
+ protected void writeExternal_v10_2(ObjectOutput out) throws IOException
{
// write the format id of this conglomerate
@@ -1061,14 +1150,40 @@
}
/**
+ * Store the stored representation of column value in stream.
+ * <p>
+ * This routine uses the current database version to either store the
+ * the 10.2 format (ACCESS_HEAP_V2_ID) or the current format
+ * (ACCESS_HEAP_V3_ID).
+ * <p>
+ **/
+ public void writeExternal(ObjectOutput out) throws IOException
+ {
+ writeExternal_v10_2(out);
+
+ if (conglom_format_id == StoredFormatIds.ACCESS_HEAP_V3_ID)
+ {
+ // Now append sparse array of collation ids
+ ConglomerateUtil.writeCollationIdArray(collation_ids, out);
+ }
+ }
+
+ /**
* Restore the in-memory representation from the stream.
+ * <p>
+ *
+ * @exception ClassNotFoundException Thrown if the stored representation
+ * is serialized and a class named in
+ * the stream could not be found.
*
* @see java.io.Externalizable#readExternal
**/
- public void readExternal(ObjectInput in) throws IOException
- {
+ private final void localReadExternal(ObjectInput in)
+ throws IOException, ClassNotFoundException
+ {
+
// read the format id of this conglomerate.
- FormatIdUtil.readFormatIdInteger(in);
+ conglom_format_id = FormatIdUtil.readFormatIdInteger(in);
int segmentid = in.readInt();
long containerid = in.readLong();
@@ -1080,23 +1195,45 @@
// read the array of format ids.
format_ids = ConglomerateUtil.readFormatIdArray(num_columns, in);
- }
- public void readExternalFromArray(ArrayInputStream in) throws IOException
- {
- // read the format id of this conglomerate.
- FormatIdUtil.readFormatIdInteger(in);
+ // In memory maintain a collation id per column in the template.
+ collation_ids = new int[format_ids.length];
- int segmentid = in.readInt();
- long containerid = in.readLong();
+ // initialize all the entries to COLLATION_TYPE_UCS_BASIC,
+ // and then reset as necessary. For version ACCESS_HEAP_V2_ID,
+ // this is the default and no resetting is necessary.
+ for (int i = 0; i < format_ids.length; i++)
+ collation_ids[i] = StringDataValue.COLLATION_TYPE_UCS_BASIC;
- id = new ContainerKey(segmentid, containerid);
+ if (conglom_format_id == StoredFormatIds.ACCESS_HEAP_V3_ID)
+ {
+ // current format id, read collation info from disk
- // read the number of columns in the heap.
- int num_columns = in.readInt();
+ ConglomerateUtil.readCollationIdArray(collation_ids, in);
+ }
+ else if (conglom_format_id != StoredFormatIds.ACCESS_HEAP_V2_ID)
+ {
+ // Currently only V2 and V3 should be possible in a Derby DB.
+ // Actual work for V2 is handled by default code above, so no
+ // special work is necessary.
- // read the array of format ids.
- format_ids = ConglomerateUtil.readFormatIdArray(num_columns, in);
+ if (SanityManager.DEBUG)
+ {
+ SanityManager.THROWASSERT(
+ "Unexpected format id: " + conglom_format_id);
+ }
+ }
+ }
+
+ public void readExternal(ObjectInput in)
+ throws IOException, ClassNotFoundException
+ {
+ localReadExternal(in);
}
+ public void readExternalFromArray(ArrayInputStream in)
+ throws IOException, ClassNotFoundException
+ {
+ localReadExternal(in);
+ }
}
Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/store/access/heap/HeapConglomerateFactory.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/impl/store/access/heap/HeapConglomerateFactory.java?view=diff&rev=528033&r1=528032&r2=528033
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/store/access/heap/HeapConglomerateFactory.java (original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/store/access/heap/HeapConglomerateFactory.java Thu Apr 12 09:58:30 2007
@@ -40,6 +40,7 @@
import org.apache.derby.iapi.store.raw.ContainerKey;
import org.apache.derby.iapi.store.raw.LockingPolicy;
import org.apache.derby.iapi.store.raw.Page;
+import org.apache.derby.iapi.store.raw.RawStoreFactory;
import org.apache.derby.iapi.store.raw.RecordHandle;
import org.apache.derby.iapi.types.DataValueDescriptor;
@@ -63,8 +64,6 @@
public class HeapConglomerateFactory implements ConglomerateFactory, ModuleControl, ModuleSupportable
{
- // RESOLVE (mikem) (STO062)
- // The heap implementation id should be "heap table".
private static final String IMPLEMENTATIONID = "heap";
private static final String FORMATUUIDSTRING = "D2976090-D9F5-11d0-B54D-00A024BF8878";
private UUID formatUUID;
@@ -164,16 +163,40 @@
int segment,
long input_containerid,
DataValueDescriptor[] template,
- ColumnOrdering[] columnOrder, //only meant for BTree type congloms
+ ColumnOrdering[] columnOrder,
+ int[] collationIds,
Properties properties,
int temporaryFlag)
throws StandardException
{
- //parent.register(heap);
- Heap heap = new Heap();
+ Heap heap = null;
+
+
+ if (xact_mgr.checkVersion(
+ RawStoreFactory.DERBY_STORE_MAJOR_VERSION_10,
+ RawStoreFactory.DERBY_STORE_MINOR_VERSION_3,
+ null))
+ {
+ // on disk databases with version higher than 10.2 should use
+ // current disk format B2I. This includes new databases or
+ // hard upgraded databases.
+ heap = new Heap();
+ }
+ else
+ {
+ // Old databases that are running in new versions of the software,
+ // but are running in soft upgrade mode at release level 10.2
+ // and before should use the old B2I version. This version will
+ // continue to write metadata that can be read by 10.2 and previous
+ // versions.
+ heap = new Heap_v10_2();
+ }
+
heap.create(
xact_mgr.getRawStoreXact(), segment, input_containerid,
- template, properties, temporaryFlag);
+ template, columnOrder, collationIds, properties,
+ heap.getTypeFormatId(),
+ temporaryFlag);
return heap;
}
Added: db/derby/code/trunk/java/engine/org/apache/derby/impl/store/access/heap/Heap_v10_2.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/impl/store/access/heap/Heap_v10_2.java?view=auto&rev=528033
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/store/access/heap/Heap_v10_2.java (added)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/store/access/heap/Heap_v10_2.java Thu Apr 12 09:58:30 2007
@@ -0,0 +1,108 @@
+/*
+
+ Derby - Class org.apache.derby.impl.store.access.btree.index.B2I
+
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to you 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
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ 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.impl.store.access.heap;
+
+
+import org.apache.derby.iapi.services.io.StoredFormatIds;
+
+import java.io.IOException;
+import java.io.ObjectOutput;
+import java.io.ObjectInput;
+
+import java.lang.ClassNotFoundException;
+
+
+/**
+ * @format_id ACCESS_HEAP_V2_ID
+ *
+ * @purpose The tag that describes the on disk representation of the Heap
+ * conglomerate object. The Heap conglomerate object is stored in
+ * a field of a row in the Conglomerate directory.
+ *
+ * @upgrade The format id of this object is currently always read from disk
+ * as a separate column in the conglomerate directory. To read
+ * A conglomerate object from disk and upgrade it to the current
+ * version do the following:
+ *
+ * format_id = get format id from a separate column
+ * Upgradable conglom_obj = instantiate empty obj(format_id)
+ * read in conglom_obj from disk
+ * conglom = conglom_obj.upgradeToCurrent();
+ *
+ * @disk_layout
+ * format_of_this_conlgomerate(byte[])
+ * containerid(long)
+ * segmentid(int)
+ * number_of_columns(int)
+ * array_of_format_ids(byte[][])
+ **/
+
+
+
+public class Heap_v10_2 extends Heap
+{
+
+ /**
+ * No arg constructor, required by Formatable.
+ **/
+ public Heap_v10_2()
+ {
+ super();
+ }
+
+
+ /**************************************************************************
+ * Public Methods required by Storable interface, implies
+ * Externalizable, TypedFormat:
+ **************************************************************************
+ */
+
+ /**
+ * Return my format identifier.
+ * <p>
+ * This identifier was used for Heap in all Derby versions prior to and
+ * including 10.2. Databases hard upgraded to a version subsequent
+ * to 10.2 will write the new format, see Heap. Databases created in
+ * a version subsequent to 10.2 will also write the new formate, see
+ * Heap.
+ *
+ * @see org.apache.derby.iapi.services.io.TypedFormat#getTypeFormatId
+ **/
+ public int getTypeFormatId()
+ {
+ return StoredFormatIds.ACCESS_HEAP_V3_ID;
+ }
+
+ /**
+ * Store the stored representation of the column value in the
+ * stream.
+ * <p>
+ * For more detailed description of the format see documentation
+ * at top of file.
+ *
+ * @see java.io.Externalizable#writeExternal
+ **/
+ public void writeExternal(ObjectOutput out) throws IOException
+ {
+ super.writeExternal_v10_2(out);
+ }
+}
Propchange: db/derby/code/trunk/java/engine/org/apache/derby/impl/store/access/heap/Heap_v10_2.java
------------------------------------------------------------------------------
svn:eol-style = native
Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/store/raw/RawStore.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/impl/store/raw/RawStore.java?view=diff&rev=528033&r1=528032&r2=528033
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/store/raw/RawStore.java (original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/store/raw/RawStore.java Thu Apr 12 09:58:30 2007
@@ -2080,6 +2080,34 @@
return(dataFactory.getMaxContainerId());
}
+ /**
+ * Check to see if a database has been upgraded to the required
+ * level in order to use a store feature.
+ *
+ * @param requiredMajorVersion required database Engine major version
+ * @param requiredMinorVersion required database Engine minor version
+ * @param feature Non-null to throw an exception, null to
+ * return the state of the version match.
+ *
+ * @return <code> true </code> if the database has been upgraded to
+ * the required level, <code> false </code> otherwise.
+ *
+ * @exception StandardException
+ * if the database is not at the require version
+ * when <code>feature</code> feature is
+ * not <code> null </code>.
+ */
+ public boolean checkVersion(
+ int requiredMajorVersion,
+ int requiredMinorVersion,
+ String feature)
+ throws StandardException
+ {
+ return(
+ logFactory.checkVersion(
+ requiredMajorVersion, requiredMinorVersion, feature));
+ }
+
/*
These methods require Priv Blocks when run under a security manager.
Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/store/raw/data/LoggableAllocActions.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/impl/store/raw/data/LoggableAllocActions.java?view=diff&rev=528033&r1=528032&r2=528033
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/store/raw/data/LoggableAllocActions.java (original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/store/raw/data/LoggableAllocActions.java Thu Apr 12 09:58:30 2007
@@ -120,23 +120,30 @@
int num_pages_truncated)
throws StandardException
{
- Loggable lop = null;
-
- // Derby-606. As part of the fix for Derby-606, negative values can be written to
- // CompressSpace operation Log Records. In order for this fix to be backword
- // compatible, we make sure that the implementation behaves the old way in soft
- // upgrade mode, here. This is achieved by passing null to feature argument.
- if( t.getLogFactory().checkVersion(RawStoreFactory.DERBY_STORE_MAJOR_VERSION_10,
- RawStoreFactory.DERBY_STORE_MINOR_VERSION_3,
- null) )
- {
- lop = new CompressSpacePageOperation(
- (AllocPage)allocPage, new_highest_page, num_pages_truncated);
- } else {
- lop = new CompressSpacePageOperation10_2(
- (AllocPage)allocPage, new_highest_page, num_pages_truncated);
- }
- allocPage.preDirty();
+ Loggable lop = null;
+
+ // DERBY-606. As part of the fix for DERBY-606, negative values can be
+ // written to CompressSpace operation Log Records. In order for this
+ // fix to be backword compatible, we make sure that the implementation
+ // behaves the old way in soft upgrade mode, here. This is achieved by
+ // passing null to feature argument.
+ if( t.getLogFactory().checkVersion(
+ RawStoreFactory.DERBY_STORE_MAJOR_VERSION_10,
+ RawStoreFactory.DERBY_STORE_MINOR_VERSION_3,
+ null) )
+ {
+ lop =
+ new CompressSpacePageOperation(
+ (AllocPage)allocPage,
+ new_highest_page,
+ num_pages_truncated);
+ } else {
+ lop = new CompressSpacePageOperation10_2(
+ (AllocPage)allocPage,
+ new_highest_page,
+ num_pages_truncated);
+ }
+ allocPage.preDirty();
t.logAndDo(lop);
}
Modified: db/derby/code/trunk/java/storeless/org/apache/derby/impl/storeless/NoOpTransaction.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/storeless/org/apache/derby/impl/storeless/NoOpTransaction.java?view=diff&rev=528033&r1=528032&r2=528033
==============================================================================
--- db/derby/code/trunk/java/storeless/org/apache/derby/impl/storeless/NoOpTransaction.java (original)
+++ db/derby/code/trunk/java/storeless/org/apache/derby/impl/storeless/NoOpTransaction.java Thu Apr 12 09:58:30 2007
@@ -68,6 +68,7 @@
public long createConglomerate(String implementation,
DataValueDescriptor[] template, ColumnOrdering[] columnOrder,
+ int[] collation_ids,
Properties properties, int temporaryFlag) throws StandardException {
// TODO Auto-generated method stub
return 0;
@@ -75,6 +76,7 @@
public long createAndLoadConglomerate(String implementation,
DataValueDescriptor[] template, ColumnOrdering[] columnOrder,
+ int[] collation_ids,
Properties properties, int temporaryFlag,
RowLocationRetRowSource rowSource, long[] rowCount)
throws StandardException {
@@ -84,7 +86,9 @@
public long recreateAndLoadConglomerate(String implementation,
boolean recreate_ifempty, DataValueDescriptor[] template,
- ColumnOrdering[] columnOrder, Properties properties,
+ ColumnOrdering[] columnOrder,
+ int[] collation_ids,
+ Properties properties,
int temporaryFlag, long orig_conglomId,
RowLocationRetRowSource rowSource, long[] rowCount)
throws StandardException {
@@ -93,7 +97,7 @@
}
public void addColumnToConglomerate(long conglomId, int column_id,
- Storable template_column) throws StandardException {
+ Storable template_column, int collation_id) throws StandardException {
// TODO Auto-generated method stub
}
Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/store/TestDiskHashtable.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/store/TestDiskHashtable.java?view=diff&rev=528033&r1=528032&r2=528033
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/store/TestDiskHashtable.java (original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/store/TestDiskHashtable.java Thu Apr 12 09:58:30 2007
@@ -170,7 +170,15 @@
DataValueDescriptor[][] rows)
throws StandardException
{
- DiskHashtable dht = new DiskHashtable(tc, template, keyCols, removeDups, false);
+ DiskHashtable dht =
+ new DiskHashtable(
+ tc,
+ template,
+ (int[]) null, // default collation
+ keyCols,
+ removeDups,
+ false);
+
boolean[] isDuplicate = new boolean[ rows.length];
boolean[] found = new boolean[ rows.length];
HashMap simpleHash = new HashMap( rows.length);
Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/unitTests/store/T_AccessFactory.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/testing/org/apache/derbyTesting/unitTests/store/T_AccessFactory.java?view=diff&rev=528033&r1=528032&r2=528033
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/unitTests/store/T_AccessFactory.java (original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/unitTests/store/T_AccessFactory.java Thu Apr 12 09:58:30 2007
@@ -27,6 +27,7 @@
import org.apache.derby.iapi.store.access.*;
import org.apache.derby.iapi.types.SQLLongint;
+import org.apache.derby.iapi.types.StringDataValue;
import org.apache.derby.iapi.services.context.ContextManager;
import org.apache.derby.iapi.services.context.ContextService;
@@ -208,6 +209,7 @@
"heap", // create a heap conglomerate
null, // ERROR - Heap requires a template!!!
null, // column sort order not required for heap
+ null, // default collation
null, // default properties
TransactionController.IS_DEFAULT); // not temporary
@@ -225,6 +227,7 @@
"heap", // create a heap conglomerate
template_row.getRowArray(), // 1 column template.
null, // column sort order not required for heap
+ null, // default collation
null, // default properties
TransactionController.IS_DEFAULT); // not temporary
@@ -352,6 +355,7 @@
"heap", // create a heap conglomerate
new T_AccessRow(1).getRowArray(), // 1 column template.
null, // column sort order not required for heap
+ null, // default collation
null, // default properties
TransactionController.IS_DEFAULT); // not temporary
@@ -518,6 +522,7 @@
"heap", // create a heap conglomerate
new T_AccessRow(1).getRowArray(), // 1 SQLInteger() column template.
null, // column sort order not required for heap
+ null, // default collation
null, // default properties
TransactionController.IS_DEFAULT); // not temporary
@@ -914,6 +919,7 @@
"heap", // create a heap conglomerate
new T_AccessRow(1).getRowArray(), // 1 SQLInteger() column template.
null, // column sort order not required for heap
+ null, // default collation
null, // default properties
TransactionController.IS_DEFAULT); // not temporary
@@ -991,6 +997,7 @@
"heap", // create a heap conglomerate
new T_AccessRow(1).getRowArray(), // 1 SQLInteger() column template.
null, // column sort order not required for heap
+ null, // default collation
null, // default properties
TransactionController.IS_DEFAULT); // not temporary
@@ -1047,6 +1054,7 @@
"heap", // create a heap conglomerate
template_row.getRowArray(), // 1 column template.
null, // column sort order not required for heap
+ null, // default collation
prop, // default properties
TransactionController.IS_DEFAULT); // not temporary
// Open the conglomerate.
@@ -1170,6 +1178,7 @@
"heap", // create a heap conglomerate
template_row.getRowArray(), // 1 column template.
null, // column sort order not required for heap
+ null, // default collation
null, // default properties
TransactionController.IS_DEFAULT); // not temporary
// Open the conglomerate.
@@ -1346,7 +1355,8 @@
// now alter the conglomerate, add another int column
- tc.addColumnToConglomerate(conglomid, 1, c1);
+ tc.addColumnToConglomerate(
+ conglomid, 1, c1, StringDataValue.COLLATION_TYPE_UCS_BASIC);
// Open the table after the close done by commit.
cc = tc.openConglomerate(
@@ -1549,6 +1559,7 @@
"heap", // create a heap conglomerate
template_row.getRowArray(), // 1 column template.
null, // column sort order not required for heap
+ null, // default collation
null, // default properties
TransactionController.IS_DEFAULT); // not temporary
// Open the conglomerate.
@@ -1721,6 +1732,7 @@
"heap", // create a heap conglomerate
template_row.getRowArray(), // 1 column template.
null, // column sort order not required for heap
+ null, // default collation
null, // default properties
TransactionController.IS_DEFAULT); // not temporary
// Open the conglomerate.
@@ -1818,6 +1830,7 @@
"heap", // create a heap conglomerate
new T_AccessRow(numcols).getRowArray(), // 1 SQLInteger() column template.
null, // column sort order not required for heap
+ null, // default collation
null, // default properties
TransactionController.IS_DEFAULT); // not temporary
@@ -1936,6 +1949,7 @@
"heap", // create a heap conglomerate
template_row.getRowArray(), // 1 column template.
null, // column sort order not required for heap
+ null, // default collation
null, // default properties
TransactionController.IS_DEFAULT); // not temporary
// Open the conglomerate.
@@ -2017,6 +2031,7 @@
"heap", // create a heap conglomerate
template_row.getRowArray(), // 1 column template.
null, // column sort order not required for heap
+ null, // default collation
null, // default properties
TransactionController.IS_DEFAULT); // not temporary
// Open the conglomerate.
@@ -2509,6 +2524,7 @@
"heap", // create a heap conglomerate
new T_AccessRow(1).getRowArray(), // 1 SQLInteger() column template.
null, // column sort order not required for heap
+ null, // default collation
null, // default properties
temporary ? TransactionController.IS_TEMPORARY : TransactionController.IS_DEFAULT);
@@ -2595,8 +2611,16 @@
baseRow[0] = col0;
// Create a btree secondary index conglomerate.
- long iid = tc.createConglomerate("BTREE", template.getRowArray(), null, indexProps,
- temporary ? TransactionController.IS_TEMPORARY : TransactionController.IS_DEFAULT);
+ long iid =
+ tc.createConglomerate(
+ "BTREE",
+ template.getRowArray(),
+ null,
+ null, // default collation
+ indexProps,
+ temporary ?
+ TransactionController.IS_TEMPORARY :
+ TransactionController.IS_DEFAULT);
// Open the index so we can stuff in index rows.
ConglomerateController cc =
@@ -2704,6 +2728,7 @@
"heap", // create a heap conglomerate
r1.getRowArray(),
null, // column sort order not required for heap
+ null, // default collation
null, // default properties
TransactionController.IS_DEFAULT); // not temporary
@@ -2938,6 +2963,7 @@
"heap", // create a heap conglomerate
new T_AccessRow(1).getRowArray(), // 1 SQLInteger() column template.
null, // column sort order not required for heap
+ null, // default collation
null, // default properties
TransactionController.IS_DEFAULT); // not temporary
@@ -2947,6 +2973,7 @@
"heap", // create a heap conglomerate
new T_AccessRow(1).getRowArray(), // 1 SQLInteger() column template.
null, // column sort order not required for heap
+ null, // default collation
null, // default properties
TransactionController.IS_TEMPORARY);
@@ -3038,6 +3065,7 @@
"heap", // create a heap conglomerate
big_row.getRowArray(),
null, // column sort order not required for heap
+ null, // default collation
null, // default properties
TransactionController.IS_DEFAULT); // not temporary
@@ -3093,6 +3121,7 @@
big_row.getRowArray(),
null, // column sort order not required for heap
null, // default properties
+ null, // default collation
TransactionController.IS_DEFAULT); // not temporary
tc.commit();
@@ -3264,6 +3293,7 @@
"heap", // create a heap conglomerate
template_row.getRowArray(), // 1 column template.
null, // column sort order not required for heap
+ null, // default collation
null, // default properties
TransactionController.IS_DEFAULT); // not temporary
@@ -3972,6 +4002,7 @@
"heap", // create a heap conglomerate
big_row.getRowArray(),
null, // column sort order not required for heap
+ null, // default collation
null, // default properties
TransactionController.IS_DEFAULT); // not temporary
@@ -4085,6 +4116,7 @@
"heap", // create a heap conglomerate
big_row.getRowArray(),
null, // column sort order not required for heap
+ null, // default collation
null, // default properties
TransactionController.IS_DEFAULT); // not temporary
@@ -4207,6 +4239,7 @@
"heap", // create a heap conglomerate
big_row.getRowArray(),
null, // column sort order not required for heap
+ null, // default collation
null, // default properties
TransactionController.IS_DEFAULT); // not temporary
Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/unitTests/store/T_QualifierTest.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/testing/org/apache/derbyTesting/unitTests/store/T_QualifierTest.java?view=diff&rev=528033&r1=528032&r2=528033
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/unitTests/store/T_QualifierTest.java (original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/unitTests/store/T_QualifierTest.java Thu Apr 12 09:58:30 2007
@@ -1163,7 +1163,7 @@
{
base_conglomid =
tc.createConglomerate(
- "heap", base_row, null, null,
+ "heap", base_row, null, null, null,
TransactionController.IS_DEFAULT);
index_row = new T_SecondaryIndexRow();
@@ -1184,6 +1184,7 @@
tc.createConglomerate(
init_conglomerate_type, index_row.getRow(),
null,
+ null,
init_properties,
init_temporary ? TransactionController.IS_TEMPORARY : TransactionController.IS_DEFAULT);
@@ -1209,9 +1210,15 @@
else
{
base_conglomid =
- tc.createConglomerate(init_conglomerate_type, base_row, null,
- init_properties,
- init_temporary ? TransactionController.IS_TEMPORARY : TransactionController.IS_DEFAULT);
+ tc.createConglomerate(
+ init_conglomerate_type,
+ base_row,
+ null, // default order
+ null, // default collation
+ init_properties,
+ init_temporary ?
+ TransactionController.IS_TEMPORARY :
+ TransactionController.IS_DEFAULT);
base_cc =
tc.openConglomerate(
Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/unitTests/store/T_XA.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/testing/org/apache/derbyTesting/unitTests/store/T_XA.java?view=diff&rev=528033&r1=528032&r2=528033
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/unitTests/store/T_XA.java (original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/unitTests/store/T_XA.java Thu Apr 12 09:58:30 2007
@@ -214,6 +214,7 @@
"heap", // create a heap conglomerate
template_row.getRowArray(), // 1 column template.
null, //column sort order - not required for heap
+ null, //default collation
null, // default properties
TransactionController.IS_DEFAULT); // not temporary
@@ -341,6 +342,7 @@
"heap", // create a heap conglomerate
template_row.getRowArray(), // 1 column template.
null, //column sort order - not required for heap
+ null, //default collation
null, // default properties
TransactionController.IS_DEFAULT); // not temporary
@@ -470,6 +472,7 @@
"heap", // create a heap conglomerate
template_row.getRowArray(), // 1 column template.
null, //column sort order - not required for heap
+ null, //default collation
null, // default properties
TransactionController.IS_DEFAULT); // not temporary
@@ -497,6 +500,7 @@
"heap", // create a heap conglomerate
template_row.getRowArray(), // 1 column template.
null, //column sort order - not required for heap
+ null, //default collation
null, // default properties
TransactionController.IS_DEFAULT); // not temporary
@@ -607,6 +611,7 @@
"heap", // create a heap conglomerate
template_row.getRowArray(), // 1 column template.
null, //column sort order - not required for heap
+ null, //default collation
null, // default properties
TransactionController.IS_DEFAULT); // not temporary
@@ -737,6 +742,7 @@
"heap", // create a heap conglomerate
template_row.getRowArray(), // 1 column template.
null, //column sort order - not required for heap
+ null, //default collation
null, // default properties
TransactionController.IS_DEFAULT); // not temporary
@@ -864,6 +870,7 @@
"heap", // create a heap conglomerate
template_row.getRowArray(), // 1 column template.
null, //column sort order - not required for heap
+ null, //default collation
null, // default properties
TransactionController.IS_DEFAULT); // not temporary
@@ -940,6 +947,7 @@
"heap", // create a heap conglomerate
template_row.getRowArray(), // 1 column template.
null, //column sort order - not required for heap
+ null, //default collation
null, // default properties
TransactionController.IS_DEFAULT); // not temporary
@@ -1071,6 +1079,7 @@
"heap", // create a heap conglomerate
template_row.getRowArray(), // 1 column template.
null, //column sort order - not required for heap
+ null, //default collation
null, // default properties
TransactionController.IS_DEFAULT); // not temporary
@@ -1117,6 +1126,7 @@
"heap", // create a heap conglomerate
template_row.getRowArray(), // 1 column template.
null, //column sort order - not required for heap
+ null, //default collation
null, // default properties
TransactionController.IS_DEFAULT); // not temporary
Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/unitTests/store/T_b2i.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/testing/org/apache/derbyTesting/unitTests/store/T_b2i.java?view=diff&rev=528033&r1=528032&r2=528033
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/unitTests/store/T_b2i.java (original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/unitTests/store/T_b2i.java Thu Apr 12 09:58:30 2007
@@ -271,6 +271,7 @@
"heap", // create a heap conglomerate
base_row, // base table template row
null, //column sort order - not required for heap
+ null, //default collation
null, // default properties
TransactionController.IS_DEFAULT);// not temporary
@@ -313,6 +314,7 @@
"BTREE", // create a btree secondary
index_row.getRow(), // index row template
null, //column sort order - default
+ null, //default collation
properties, // properties
TransactionController.IS_DEFAULT); // not temporary
@@ -1323,6 +1325,7 @@
"heap", // create a heap conglomerate
base_row, // base table template row
null, //column sort order - not required for heap
+ null, //default collation
null, // default properties
TransactionController.IS_DEFAULT); // not temporary
@@ -1353,6 +1356,7 @@
"BTREE", // create a btree secondary
index_row.getRow(), // row template
null, //column sort order - default
+ null, //default collation
properties, // properties
TransactionController.IS_DEFAULT); // not temporary
@@ -2341,12 +2345,15 @@
DataValueDescriptor[] base_row = TemplateRow.newU8Row(2);
T_SecondaryIndexRow index_row1 = new T_SecondaryIndexRow();
- long base_conglomid = tc.createConglomerate(
- "heap", // create a heap conglomerate
- base_row, // base table template row
- null, //column sort order - not required for heap
- null, // default properties
- TransactionController.IS_DEFAULT);
+ long base_conglomid =
+ tc.createConglomerate(
+ "heap", // create a heap conglomerate
+ base_row, // base table template row
+ null, //column sort order - not required for heap
+ null, //default collation
+ null, // default properties
+ TransactionController.IS_DEFAULT);
+
// Open the base table
ConglomerateController base_cc =
tc.openConglomerate(
@@ -2378,7 +2385,7 @@
{
testbtree.create(
tm, -1, ContainerHandle.DEFAULT_ASSIGN_ID, index_row1.getRow(),
- null, null, TransactionController.IS_TEMPORARY);
+ null, null, null, TransactionController.IS_TEMPORARY);
throw T_Fail.testFailMsg("bad create succeeded.");
}
@@ -2407,6 +2414,7 @@
"BTREE", // create a btree secondary
index_row1.getRow(), // row template
null, //column sort order - default
+ null, //default collation
properties, // properties
TransactionController.IS_DEFAULT); // not temporary
@@ -2871,6 +2879,7 @@
"heap", // create a heap conglomerate
base_row, // base table template row
null, //column sort order - not required for heap
+ null, //default collation
null, // default properties
TransactionController.IS_DEFAULT);
@@ -2910,6 +2919,7 @@
"BTREE", // create a heap conglomerate
index_row1.getRow(), // 1 column template.
null, //column sort order - default
+ null, //default collation
properties, // default properties
TransactionController.IS_DEFAULT); // not temporary
@@ -3705,6 +3715,7 @@
"heap", // create a heap conglomerate
base_row, // base table template row
null, //column sort order - not required for heap
+ null, //default collation
null, // default properties
TransactionController.IS_DEFAULT); // not temporary
@@ -3743,6 +3754,7 @@
"BTREE", // create a btree secondary
index_row.getRow(), // row template
order, //column sort order - default
+ null, //default collation
properties, // properties
TransactionController.IS_DEFAULT); // not temporary
@@ -4168,6 +4180,7 @@
"heap", // create a heap conglomerate
base_row, // base table template row
null, //column sort order - not required for heap
+ null, //default collation
null, // default properties
TransactionController.IS_DEFAULT); // not temporary
@@ -4206,6 +4219,7 @@
"BTREE", // create a btree secondary
index_row.getRow(), // row template
order, //column sort order - default
+ null, //default collation
properties, // properties
TransactionController.IS_DEFAULT); // not temporary
@@ -4752,6 +4766,7 @@
"heap", // create a heap conglomerate
base_row, // base table template row
null, //column sort order - not required for heap
+ null, //default collation
null, // default properties
TransactionController.IS_DEFAULT); // not temporary
@@ -4790,6 +4805,7 @@
"BTREE", // create a btree secondary
index_row.getRow(), // row template
order, //column sort order - default
+ null, //default collation
properties, // properties
TransactionController.IS_DEFAULT); // not temporary