title: Error Code: 1422. Explicit or implicit commit is not allowed in stored function or trigger
body: <p>Everywhere I look it seems MySQL stored procedures can do transactions.  Yet when I declare my stored function</p>
  
  <pre><code>create function test( a int )
  returns int
  MODIFIES SQL DATA
  BEGIN
    START TRANSACTION ;
    update t set col='some value' where id=a ;
    COMMIT ;
    return 0 ;
  END //
  </code></pre>
  
  <p>I get </p>
  
  <blockquote>
    <p>Error Code: 1422. Explicit or implicit commit is not allowed in stored function or trigger.</p>
  </blockquote>