Subject | Re: [firebird-support] MySQL Migration Trigger Issue |
---|---|
Author | Helen Borrie |
Post date | 2007-03-29T22:04:50Z |
At 02:38 AM 30/03/2007, you wrote:
Are you checking the effects AFTER the transaction has committed and
in a new transaction? For example, if you are watching new_data in a
different transaction, you won't see the effects in that
transaction. You would need to commit the transaction in which the
trigger ran AND the transaction in which you were watching new_data,
before you would see the effects in new_data.
./heLen
>Greets.Set term applies to isql and does not become part of the trigger
>
>I have a table that is a data log of sensors and a
>trigger does an update to keep track of the last value
>only. That trigger is not working in FB.
>
>The SQL for the trigger is below. The only difference
>(so far) between MySQL and FB is the delimeter. For
>example:
>
>DELIMETER ^; --MySQL Version
>set term ^; --FB Version
>
>I verified that the MAC field IS currently populated,
>the DateTime_Stamp is set to three days ago, and all
>other fields are NULL, but there is still no update.
>
>Any suggestions??
>
>set term ^;
>create trigger T_NEWDATA_UPDATE for DATAEnd of trigger
>active AFTER update as
>BEGIN
> UPDATE new_data set
> A1=NEW.A1,
> A2=NEW.A2,
> Temp=NEW.Temp,
> DateTime_Stamp=NEW.DateTime_Stamp
> WHERE MAC=NEW.MAC
> AND DustTime_Stamp<=NEW.DateTime_Stamp;
>end
>^Have you checked whether the trigger is actually present?
>commit^
>set term ;^
Are you checking the effects AFTER the transaction has committed and
in a new transaction? For example, if you are watching new_data in a
different transaction, you won't see the effects in that
transaction. You would need to commit the transaction in which the
trigger ran AND the transaction in which you were watching new_data,
before you would see the effects in new_data.
./heLen