summaryrefslogtreecommitdiff
path: root/sql/sql_acl.cc
diff options
context:
space:
mode:
authorbell@sanja.is.com.ua <>2004-10-10 18:51:02 +0300
committerbell@sanja.is.com.ua <>2004-10-10 18:51:02 +0300
commit09e9651accec3339555634cf4699cb08f1945510 (patch)
tree901ad7e3c884e13bd67e9f1ef562c080bc838fea /sql/sql_acl.cc
parent29593da2f60bda6f34a89654895b6b4df9d67054 (diff)
downloadmariadb-git-09e9651accec3339555634cf4699cb08f1945510.tar.gz
fix privileges for old style privileges tables on fly (as it do mysql_fix_privilege_tables dut if we have not it run)
fixed forgoten test
Diffstat (limited to 'sql/sql_acl.cc')
-rw-r--r--sql/sql_acl.cc6
1 files changed, 6 insertions, 0 deletions
diff --git a/sql/sql_acl.cc b/sql/sql_acl.cc
index 4a970b6f018..51768922f6d 100644
--- a/sql/sql_acl.cc
+++ b/sql/sql_acl.cc
@@ -301,6 +301,12 @@ my_bool acl_init(THD *org_thd, bool dont_read_acl_tables)
{
uint next_field;
user.access= get_access(table,3,&next_field) & GLOBAL_ACLS;
+ /*
+ if it is pre 5.0.1 privilege table then map CREATE privilege on
+ CREATE VIEW & SHOW VIEW privileges
+ */
+ if (table->fields <= 31 && (user.access & CREATE_ACL))
+ user.access|= (CREATE_VIEW_ACL | SHOW_VIEW_ACL);
user.sort= get_sort(2,user.host.hostname,user.user);
user.hostname_length= (user.host.hostname ?
(uint) strlen(user.host.hostname) : 0);