Bug #89914 Debug assert when executing create resource group in stored function

Submitted: 5 Mar 2018 14:12 Modified: 23 Mar 2018 18:05
Reporter: Sven Sandberg Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: Optimizer Severity:S3 (Non-critical)
Version:8.0 OS:Any
Assigned to: CPU Architecture:Any

[5 Mar 2018 14:12] Sven Sandberg
Description:
When executing CREATE RESOURCE GROUP in a stored function, the server raises a debug assertion.

How to repeat:
--delimiter |
CREATE FUNCTION func() RETURNS INT
BEGIN
  CREATE RESOURCE GROUP Batch TYPE = USER VCPU = 2-3 THREAD_PRIORITY = 10;
  RETURN 0;
END|
--delimiter ;

SELECT func();

Suggested fix:
The comment before the DBUG_ASSERT statement says that implicit committing statements should not be allowed in sub-statements.

So I guess the fix is to disallow CREATE RESOURCE GROUP in sub-statements.
[23 Mar 2018 18:05] Paul DuBois
Posted by developer:
 
Fixed in 8.0.12.

These resource-group statments are now disallowed in stored functions
because they cause an implicit commit, which is not permitted in a
stored function: CREATE RESOURCE GROUP, ALTER RESOURCE GROUP, DROP
RESOURCE GROUP.

Portions of this website are copyright © 2001, 2002 The PHP Group

Page generated in 0.053 sec. using MySQL 8.4.7-u6-cloud

Timestamp references displayed by the system are UTC.
Content reproduced on this site is the property of the respective copyright holders.
It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.