Commit aa22ba81 authored by unknown's avatar unknown

make LOCK TABLES to work when Lock_tables_priv is granted on the DB level and...

make LOCK TABLES to work when Lock_tables_priv is granted on the DB level and Select_priv is granted on the table level.


parent 83f5a6a3
...@@ -2693,7 +2693,7 @@ check_access(THD *thd, ulong want_access, const char *db, ulong *save_priv, ...@@ -2693,7 +2693,7 @@ check_access(THD *thd, ulong want_access, const char *db, ulong *save_priv,
/* grant_option is set if there exists a single table or column grant */ /* grant_option is set if there exists a single table or column grant */
if (db_access == want_access || if (db_access == want_access ||
((grant_option && !dont_check_global_grants) && ((grant_option && !dont_check_global_grants) &&
!(want_access & ~TABLE_ACLS))) !(want_access & ~(db_access | TABLE_ACLS))))
DBUG_RETURN(FALSE); /* Ok */ DBUG_RETURN(FALSE); /* Ok */
if (!no_errors) if (!no_errors)
net_printf(&thd->net,ER_DBACCESS_DENIED_ERROR, net_printf(&thd->net,ER_DBACCESS_DENIED_ERROR,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment