diff options
author | unknown <gkodinov/kgeorge@magare.gmz> | 2007-10-01 12:56:25 +0300 |
---|---|---|
committer | unknown <gkodinov/kgeorge@magare.gmz> | 2007-10-01 12:56:25 +0300 |
commit | 163ba66c3f965ff4b0091628156e337058fc28a0 (patch) | |
tree | 0959af4265f279d4c92fbc5a3c4bc06483bd9ce6 /sql/sql_view.cc | |
parent | 82c059cf2fc5939f1b2fa904f14d1d5431973ee8 (diff) | |
parent | 0ad23eb8a5f377e94d4b4ae83f39555dbe75c3b0 (diff) | |
download | mariadb-git-163ba66c3f965ff4b0091628156e337058fc28a0.tar.gz |
merge 5.0-opt -> 5.1-opt
mysql-test/r/func_math.result:
Auto merged
mysql-test/t/func_math.test:
Auto merged
mysql-test/t/view_grant.test:
Auto merged
sql/item_func.cc:
Auto merged
sql/sql_select.cc:
Auto merged
sql/sql_view.cc:
Auto merged
Diffstat (limited to 'sql/sql_view.cc')
-rw-r--r-- | sql/sql_view.cc | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/sql/sql_view.cc b/sql/sql_view.cc index 00e97ace938..6e27af63e8a 100644 --- a/sql/sql_view.cc +++ b/sql/sql_view.cc @@ -223,9 +223,6 @@ bool mysql_create_view(THD *thd, TABLE_LIST *views, { LEX *lex= thd->lex; bool link_to_local; -#ifndef NO_EMBEDDED_ACCESS_CHECKS - bool definer_check_is_needed= mode != VIEW_ALTER || lex->definer; -#endif /* first table in list is target VIEW name => cut off it */ TABLE_LIST *view= lex->unlink_first_table(&link_to_local); TABLE_LIST *tables= lex->query_tables; @@ -280,7 +277,7 @@ bool mysql_create_view(THD *thd, TABLE_LIST *views, - same as current user - current user has SUPER_ACL */ - if (definer_check_is_needed && + if (lex->definer && (strcmp(lex->definer->user.str, thd->security_ctx->priv_user) != 0 || my_strcasecmp(system_charset_info, lex->definer->host.str, |