mirror of
https://github.com/MariaDB/server.git
synced 2025-01-29 10:14:19 +01:00
Bug#32775 problems with SHOW EVENTS and Information_Schema
removed unnecessary privilege checks for I_S schema
This commit is contained in:
parent
1b3e95e1da
commit
b0ca512778
4 changed files with 17 additions and 6 deletions
|
@ -1611,4 +1611,11 @@ id select_type table type possible_keys key key_len ref rows filtered Extra
|
|||
1 SIMPLE tables ALL NULL NULL NULL NULL NULL NULL Skip_open_table; Scanned all databases
|
||||
Warnings:
|
||||
Note 1003 select 1 AS `1` from `information_schema`.`tables`
|
||||
use information_schema;
|
||||
show events;
|
||||
Db Name Definer Time zone Type Execute at Interval value Interval field Starts Ends Status Originator character_set_client collation_connection Database Collation
|
||||
show events from information_schema;
|
||||
Db Name Definer Time zone Type Execute at Interval value Interval field Starts Ends Status Originator character_set_client collation_connection Database Collation
|
||||
show events where Db= 'information_schema';
|
||||
Db Name Definer Time zone Type Execute at Interval value Interval field Starts Ends Status Originator character_set_client collation_connection Database Collation
|
||||
End of 5.1 tests.
|
||||
|
|
|
@ -1238,4 +1238,12 @@ select * from `information_schema`.`VIEWS` where `TABLE_NAME` = NULL;
|
|||
#
|
||||
explain extended select 1 from information_schema.tables;
|
||||
|
||||
#
|
||||
# Bug#32775 problems with SHOW EVENTS and Information_Schema
|
||||
#
|
||||
use information_schema;
|
||||
show events;
|
||||
show events from information_schema;
|
||||
show events where Db= 'information_schema';
|
||||
|
||||
--echo End of 5.1 tests.
|
||||
|
|
|
@ -825,8 +825,8 @@ Events::fill_schema_events(THD *thd, TABLE_LIST *tables, COND * /* cond */)
|
|||
if (thd->lex->sql_command == SQLCOM_SHOW_EVENTS)
|
||||
{
|
||||
DBUG_ASSERT(thd->lex->select_lex.db);
|
||||
if (check_access(thd, EVENT_ACL, thd->lex->select_lex.db, 0, 0, 0,
|
||||
is_schema_db(thd->lex->select_lex.db)))
|
||||
if (!is_schema_db(thd->lex->select_lex.db) && // There is no events in I_S
|
||||
check_access(thd, EVENT_ACL, thd->lex->select_lex.db, 0, 0, 0, 0))
|
||||
DBUG_RETURN(1);
|
||||
db= thd->lex->select_lex.db;
|
||||
}
|
||||
|
|
|
@ -1855,10 +1855,6 @@ mysql_execute_command(THD *thd)
|
|||
|
||||
switch (lex->sql_command) {
|
||||
case SQLCOM_SHOW_EVENTS:
|
||||
if ((res= check_access(thd, EVENT_ACL, thd->lex->select_lex.db, 0, 0, 0,
|
||||
is_schema_db(thd->lex->select_lex.db))))
|
||||
break;
|
||||
/* fall through */
|
||||
case SQLCOM_SHOW_STATUS_PROC:
|
||||
case SQLCOM_SHOW_STATUS_FUNC:
|
||||
res= execute_sqlcom_select(thd, all_tables);
|
||||
|
|
Loading…
Add table
Reference in a new issue