title: IF condition in mysql script
body: <p>I am trying to write a script to patch our mysql database. Something like this I can run:</p>
  
  <pre><code>If IsTargetVersion(1.1) 
  THEN
  ALTER TABLE t1 ENGINE = InnoDB;
  END IF;
  </code></pre>
  
  <p>The funny thing I found about MySql is: it doesn't support if condition in script. I don't want to create a store procedure, call it and drop it in my script. That looks stupid...</p>
  
  <p>Does anybody have better approach?</p>
  
  <p>Thanks</p>