Fix for bug #18897 "Events: unauthorized action possible with
alter event rename". ALTER EVENT ... RENAME statement hasn't checked privileges for the target database. It also caused server crashes when target database was not specified explicitly and there was no current database. This fix adds missing privilege check and check for the case when target database is not specified explicitly or implicitly. mysql-test/r/events_bugs.result: update result mysql-test/t/events_bugs.test: add test case for bug 18897 Events: unauthorized action possible with alter event rename: - test rename to db the user does not have access to - test rename when there is no selected db sql/sql_parse.cc: Additional check for the situation when no db is selected. CREATE EVENT abc and ALTER EVENT db.abc RENAME TO xyz, and DROP EVENT abc won't work if there is no selected DB.
Showing
Please register or sign in to comment