Subject Re: [firebird-support] MySQL Migration Trigger Issue
Author Kurt Federspiel
Thanks for the explanation, Helen.

Is there a way to auto-commit the trigger?

The insert (into data) is coming through an ODBC
connection and appears to auto-commit (or I'm getting
a really good dirty read across several hundred rows).

Kurt.


--- Helen Borrie <helebor@...> wrote:

> At 02:38 AM 30/03/2007, you wrote:
> >Greets.
> >
> >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 ^;
>
> Set term applies to isql and does not become part of
> the trigger
>
> >create trigger T_NEWDATA_UPDATE for DATA
> >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
>
> End of trigger
>
> >^
> >commit^
> >set term ;^
>
> Have you checked whether the trigger is actually
> present?
>
> 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
>




____________________________________________________________________________________
Now that's room service! Choose from over 150,000 hotels
in 45,000 destinations on Yahoo! Travel to find your fit.
http://farechase.yahoo.com/promo-generic-14795097