This is a read-only copy of the MariaDB Knowledgebase generated on 2024-12-18. For the latest, interactive version please visit https://mariadb.com/kb/.

Stored Function Limitations

The following restrictions apply to stored functions.

  • All of the restrictions listed in Stored Routine Limitations.
  • Any statements that return a result set are not permitted. For example, a regular SELECTs is not permitted, but a SELECT INTO is. A cursor and FETCH statement is permitted.
  • FLUSH statements are not permitted.
  • Statements that perform explicit or implicit commits or rollbacks are not permitted
  • Cannot be used recursively.
  • Cannot make changes to a table that is already in use (reading or writing) by the statement invoking the stored function.
  • Cannot refer to a temporary table multiple times under different aliases, even in different statements.
  • ROLLBACK TO SAVEPOINT and RELEASE SAVEPOINT statement which are in a stored function cannot refer to a savepoint which has been defined out of the current function.
  • Prepared statements (PREPARE, EXECUTE, DEALLOCATE PREPARE) cannot be used, and therefore nor can statements be constructed as strings and then executed.
Content reproduced on this site is the property of its respective owners, and this content is not reviewed in advance by MariaDB. The views, information and opinions expressed by this content do not necessarily represent those of MariaDB or any other party.