1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-27 18:02:13 +03:00

Fixing that database privileges are also taken into account.

Before this change LOCK TABLES worked only with global and table
level privileges.
This commit is contained in:
unknown
2002-05-18 14:30:54 +03:00
parent 23283a5b93
commit d30409959e

View File

@ -2223,7 +2223,8 @@ mysql_execute_command(void)
}
if (check_db_used(thd,tables) || end_active_trans(thd))
goto error;
if (grant_option && check_grant(thd,SELECT_ACL | INSERT_ACL | UPDATE_ACL | DELETE_ACL,tables))
if (check_table_access(thd, SELECT_ACL | INSERT_ACL | UPDATE_ACL | DELETE_ACL , tables)
|| (grant_option && check_grant(thd,SELECT_ACL | INSERT_ACL | UPDATE_ACL | DELETE_ACL,tables)))
goto error;
thd->in_lock_tables=1;
thd->options|= OPTION_TABLE_LOCK;