Bug #84081 super_read_only and read_only not allowing OPTIMIZE TABLE on 5.7
| Submitted: | 6 Dec 2016 18:38 | Modified: | 9 Dec 2016 7:04 |
|---|---|---|---|
| Reporter: | Gillian Gunson (OCA) | Email Updates: | |
| Status: | Verified | Impact on me: | |
| Category: | MySQL Server: Options | Severity: | S3 (Non-critical) |
| Version: | 5.7.14, 5.7.16 | OS: | Ubuntu |
| Assigned to: | CPU Architecture: | Any | |
| Tags: | error, Optimize, read_only, super_read_only | ||
[6 Dec 2016 18:38]
Gillian Gunson
[9 Dec 2016 7:04]
MySQL Verification Team
Hello Gillian, Thank you for the report and feedback. Verified as described. Thanks, Umesh
[1 Feb 2017 23:17]
Ceri Williams
Related "Unable to analyze table whilst super_read_only is enabled" https://bugs.mysql.com/bug.php?id=81442
[9 Nov 2021 15:27]
Anthony Maidment
This issue persists in version 8.0.27 The docs (https://dev.mysql.com/doc/refman/8.0/en/server-system-variables.html#sysvar_read_only) state: When read_only is enabled and when super_read_only is enabled, the server still permits these operations: - Use of ANALYZE TABLE or OPTIMIZE TABLE statements. The purpose of read-only mode is to prevent changes to table structure or contents. Analysis and optimization do not qualify as such changes. Replicating the above, running as root, with ALL privileges: mysql> show global variables like '%read_only'; +------------------+-------+ | Variable_name | Value | +------------------+-------+ | innodb_read_only | OFF | | read_only | ON | | super_read_only | ON | | tx_read_only | OFF | +------------------+-------+ Query: optimize table `table_name` Error Code: 1290 The MySQL server is running with the --super-read-only option so it cannot execute this statement
Portions of this website are copyright © 2001, 2002 The PHP Group
Page generated in 0.065 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.