title: Call a stored procedure from within a view
body: <p>I have a procedure that creates a table, is it possible to have a view (or similar) that can call the procedure then select from the table?</p>
  
  <p>I've tried this:</p>
  
  <pre><code>DELIMITER $$
  
  CREATE DEFINER=`root`@`localhost` FUNCTION `new_routine`(p1 INT) RETURNS int(1)
  BEGIN
      CALL rMergeDateFields();
      RETURN 1;
  END
  
  
  CREATE VIEW `db`.`vIntervals` AS
    SELECT new_routine(0) AS col1;
    SELECT * FROM MergedData;
  </code></pre>
  
  <p>but I get this error</p>
  
  <blockquote>
    <p>Error 1422: Explicit or implicit commit is not allowed in stored function or trigger.</p>
  </blockquote>
  
  <p>Any ideas?</p>