summaryrefslogtreecommitdiff
path: root/sql/sql_acl.cc
diff options
context:
space:
mode:
authorunknown <gkodinov@mysql.com>2006-05-26 11:49:39 +0300
committerunknown <gkodinov@mysql.com>2006-05-26 11:49:39 +0300
commit419ae6cbf8ce04430673174e4a0063eda4e90254 (patch)
treea6e1e57b9c8be0e4046fd68ea9fcac02e357f0fb /sql/sql_acl.cc
parent48fe5a2d8feef07b50d8cda323bff706e90ce1c0 (diff)
downloadmariadb-git-419ae6cbf8ce04430673174e4a0063eda4e90254.tar.gz
Bug #14875: Bad view DEFINER makes SHOW CREATE VIEW fail
When reading a view definition from a .frm file it was throwing a SQL error if the DEFINER user is not defined. Changed it to a warning to match the (documented) case when a view with undefined DEFINER user is created. mysql-test/r/view_grant.result: test case for the bug mysql-test/t/view_grant.test: test case for the bug sql/sql_acl.cc: Initialized the members to no privileges so even if the subsequent checks fail it will still initialize the security context. sql/table.cc: Turned the error of undefined DEFINER user in reading a view definition to a warning.
Diffstat (limited to 'sql/sql_acl.cc')
-rw-r--r--sql/sql_acl.cc2
1 files changed, 2 insertions, 0 deletions
diff --git a/sql/sql_acl.cc b/sql/sql_acl.cc
index 02b2f88676f..197c703ece3 100644
--- a/sql/sql_acl.cc
+++ b/sql/sql_acl.cc
@@ -959,6 +959,8 @@ bool acl_getroot_no_password(Security_context *sctx, char *user, char *host,
sctx->master_access= 0;
sctx->db_access= 0;
+ sctx->priv_user= (char *) "";
+ *sctx->priv_host= 0;
/*
Find acl entry in user database.