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 km...@apache.org on 2011/06/29 18:39:07 UTC
svn commit: r1141157 -
/db/derby/code/branches/10.1/java/engine/org/apache/derby/impl/sql/catalog/DataDictionaryImpl.java
Author: kmarsden
Date: Wed Jun 29 16:39:07 2011
New Revision: 1141157
URL: http://svn.apache.org/viewvc?rev=1141157&view=rev
Log:
DERBY-5289 Unable to boot 10.5.1.1 database - fails during soft/hard upgrade process for a new version number while trying to drop jdbc metadata
merged 1140812 from 10.3 branch.
For 10.1 the fix for this issue is the relevant part of the DERBY-3870 fix contributed by Knut and separated out by Mamta. Tests were not merged for 10.1
Modified:
db/derby/code/branches/10.1/java/engine/org/apache/derby/impl/sql/catalog/DataDictionaryImpl.java
Modified: db/derby/code/branches/10.1/java/engine/org/apache/derby/impl/sql/catalog/DataDictionaryImpl.java
URL: http://svn.apache.org/viewvc/db/derby/code/branches/10.1/java/engine/org/apache/derby/impl/sql/catalog/DataDictionaryImpl.java?rev=1141157&r1=1141156&r2=1141157&view=diff
==============================================================================
--- db/derby/code/branches/10.1/java/engine/org/apache/derby/impl/sql/catalog/DataDictionaryImpl.java (original)
+++ db/derby/code/branches/10.1/java/engine/org/apache/derby/impl/sql/catalog/DataDictionaryImpl.java Wed Jun 29 16:39:07 2011
@@ -3266,8 +3266,24 @@ public final class DataDictionaryImpl
TabInfo ti = getNonCoreTI(SYSSTATEMENTS_CATALOG_NUM);
List list = newSList();
+ // DERBY-5289 uses partial fix from
+ // DERBY-3870: The compiled plan may not be possible to deserialize
+ // during upgrade. Skip the column that contains the compiled plan to
+ // prevent deserialization errors when reading the rows. We don't care
+ // about the value in that column, since this method is only called
+ // when we want to drop or invalidate rows in SYSSTATEMENTS.
+ FormatableBitSet cols = new FormatableBitSet(
+ ti.getCatalogRowFactory().getHeapColumnCount());
+ for (int i = 0; i < cols.size(); i++) {
+ if (i + 1 == SYSSTATEMENTSRowFactory.SYSSTATEMENTS_CONSTANTSTATE) {
+ cols.clear(i);
+ } else {
+ cols.set(i);
+ }
+ }
getDescriptorViaHeap(
+ cols,
(ScanQualifier[][]) null,
ti,
(TupleDescriptor) null,
@@ -3322,6 +3338,7 @@ public final class DataDictionaryImpl
GenericDescriptorList list = new GenericDescriptorList();
getDescriptorViaHeap(
+ null,
(ScanQualifier[][]) null,
ti,
(TupleDescriptor) null,
@@ -5105,7 +5122,7 @@ public final class DataDictionaryImpl
false);
ConglomerateDescriptorList cdl = new ConglomerateDescriptorList();
- getDescriptorViaHeap(scanQualifier,
+ getDescriptorViaHeap(null, scanQualifier,
ti,
null,
cdl);
@@ -7286,6 +7303,7 @@ public final class DataDictionaryImpl
* @exception StandardException Thrown on error
*/
protected TupleDescriptor getDescriptorViaHeap(
+ FormatableBitSet columns,
ScanQualifier [][] scanQualifiers,
TabInfo ti,
TupleDescriptor parentTupleDescriptor,
@@ -7313,7 +7331,7 @@ public final class DataDictionaryImpl
0, // for read
TransactionController.MODE_TABLE,
TransactionController.ISOLATION_REPEATABLE_READ,
- (FormatableBitSet) null, // all fields as objects
+ columns,
(DataValueDescriptor[]) null, // start position - first row
0, // startSearchOperation - none
scanQualifiers, // scanQualifier,