MySQL Forums
Forum List  »  Stored Procedures

Understanding SIGINT, KILL, and DECLARE HANDLER
Posted by: Sam Sun
Date: October 12, 2022 01:31AM

Hello,

I'm reading the documentation for MySQL 5.7 and I would like to know how to write a Stored Procedure that gracefully terminates when requested by the user.

It seems like CTRL-C or SIGINT only kills the statements on the client end, and the statements continue to execute server side.

How does the KILL command affect a stored procedure that is mid-transaction?
Does it trigger the DECLARE HANDLER? If so, with what SQLSTATE?

Thank you!

Options: ReplyQuote


Subject
Views
Written By
Posted
Understanding SIGINT, KILL, and DECLARE HANDLER
289
October 12, 2022 01:31AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.