Bug #99800 ps_truncate_all_tables() does not work in super_read_only mode
Submitted: 8 Jun 2020 11:04 Modified: 29 Jun 2020 8:32
Reporter: lalit Choudhary Email Updates:
Status: Duplicate Impact on me:
None 
Category:MySQL Server: SYS Schema Severity:S3 (Non-critical)
Version:5.7.30, 8.0.20 OS:Any
Assigned to: CPU Architecture:Any
Tags: regression

[8 Jun 2020 11:04] lalit Choudhary
Description:
ps_truncate_all_tables() does not work in super_read_only mode.

The same bug as #81009, Looks like regression at works in previous releases(5.7.22) but this can be gain seen in later MySQL server version tested with 5.7.30 and 8.0.20.

How to repeat:
master [localhost] {msandbox} (sys) > set global super_read_only = 1;
Query OK, 0 rows affected (0.00 sec)

master [localhost] {msandbox} (sys) > call ps_truncate_all_tables(0);
ERROR 1290 (HY000): The MySQL server is running with the --super-read-only option so it cannot execute this statement

Suggested fix:
It would be good if the stored procedure could be executed but the statements inside the stored procedure would be run (depending on whether running as SUPER or not) thus allowing the stored procedure to temporarily turn off super_read_only while making the change and then turning it on again afterward.

That would be more intuitive.
[8 Jun 2020 12:47] MySQL Verification Team
Hello Lalit,

Thank you for the report and feedback!

Thanks,
Umesh
[29 Jun 2020 8:32] Praveenkumar Hulakund
This bug is duplicate of Bug#99072