check_access() returns FALSE for internal access granted

"Bhagurkar, Salil Arun" <[email protected]>
Newsgroups gmane.comp.db.mysql.devel
Message-ID <26426DED714A5D4C97FCB32458A29C3209D510A1@CH1PRD0302MB128.namprd03.prod.outlook.com>
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

-- 
MySQL Internals Mailing List
For list archives: http://lists.mysql.com/internals
To unsubscribe:    http://lists.mysql.com/[email protected]
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.