title: WRITE over READ in mysql
body: <p>I am new with mysql transaction serializable. When I tried to update a row of a table while other concurrent sessions are reading it, the update transaction has to wait until the read transactions complete. Is there any way to allow the write transaction to proceed forward (then the read transactions should fail to commit)?</p>
  
  <p>Here is my test to verify the property above:</p>
  
  <p>Session 1:</p>
  
  <pre><code>set transaction isolation level serializable;
  create database locktest;
  use locktest;
  create table locktest(id int not null primary key auto_increment, text varchar(100));
  insert into locktest(text) values('text1');
  
  start transaction;
  select * from locktest where id=1;
  </code></pre>
  
  <p>Session 2:</p>
  
  <pre><code>use locktest;
  update locktest set text='new_text2' where id=1;  -- it gets stuck at this point and only proceed forward when I 'commit;' in session 1
  </code></pre>
  
  <p>What I want is that the update of session 2 must success immediately, and the transaction of session 1 should be aborted. Any suggestion? Thanks.</p>