title: You have an error in your SQL syntax (CREATE PROCEDURE)
body: <p>I try to create function in mariadb (latest stable). Want to get all data by company id (int)</p>
  <pre><code>CREATE FUNCTION getByCompId (cid INT)
  RETURN (SELECT * FROM companies WHERE id=cid);
  </code></pre>
  <p>end when i try to create, i get error:</p>
  <pre><code>SQL Error [1064] [42000]: (conn=111) You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'RETURN (SELECT * FROM cdr WHERE id=cid)' at line 2
  </code></pre>