History | Log In     View a printable version of the current page.  
Issue Details (XML | Word | Printable)

Key: FRG-298
Type: Bug Bug
Status: Open Open
Priority: Minor Minor
Assignee: John V. Sichi
Reporter: Jason Ouellette
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
Farrago

Creating a view on a temporary table causes MDR catalog errors

Created: 03/Oct/07 11:49 AM   Updated: 06/Oct/07 07:41 PM
Component/s: DDL
Affects Version/s: None
Fix Version/s: None


 Description  « Hide
The error is InvalidObjectException - Object with MOFID no longer exists. Run this SQL *twice in a row* to reproduce the error, which occurs on the DROP SCHEMA command.

!set force true
drop schema ddlgen cascade;

CREATE SCHEMA ddlgen;

SET SCHEMA 'ddlgen';

CREATE GLOBAL TEMPORARY TABLE ddlgen.temptab(x char(3) primary key)
DESCRIPTION 'a temp table'
ON COMMIT DELETE ROWS;

CREATE VIEW v
DESCRIPTION 'a view' AS
SELECT * FROM ddlgen.temptab WHERE x IS NOT NULL;

--
Here's a stack dump:

SEVERE: Object with MOFID j:00000000000038EC no longer exists.
Oct 3, 2007 6:19:02 PM FarragoJdbcUtil newSqlException(ex)
FINER: THROW
javax.jmi.reflect.InvalidObjectException: Object with MOFID j:00000000000038EC no longer exists.
        at org.netbeans.mdr.handlers.BaseObjectHandler._getDelegate(BaseObjectHandler.java:353)
        at org.netbeans.mdr.handlers.InstanceHandler.getInstanceDelegate(InstanceHandler.java:48)
        at org.netbeans.mdr.handlers.InstanceHandler._handleGetR(InstanceHandler.java:103)
        at net.sf.farrago.fem.med.FemLocalIndex$Impl.getSpannedClass(Unknown Source)
        at net.sf.farrago.catalog.FarragoCatalogUtil.getIndexTable(FarragoCatalogUtil.java:170)
        at net.sf.farrago.db.FarragoDbSessionIndexMap.onCommit(FarragoDbSessionIndexMap.java:189)
        at net.sf.farrago.db.FarragoDbSession.commitImpl(FarragoDbSession.java:732)
        at net.sf.farrago.db.FarragoDbSession.executeDdl(FarragoDbSession.java:1182)
        at net.sf.farrago.db.FarragoDbSession.prepareImpl(FarragoDbSession.java:1066)
        at net.sf.farrago.db.FarragoDbSession.prepare(FarragoDbSession.java:946)


 All   Comments   Change History      Sort Order: Ascending order - Click to sort in descending order
John V. Sichi - 03/Oct/07 11:51 PM
Nice. Actually, you don't even need the view...just run the select to instantiate the temp table, and you'll get the same error on drop.

John V. Sichi - 06/Oct/07 07:41 PM
After reviewing FarragoDbSessionIndexMap, a proper fix here isn't trivial, since the maps in different sessions all need to be updated as part of the drop. Either that, or the map code needs to be careful to check the repository to see if the object still exists. Either way, extra synchronization is implied. I probably won't fix this unless/until someone is actually using the temp table support.