title: Importing mysql procedures generated from mysqldump --routines
body: <p>I use the mysqldump tool to make copies of my database.  The problem is, when I use the --routines parameter to output my stored procedures along with my data, the generated output causes an error when I try to import it.</p>
  
  <p>It goes something like this:</p>
  
  <pre><code>% mysqldump --routines MyDB | mysql MyDB2
  </code></pre>
  
  <p>(where MyDB2 already exists but is empty)</p>
  
  <p>The error I get is the following:</p>
  
  <pre><code>ERROR 1064 (42000) at line 307: 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 23
  </code></pre>
  
  <p>Everything works correctly if I omit the --routines.</p>
  
  <p>Has anyone else encountered this?</p>