MySQL Forums
Forum List  »  Replication

Re: Materialized view on mysql replica.
Posted by: Peter Brawley
Date: November 30, 2020 03:09PM

Something like this?

drop trigger if exists ttry;
delimiter go
create trigger ttry before insert on test for each row
begin
  if exists( 
             select table_name from information_schema.tables 
             where table_name='myspecialtable' 
           )
    then
    update myspecialtable set thiscol='yes';
  end if;
end;
go
delimiter ;

Options: ReplyQuote


Subject
Views
Written By
Posted
147
November 30, 2020 01:31PM
Re: Materialized view on mysql replica.
63
November 30, 2020 03:09PM


Sorry, only registered users may post in this forum.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.