summaryrefslogtreecommitdiff
path: root/sql/sql_acl.cc
diff options
context:
space:
mode:
authorserg@serg.mylan <>2003-07-27 09:59:24 +0200
committerserg@serg.mylan <>2003-07-27 09:59:24 +0200
commite0d9c9cd2b30097506030b9b8d9f97dc922b0dda (patch)
tree5a149158df118b24ed5281e65568e58bce2f8d71 /sql/sql_acl.cc
parent941a65c1ec093b0d12263c92eb86d14ca37bbb26 (diff)
parent2cac8f07682491c20b0419cbdb4fe5b164472094 (diff)
downloadmariadb-git-e0d9c9cd2b30097506030b9b8d9f97dc922b0dda.tar.gz
Merge bk-internal:/home/bk/mysql-4.1/
into serg.mylan:/usr/home/serg/Abk/mysql-4.1
Diffstat (limited to 'sql/sql_acl.cc')
-rw-r--r--sql/sql_acl.cc10
1 files changed, 5 insertions, 5 deletions
diff --git a/sql/sql_acl.cc b/sql/sql_acl.cc
index 51c05ccbf33..598ff153cad 100644
--- a/sql/sql_acl.cc
+++ b/sql/sql_acl.cc
@@ -883,7 +883,7 @@ static void acl_insert_db(const char *user, const char *host, const char *db,
*****************************************************************************/
ulong acl_get(const char *host, const char *ip, const char *bin_ip,
- const char *user, const char *db)
+ const char *user, const char *db, my_bool db_is_pattern)
{
ulong host_access,db_access;
uint i,key_length;
@@ -917,7 +917,7 @@ ulong acl_get(const char *host, const char *ip, const char *bin_ip,
{
if (compare_hostname(&acl_db->host,host,ip))
{
- if (!acl_db->db || !wild_compare(db,acl_db->db))
+ if (!acl_db->db || !wild_compare(db,acl_db->db,db_is_pattern))
{
db_access=acl_db->access;
if (acl_db->host.hostname)
@@ -939,7 +939,7 @@ ulong acl_get(const char *host, const char *ip, const char *bin_ip,
ACL_HOST *acl_host=dynamic_element(&acl_hosts,i,ACL_HOST*);
if (compare_hostname(&acl_host->host,host,ip))
{
- if (!acl_host->db || !wild_compare(db,acl_host->db))
+ if (!acl_host->db || !wild_compare(db,acl_host->db,db_is_pattern))
{
host_access=acl_host->access; // Fully specified. Take it
break;
@@ -1277,7 +1277,7 @@ static bool compare_hostname(const acl_host_and_ip *host, const char *hostname,
return (!host->hostname ||
(hostname && !wild_case_compare(&my_charset_latin1,
hostname,host->hostname)) ||
- (ip && !wild_compare(ip,host->hostname)));
+ (ip && !wild_compare(ip,host->hostname,0)));
}
@@ -1337,7 +1337,7 @@ static bool test_if_create_new_users(THD *thd)
tl.db= (char*) "mysql";
tl.real_name= (char*) "user";
db_access=acl_get(thd->host, thd->ip, (char*) &thd->remote.sin_addr,
- thd->priv_user, tl.db);
+ thd->priv_user, tl.db, 0);
if (!(db_access & INSERT_ACL))
{
if (check_grant(thd,INSERT_ACL,&tl,0,1))