diff options
author | unknown <bell@sanja.is.com.ua> | 2005-03-30 22:11:08 +0300 |
---|---|---|
committer | unknown <bell@sanja.is.com.ua> | 2005-03-30 22:11:08 +0300 |
commit | 504ab8d4f48fa0ce9f127f5e88fd6a71888ab8a2 (patch) | |
tree | b0584ee1fd2d58e2712a368e83df6dab6bba725d /sql/sql_parse.cc | |
parent | dddabc7edd10d3b8d42b532354d572b70bba8f18 (diff) | |
parent | 5ac4670bf7f17374e8bae1bd27625ccabc1eac82 (diff) | |
download | mariadb-git-504ab8d4f48fa0ce9f127f5e88fd6a71888ab8a2.tar.gz |
merge
sql/sql_parse.cc:
Auto merged
Diffstat (limited to 'sql/sql_parse.cc')
-rw-r--r-- | sql/sql_parse.cc | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/sql/sql_parse.cc b/sql/sql_parse.cc index 09579432856..86544f72316 100644 --- a/sql/sql_parse.cc +++ b/sql/sql_parse.cc @@ -3731,6 +3731,7 @@ check_access(THD *thd, ulong want_access, const char *db, ulong *save_priv, db ? db : "", want_access, thd->master_access)); #ifndef NO_EMBEDDED_ACCESS_CHECKS ulong db_access; + bool db_is_pattern= test(want_access & GRANT_ACL); #endif ulong dummy; if (save_priv) @@ -3757,9 +3758,8 @@ check_access(THD *thd, ulong want_access, const char *db, ulong *save_priv, */ db_access= thd->db_access; if (!(thd->master_access & SELECT_ACL) && - (db && (!thd->db || strcmp(db,thd->db)))) - db_access=acl_get(thd->host, thd->ip, - thd->priv_user, db, test(want_access & GRANT_ACL)); + (db && (!thd->db || db_is_pattern || strcmp(db,thd->db)))) + db_access=acl_get(thd->host, thd->ip, thd->priv_user, db, db_is_pattern); *save_priv=thd->master_access | db_access; DBUG_RETURN(FALSE); } @@ -3777,9 +3777,8 @@ check_access(THD *thd, ulong want_access, const char *db, ulong *save_priv, if (db == any_db) DBUG_RETURN(FALSE); // Allow select on anything - if (db && (!thd->db || strcmp(db,thd->db))) - db_access=acl_get(thd->host, thd->ip, - thd->priv_user, db, test(want_access & GRANT_ACL)); + if (db && (!thd->db || db_is_pattern || strcmp(db,thd->db))) + db_access=acl_get(thd->host, thd->ip, thd->priv_user, db, db_is_pattern); else db_access=thd->db_access; DBUG_PRINT("info",("db_access: %lu", db_access)); |