Details
-
Bug
-
Status: Closed (View Workflow)
-
Major
-
Resolution: Fixed
-
21.06.21, 22.08.18, 23.02.15, 23.08.11, 24.02.7, 25.01.4
-
None
-
MXS-SPRINT-244
Description
Steps to recreate:
- On a replica configuration create a database on the primary node with a dash in the name
CREATE DATABASE `my-database`;
- Create an event within that database
USE `my-database`
CREATE DEFINER = root@'localhost' EVENT myevent ON SCHEDULE EVERY 1 YEAR DO SELECT sleep(1);
- Attempt a switchover to the replica:
maxctrl call command mariadbmon Monitor1 switchover server2
The following error is thrown:
{
|
"links": {
|
"self": "http://127.0.0.1:8989/v1/maxscale/modules/mariadbmon/switchover/"
|
},
|
"meta": {
|
"errors": [
|
{
|
"detail": "Could not alter event 'my-database.myevent' on server 'server1': Query 'ALTER DEFINER = root@'localhost' EVENT my-database.myevent DISABLE ON SLAVE;' failed on 'server1': 'No database selected' (1046)."
|
},
|
{
|
"detail": "Failed to disable events on 'server1'."
|
},
|
{
|
"detail": "Switchover server1 -> server2 failed."
|
}
|
]
|
}
|
}
|