if ((db != NULL) && (db != any_db))
{
const ACL_internal_schema_access *access;
access= get_cached_schema_access(grant_internal_info, db);
if (access)
{
switch (access->check(want_access, save_priv))
{
case ACL_INTERNAL_ACCESS_GRANTED:
/*
All the privileges requested have been granted internally.
[out] *save_privileges= Internal privileges.
*/
DBUG_RETURN(FALSE);
case ACL_INTERNAL_ACCESS_DENIED:
if (! no_errors)
{
my_error(ER_DBACCESS_DENIED_ERROR, MYF(0),
sctx->priv_user, sctx->priv_host, db);
}
DBUG_RETURN(TRUE);
In the above code snippet from check_access() in sql_parse.cc, the code returns FALSE
when ACL_INTERNAL_ACCESS_GRANTED is returned by access->check(). Does this mean that
the access is really granted, or is some logical inversion implied here that I'm missing
out?
Cheers,
Salil Bhagurkar