Created
December 11, 2015 10:34
-
-
Save tdomarkas/e0dd7b1039b4c482bc83 to your computer and use it in GitHub Desktop.
Interrupts a MySQL query
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
DELIMITER $$ | |
CREATE FUNCTION InterruptQuery(connection_id INT) RETURNS INT DETERMINISTIC | |
BEGIN | |
KILL QUERY connection_id; | |
RETURN 0; | |
END | |
$$ | |
SELECT InterruptQuery(CONNECTION_ID()) $$ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment