title: mysql trigger stored trigger is already used by statement which invoked stored trigger
body: <p>I want to set up a trigger so that if on an update the prediction field is = 3 then the trigger changes the value to 4 and saves it in the database. The trigger is below. </p>
  
  <p>For some reason I keep getting an error saying:  </p>
  
  <pre><code>#1442 - Can't update table 'tzanalytic\_forecast\_cached' in stored 
  function/trigger because it is already used by statement which invoked 
  this stored function/trigger.
  </code></pre>
  
  <p>Is this set up the right way? </p>
  
  <pre><code>delimiter $$ 
  CREATE TRIGGER no_BoW BEFORE UPDATE ON t FOR EACH ROW 
  BEGIN set @prediction = new.prediction; 
  UPDATE t SET t.prediction = (SELECT IF(@prediction = '3', '4', @prediction)) WHERE t.event_id = new.event_id AND t.price_tier = new.price_tier; END;
  $$ delimiter ;
  </code></pre>