2

I'm trying to create TRIGGERS in vitess.io Database. (Distributed MySQL)

I got the following errors :

CREATE TRIGGER insert_guid BEFORE INSERT ON trx FOR EACH ROW SET NEW.sign = UUID();
MySQL a retourné : vtgate: http:/xxxxxx:15000/: syntax error at position 27 near 'insert_guid'

Any feedback would be much appreciated.

Kind regards, Alex

aorfevre
  • 5,034
  • 3
  • 21
  • 51

1 Answers1

0

You can apply these directly to the mysql.

Sugu Sougoumarane
  • 406
  • 1
  • 3
  • 7
  • How ? Could you please develop your thoughts N – aorfevre Sep 28 '20 at 08:40
  • Sugu Sougoumarane, I tried to even build my vitess from opensource on GKE as I was using it on Planetscale. Would be keen to help me find the way to define triggers. It is really blocking us in our progress. Thank you a lot – aorfevre Sep 28 '20 at 13:33
  • Looks like you're using the operator, which doesn't let you access mysql directly. You can try issuing the DDL using vtctlclient ExecuteFetchAsDba command. – Sugu Sougoumarane Oct 04 '20 at 23:06