db-derby-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kahat...@apache.org
Subject svn commit: r1160597 - /db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/FromBaseTable.java
Date Tue, 23 Aug 2011 09:35:43 GMT
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();
 



Mime
View raw message