final class ProgramRestrictions
Restricted visibility: declared "@visibility SqlSemantics\Platform\MySql". Code outside that scope must not name this declaration.

Reports the statements a stored program may not contain.

Rule: MYSQL-PROGRAM-RESTRICTIONS-001. No stored program contains LOCK TABLES, UNLOCK TABLES, ALTER VIEW, LOAD DATA, LOAD XML or USE (ER_SP_BADSTATEMENT), a CREATE PROCEDURE, CREATE FUNCTION of a stored function or CREATE TRIGGER (ER_SP_NO_RECURSIVE_CREATE), an ALTER or DROP of a procedure or function (ER_SP_NO_DROP_SP), or a CREATE EVENT or an ALTER EVENT with a body (ER_EVENT_RECURSION_FORBIDDEN). A stored function or trigger in addition returns no result set: no query without INTO, no SHOW, EXPLAIN, DESCRIBE, HELP and no CHECK, ANALYZE, OPTIMIZE, REPAIR or CHECKSUM TABLE (ER_SP_NO_RETSET); performs no explicit commit or rollback (ER_COMMIT_NOT_ALLOWED_IN_SF_OR_TRG); and uses no PREPARE, EXECUTE or DEALLOCATE PREPARE, no FLUSH and no RESET, RESET PERSIST included, which the grammar reads as the same RESET command (rule reset of sql_yacc.yy) (ER_STMT_NOT_ALLOWED_IN_SF_OR_TRG). Limit: the implicit commit of a data definition statement in a stored function or trigger is not reported. Terminates: the INTO search descends into strict parts of a query. Source: https://dev.mysql.com/doc/refman/8.4/en/stored-program-restrictions.html, https://dev.mysql.com/doc/refman/8.4/en/create-procedure.html ("The USE statement is not permitted in stored routines"). Status: Implemented.

Methods§

public function check(Statement $statement, ProgramKind $kind, Derivation $derivation): void
public function results(Statement $statement): bool

Tells whether a statement returns a result set to the client.

Parameters

$statementStatement

Returns

bool
Test cases 1
Called from 1
Calls 2

Test cases 4§

Test cases that cover or call this symbol, from the coverage report and from the analyzed test sources.

Dedicated tests 4

Relations§

Instantiated in 1
Method calls 1