title: mysql before insert trigger
body: <p>I try to create following trigger:</p>
  
  <pre><code>DELIMITER $$
  
  CREATE trigger insert_processor
  BEFORE INSERT ON tbl
  FOR EACH ROW BEGIN
  
  set new.val = trim(new.val);
  set new.val2 = upper(new.val);
  
  END$$
  </code></pre>
  
  <p>and it fails with following error message</p>
  
  <pre><code>#1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 8
  </code></pre>
  
  <p>What could be a reason?</p>
  
  <p>MySql server version: <code>5.1.40-community</code></p>
  
  <p>Client: <code>phpMyAdmin 3.3.8</code></p>