Skip to content

Instantly share code, notes, and snippets.

@localhots
Created June 20, 2014 12:09
Show Gist options
  • Select an option

  • Save localhots/7ecfced53136acfa7fc5 to your computer and use it in GitHub Desktop.

Select an option

Save localhots/7ecfced53136acfa7fc5 to your computer and use it in GitHub Desktop.
create procedure `suicide`(arg int)
begin
if arg = 1 then
select id, "GIMMEPID" from information_schema.processlist
where info like "%GIMMEPID%" limit 1 into @pid, @_;
select "BYE!";
kill @pid;
end if;
select 'FINISHED!';
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment