in reply to Re: perl script & mysql after insert trigger
in thread perl script & mysql after insert trigger

I see.

I went around the problem in my usual proctology-like way.

instead of:

SET @exec_var = sys_exec(CONCAT('/usr/bin/perl /home/vxp/veng/bin/emai +l_retrieve.pl ', NEW.id));
I now have:
SET @exec_var = sys_exec(CONCAT('/usr/bin/perl /home/vxp/veng/bin/emai +l_retrieve.pl ', NEW.id, ' &'));

So the trigger places my script in the background now ("&"). That lets it "return" immedeately, mysql finishes the commit, and the script gets its values.

It's a through-the-ass solution but it seems to work for my purposes :)