diff options
author | unknown <Sinisa@sinisa.nasamreza.org> | 2003-05-31 21:35:20 +0300 |
---|---|---|
committer | unknown <Sinisa@sinisa.nasamreza.org> | 2003-05-31 21:35:20 +0300 |
commit | 17ac9f831fea9f9b841748f27fe1a41896fc19bd (patch) | |
tree | 64a21cb3ad1c6eb709c048713bd9ded6aa80b4e0 /sql/sql_acl.cc | |
parent | 0ce9d6af4fffbadeb1824a4868889eba0ac58daa (diff) | |
download | mariadb-git-17ac9f831fea9f9b841748f27fe1a41896fc19bd.tar.gz |
several bug fixes
include/my_global.h:
Fix for a clash with include files from Linux kernel source
mysys/charset.c:
Fix for a bug with LEFT(), RIGHT() ... and GROUP BY clause
sql/sql_acl.cc:
Sending error when global privilege is attempted at db level
sql/sql_parse.cc:
Fix for the non-functioning max_user_connections
Diffstat (limited to 'sql/sql_acl.cc')
-rw-r--r-- | sql/sql_acl.cc | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/sql/sql_acl.cc b/sql/sql_acl.cc index f01248bb682..12ea3a94464 100644 --- a/sql/sql_acl.cc +++ b/sql/sql_acl.cc @@ -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)); |