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 ka...@apache.org on 2011/08/23 11:35:43 UTC
svn commit: r1160597 -
/db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/FromBaseTable.java
Author: kahatlen
Date: Tue Aug 23 09:35:43 2011
New Revision: 1160597
URL: http://svn.apache.org/viewvc?rev=1160597&view=rev
Log:
DERBY-4275: Query executions fail when compressing a table using SYSCS_UTIL.SYSCS_COMPRESS_TABLE
Fail in a controlled fashion (StandardException) if the conglomerate
disappears while binding the FromBaseTable. This used to cause a
NullPointerException.
Modified:
db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/FromBaseTable.java
Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/FromBaseTable.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/FromBaseTable.java?rev=1160597&r1=1160596&r2=1160597&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/FromBaseTable.java (original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/FromBaseTable.java Tue Aug 23 09:35:43 2011
@@ -2346,6 +2346,14 @@ public class FromBaseTable extends FromT
tableDescriptor.getHeapConglomerateId()
);
+ // Bail out if the descriptor couldn't be found. The conglomerate
+ // probably doesn't exist anymore.
+ if (baseConglomerateDescriptor == null) {
+ throw StandardException.newException(
+ SQLState.STORE_CONGLOMERATE_DOES_NOT_EXIST,
+ new Long(tableDescriptor.getHeapConglomerateId()));
+ }
+
/* Build the 0-based array of base column names. */
columnNames = resultColumns.getColumnNames();