set transaction isolation level at procedure scope in mysql

3.1k views Asked by At

How DO I set the transaction isolation level at proc level in Mysql. Do I have to use session or any other parameter. Right now we have to write at the Select query level. Sql server provides that you can write it once at the procedure level and it will be applicable for all the statements.

SET TRANSACTION ISOLATION LEVEL READ UNCOMMITTED;
1

There are 1 answers

2
Dan Collins On BEST ANSWER

I do not believe you can do this in MySQL. You can do it in SQL Server for certain flags like Transaction Isolation Level but not for things like ANSI_NULLS - IIRC ANSI_NULLS must be set at the time of procedure creation. In MySQL I believe you have to set a connection, set the TIL on the connection and then execute the procedure on that connection.