Re: Novel scenario of trigger mutation - take a look

From: Lawrence James <james.lawrence_at_epamail.epa.gov>
Date: 1996/01/25
Message-ID: <james.lawrence.152.00094F2F_at_epamail.epa.gov>#1/1


In article <4d99dt$inb_at_gaia.cc.gatech.edu> badri_at_cc.gatech.edu (badri) writes:
>From: badri_at_cc.gatech.edu (badri)
>Subject: Novel scenario of trigger mutation - take a look
>Date: 13 Jan 1996 16:49:49 -0500

>Hi:
 

> It is the favorite mutation question of triggers. I
>know the cause of the error, only I cannot figure out why I am
>violating it!
 

> I have a before insert or update trigger that does a
>select on the same table on which the trigger is fired from. I
>thought that I cannot update/do some action that causes my trigger
>to fire again - trigger mutation is only caused by multiple firing
>of the same trigger. Will select on the same table (same row included
> or not included) also cause mutation? I am baffled!

<snip>

The table being inserted or updated is the mutating table. You cannot select from it because it's state is unknown to your transaction. In other words Oracle does not know what the final effects on the table your update/insert will have and cannot determine how it may affect the select you are trying to do now. Basic consistency problem.

Lawrence..... Received on Thu Jan 25 1996 - 00:00:00 CET

Original text of this message