Hi Everyone!
I work for a company who's data is stored in the mysql database. The company has many apps which connected to the standalone mysql db in the past, and since the number of apps is growing, the mysql db couldn't properly handle the huge load, that is why we decided to use Galera Cluster.
We have been using Galera for two weeks now and I am glad to have it. It works good, the load is balanced now to tree mysql nodes.
The only thing what worries me is the database triggers. One part of the app relies on the database triggers.
My trigger:
CREATE DEFINER=`root`@`%` TRIGGER order_UPDATE_trigger
AFTER UPDATE ON order
FOR EACH ROW
BEGIN
DECLARE id CHAR(20);
DECLARE event varchar(255);
IF (NEW.enabled > 0 OR OLD.enabled > 0) THEN
SET id=NEW.id;
SET event = concat("DB:","order :", "update :", id);
INSERT IGNORE INTO order_events set event = event;
END IF;
END
It should trigger an event (put a record into the order_event table whenever the order table has changed).
My experience:
Sometimes (there is no rule when), when I change order table (and enabled field is greater than 0), no event is triggered, then suddenly triggers starts to work properly.
Is there any specific configuration in Galera to database triggers? Is there any limitations/known issues about triggers in Galera-mysql cluster?
Thanks in advance,
Karoly