Bug #109128 | MySQL 8.0.31 Read Replica Procedure Call Bug | ||
---|---|---|---|
Submitted: | 17 Nov 2022 19:53 | Modified: | 18 Nov 2022 15:53 |
Reporter: | David Allen | Email Updates: | |
Status: | Verified | Impact on me: | |
Category: | MySQL Server: Stored Routines | Severity: | S2 (Serious) |
Version: | 8.0.31 | OS: | Any |
Assigned to: | CPU Architecture: | Any | |
Tags: | ER_OPTION_PREVENTS_STATEMENT, Read Replica |
[17 Nov 2022 19:53]
David Allen
[18 Nov 2022 15:31]
MySQL Verification Team
Hi David, I verified the bug report as I cannot find this limitation documented anywhere but the limitation is there because in case you are pushing the function as a parameter we do not know if that function changes anything or not at that time so we drop the error. Not sure if this is going to be changed in near future or just the limitation will be properly documented, we'll see what the team will decide on. Thank you for the report
[18 Nov 2022 15:53]
David Allen
My understanding of the way Functions work with MySQL is they can never write to or update the database, or execute any action that would result in such an action. For clarity and my own understanding, could you explain a circumstance where a user defined function could execute a statement that would result in some sort of write or lock, etc.?
[18 Nov 2022 19:56]
MySQL Verification Team
Hi David, Well it is a bit of a stretch (that is why I verified the bug) but since you can write UDF in C you can for all intents and purposes format a hard drive if you want to, let alone change some data in a database. If there would be a simple/common way of doing it than this would be a "not a bug" situation. Since it is not, I verified a bug. We'll see what will the appropriate team decide :) all best