Bug #98069 | No error on slave while trigger for binlog_format="statement" and read_only is 1 | ||
---|---|---|---|
Submitted: | 25 Dec 2019 10:12 | Modified: | 31 Dec 2019 8:47 |
Reporter: | Aayushi Mangal | Email Updates: | |
Status: | Not a Bug | Impact on me: | |
Category: | MySQL Server: Replication | Severity: | S3 (Non-critical) |
Version: | 5.7 | OS: | Any |
Assigned to: | CPU Architecture: | Any | |
Tags: | replica |
[25 Dec 2019 10:12]
Aayushi Mangal
[25 Dec 2019 10:14]
Aayushi Mangal
that will create schema
Attachment: all_schema.sql (application/octet-stream, text), 14.22 KiB.
[25 Dec 2019 10:15]
Aayushi Mangal
call trigger
Attachment: insert_error.sql (application/octet-stream, text), 202 bytes.
[25 Dec 2019 10:15]
Aayushi Mangal
this is not giving error
Attachment: insert_success.sql (application/octet-stream, text), 160 bytes.
[31 Dec 2019 8:47]
MySQL Verification Team
Thank you for taking the time to write to us, but this is not a bug. Please double-check the documentation available at https://dev.mysql.com/doc/refman/5.7/en/server-system-variables.html#sysvar_read_only and the instructions on how to report a bug at http://bugs.mysql.com/how-to-report.php As you already noted, this is an expected and documented behavior i.e Quoting from our manual https://dev.mysql.com/doc/refman/5.7/en/server-system-variables.html#sysvar_read_only Even with read_only enabled, the server permits these operations: Updates performed by slave threads, if the server is a replication slave. In replication setups, it can be useful to enable read_only on slave servers to ensure that slaves accept updates only from the master server and not from clients.
[9 Jan 2020 4:53]
Kazuya Notsu
Hi Umesh, Excuse me for cutting in. I understand its error happen because TRIGGER definer (= general user) don't have SUPER privilege nevertheless read_only=ON". > Updates performed by slave threads, if the server is a replication slave. In replication setups, it can be useful to enable read_only on slave servers to ensure that slaves accept updates only from the master server and not from clients. Does above documentation mean "Updates of TRIGGER performed by slave threads" ? In this case, it seems that TRIGGER was executed by another SUPER user other than definer (= general user).