MYSQL trigger error at line -


i'm trying triggers in mysql, got error "you have sql syntax error @ line 3". here code used,

use maas; create trigger dummy_trigger after insert on dummy each row begin     declare cmd varchar(255);     declare result integer(10);     set cmd = concat('python /home/yogaraj/for_sql.py');     set result = sys_exec(cmd); end; 

here error get,

error code: 1064. have error in sql syntax; check manual corresponds mysql server version right syntax use near '' @ line 3 

p.s: i'm trying execute python file located in home directory. i'm using mysql workbench.

if use sql editor code have specify delimiter inner commands of create trigger code don't parsed individual statements.

however can use trigger pane in table editor create trigger without decoration:

enter image description here

the blue dot left in gutter shows statement ok.


Comments

Popular posts from this blog

get url and add instance to a model with prefilled foreign key :django admin -

css - Make div keyboard-scrollable in jQuery Mobile? -

ruby on rails - Seeing duplicate requests handled with Unicorn -