1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-30 16:24:05 +03:00

fixed db/user privileges getting (BUG#5976)

mysql-test/r/view.result:
  user with global DB privileges test
mysql-test/t/view.test:
  user with global DB privileges test
sql/sql_acl.cc:
  fixed db/user privileges getting
This commit is contained in:
unknown
2004-10-22 15:43:22 +03:00
parent 58aa05e23e
commit fadcd8d3ac
3 changed files with 28 additions and 2 deletions

View File

@ -3889,12 +3889,13 @@ void fill_effective_table_privileges(THD *thd, GRANT_INFO *grant,
/* global privileges */
grant->privilege= thd->master_access;
/* db privileges */
grant->privilege|= acl_get(thd->host, thd->ip, thd->priv_user, db, 0);
/* if privileges ignored (--skip-grant-tables) above is enough */
if (!grant_option)
return;
/* db privileges */
grant->privilege|= acl_get(thd->host, thd->ip, thd->priv_user, db, 0);
/* table privileges */
if (grant->version != grant_version)
{