mirror of
https://github.com/MariaDB/server.git
synced 2025-08-31 22:22:30 +03:00
Fix for bug #17394 - Events namespace is wrong
mysql-test/lib/init_db.sql: remove definer from PK mysql-test/r/events.result: update results mysql-test/r/system_mysql_db.result: update results mysql-test/t/events.test: remove I_S.EVENTS test and move it to events_grant.test scripts/mysql_fix_privilege_tables.sql: change table definition sql/event.cc: make events non-user specific (namespace change) sql/event.h: make events non-user specific (namespace change) sql/event_priv.h: make events non-user specific (namespace change) sql/event_scheduler.cc: make events non-user specific (namespace change) sql/event_timed.cc: make events non-user specific (namespace change) sql/sql_parse.cc: make events non-user specific (namespace change) sql/sql_show.cc: SHOW EVENTS is available to everyone who has EVENT on specific schema. No additional privileges are needed to see others' events. - user A has events in db1 and db2 - user B has events in db1 and db3 A will see all his events from db1 and db2 as well as B's events from db1 but not from db3. B will see her events from db1 and db3. In addition B will see only A's events from db1 but not db2.
This commit is contained in:
@@ -3837,16 +3837,16 @@ end_with_restore_list:
|
||||
switch (lex->sql_command) {
|
||||
case SQLCOM_CREATE_EVENT:
|
||||
res= Events::create_event(thd, lex->et,
|
||||
(uint) lex->create_info.options,
|
||||
&rows_affected);
|
||||
(uint) lex->create_info.options,
|
||||
&rows_affected);
|
||||
break;
|
||||
case SQLCOM_ALTER_EVENT:
|
||||
res= Events::update_event(thd, lex->et, lex->spname,
|
||||
&rows_affected);
|
||||
&rows_affected);
|
||||
break;
|
||||
case SQLCOM_DROP_EVENT:
|
||||
res= Events::drop_event(thd, lex->et, lex->drop_if_exists,
|
||||
&rows_affected);
|
||||
&rows_affected);
|
||||
default:;
|
||||
}
|
||||
DBUG_PRINT("info", ("CREATE/ALTER/DROP returned error code=%d af_rows=%d",
|
||||
@@ -3884,7 +3884,7 @@ end_with_restore_list:
|
||||
my_error(ER_TOO_LONG_IDENT, MYF(0), lex->spname->m_name.str);
|
||||
goto error;
|
||||
}
|
||||
res= Events::show_create_event(thd, lex->spname, lex->et->definer);
|
||||
res= Events::show_create_event(thd, lex->spname);
|
||||
break;
|
||||
}
|
||||
#ifndef DBUG_OFF
|
||||
|
Reference in New Issue
Block a user