1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-29 05:21:33 +03:00

several bug fixes

This commit is contained in:
Sinisa@sinisa.nasamreza.org
2003-05-31 21:35:20 +03:00
parent 9b35856c2f
commit ec4a0ee477
4 changed files with 20 additions and 7 deletions

View File

@ -2285,11 +2285,20 @@ int mysql_grant (THD *thd, const char *db, List <LEX_USER> &list,
(!db ? rights : 0), revoke_grant,
create_new_users)))
result= -1;
else
else if (db)
{
if (db && replace_db_table(tables[1].table, db, *Str, rights & DB_ACLS,
revoke_grant))
ulong db_rights= rights & DB_ACLS;
if (db_rights == rights)
{
if (replace_db_table(tables[1].table, db, *Str, db_rights,
revoke_grant))
result= -1;
}
else
{
net_printf(&thd->net,ER_WRONG_USAGE,"DB GRANT","GLOBAL PRIVILEGEY");
result= -1;
}
}
}
VOID(pthread_mutex_unlock(&acl_cache->lock));