Re: can not delete data from a table which is queried in a stored procedure

From: Daniel Roy <danielroy10junk_at_hotmail.com>
Date: 17 Jul 2003 08:56:10 -0700
Message-ID: <3722db.0307170756.48e4987_at_posting.google.com>


From Oracle:

ORA-04091 table string.string is mutating, trigger/function may not see it

Cause: A trigger (or a user defined PL/SQL function that is referenced in this statement) attempted to look at (or modify) a table that was in the middle of being modified by the statement which fired it.

Action: Rewrite the trigger (or function) so it does not read that table.

Look in v$lock for any lock on that table. Is the issue still there after you bounced the database?

Daniel

> Hi, folks,
>
> Here is my example of problem,
>
> I have a table called node_tab. The other two tables: edge_tab,
> polyline_tab has foreign key constraints ( cascade on delete) relying
> on node_tab.
>
> In one stored procedure, I have a very simple query working on
> node_tab to return
> coordinates of node.
>
> When I try to delete any row from node_tab, I got error message as
> following:
>
> The headache is when I delete any record from my node table, the
> system returns the following error:
> ORA-04091: table NODE_tab is mutating, trigger/function may not see it
> ORA-06512: at "GEOMETRY_MAP.GETTER_PAK", line 112
> ORA-06512: at "GEOMETRY_MAP.GETTER_PAK", line 143
>
> Then I tried to delete all foreign keys relying on it. It still has
> the same problem. I don't have any trigger in node_tab.
>
> I could not understand what happened to me? Is any idea to help me
> out?
Received on Thu Jul 17 2003 - 17:56:10 CEST

Original text of this message