title: Mysql stored procedure limit on query
body: <p>i just want limit a query by parameter inside a stored, but I get an error in the LIMIT field:</p>
  
  <pre><code>DELIMITER //
  DROP FUNCTION IF EXISTS test//
  CREATE PROCEDURE test(lim INT)
    BEGIN
      SELECT * FROM logs LIMIT 0,lim; 
    END //
  DELIMITER ;
  </code></pre>
  
  <p>What I miss?</p>