When event_scheduler=ON it will acquiring lock MDL_SHARED_WRITE on mysql.event table
And when i try to do
SET GLOBAL read_only = 1 and the scheduler is ON and the enabled events exists - set read_only=1 halts...
I use MaxScale to change the master and in this situation I had to abandon the use of events for everything to work, which is not very good.
Perhaps this is still some kind of bug.
Since I do not see any connection with the mysql.event lock (the event is executed once an hour) and the server's transfer to read_only = 1
Same error with backuping ( https://jira.mariadb.org/browse/MDEV-24185 )