Take the 2-minute tour ×
Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. It's 100% free, no registration required.

I am trying to experiment a bit with the isolation level of MySQL in a test environment.
I do the following:

mysql> set @@session.tx_isolation='READ-UNCOMMITED';
ERROR 1231 (42000): Variable 'tx_isolation' can't be set to the value of 'READ-UNCOMMITED'

This also fails:

mysql> update information_schema.session_variables set variable_value='READ-UNCOMMITED' where variable_name='TX_ISOLATION';
ERROR 1044 (42000): Access denied for user 'root'@'localhost' to database 'information_schema' 

What am I doing wrong here? I am root. So it should not be a rights issue.

share|improve this question

1 Answer 1

up vote 5 down vote accepted

You need to try

SET tx_isolation = 'READ-UNCOMMITTED';

or

SET SESSION tx_isolation = 'READ-UNCOMMITTED';

You could also declare it at the start of the transaction

SET TRANSACTION ISOLATION LEVEL READ UNCOMMITTED;

Give it a Try !!!

CAVEAT

Please note that you misspelled READ-UNCOMMITED (Missing T). It should be READ-UNCOMMITTED

You cannot change tx_isolation in the INFORMATION_SCHEMA database because it is an in-memory read-only database.

share|improve this answer
3  
+1 for finding the spelling mistake. Nevertheless set @@session.tx_isolation='READ-UNCOMMITTED' is a valid statement. –  Shlomi Noach Sep 29 '13 at 13:36
    
@ShlomiNoach you are right. That set is the type of syntax used in the header of mysqldumps. –  RolandoMySQLDBA Sep 30 '13 at 20:00

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.