title: Why does START TRANSACTION doesn't affect on autocommit implicitly as it should
body: <p>So this is from the docs:</p>
  
  <blockquote>
    <p>To disable autocommit mode implicitly for a single series of
    statements, use the <code>START TRANSACTION</code> statement:</p>
  </blockquote>
  
  <pre><code>START TRANSACTION;
  SELECT @A:=SUM(salary) FROM table1 WHERE type=1;
  UPDATE table2 SET summary=@A WHERE type=1;
  COMMIT;
  </code></pre>
  
  <p>So from my understanding, unlike using <code>BEGIN</code>; command which shouldn't set autocommit to 0, <code>START TRANSACTION</code> should set it to 0.</p>
  
  <p>Now if I do this (after I start a transaction):</p>
  
  <pre><code>select @@autocommit;
  </code></pre>
  
  <p>I get the value of 1.</p>
  
  <p>Why autocommit is still enabled even if I use <code>START TRANSACTION</code> command? I thought that the <code>autocommit</code> variable is local to a single session. Or maybe even if it says 1, it is actually set to 0 within a transaction but just can't get that info by running a <code>SELECT @@autocommit;</code> query?</p>