Created
April 17, 2014 14:44
-
-
Save yfuruyama/10988909 to your computer and use it in GitHub Desktop.
[InnoDB] check if current thread is in transaction
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 PROCEDURE intrx() | |
| BEGIN | |
| SELECT COUNT(*) as in_trx FROM information_schema.innodb_trx WHERE trx_mysql_thread_id = (SELECT connection_id()); | |
| END; | |
| // | |
| DELIMITER ; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment