> > I'm evaluating MySQL 5.0.3 alpha to verify to which extent
> I can migrate an
> > extisting Oracle database to MySql. Now as I have to use
> "complex" triggers,
> > I wonder if there is already some developing plans and
> estimated timeframes
> > about when it will be allowed to make generic queries or call other
> > procedures within triggers.
> > Thanks in advance and best regards,
>
> Could you illustrate your point with an example ?
> One "complex" trigger of yours that doesn't work in 5.0.4.
>
Hello,
one such case is as follows:
I have a table A containing some data and a table B which has to be kept
synchronized with data inserted in A. One of the triggers I would implement
is:
CREATE TRIGGER tr_A_Delete
BEFORE DELETE ON A
FOR EACH ROW
BEGIN
DELETE FROM B WHERE B.idA = OLD.id;
END;
Another case is to lock a table while inserting data on another table.
Indeed while I'm investigating alternate solutions to my specific needs
(table B is entirely calculated and it is used to speedup queries), it's
typical to find a lot of non-trivial cases where trigger should deal with
any entity in the database.
My question was just to get an idea about how the development of triggers
and stored procs. is going, both in the SQL engine and as C API, as I
understand that the support for them has just started. In our project we're
evaluating MySql as a possible open source candidate to put beside our
Oracle implementation, and I believe that such a task is now (or will be
soon) feasible with MySql 5.
Thanks for your interest,
regards,
Giuseppe