diff options
author | hf@deer.(none) <> | 2003-09-26 15:40:26 +0500 |
---|---|---|
committer | hf@deer.(none) <> | 2003-09-26 15:40:26 +0500 |
commit | 5f8e7fef2746ece1973116db739c6604cc156b21 (patch) | |
tree | b80c6147c3a9929ec4e00bac55883c6d575ac2a4 /sql/sql_derived.cc | |
parent | d5d4923107a2f8d3455debfe6ab8b22b5793f6cf (diff) | |
parent | ba8fa76fa20f400d8adfe2aa14231a682df9ba79 (diff) | |
download | mariadb-git-5f8e7fef2746ece1973116db739c6604cc156b21.tar.gz |
Merge
Diffstat (limited to 'sql/sql_derived.cc')
-rw-r--r-- | sql/sql_derived.cc | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/sql/sql_derived.cc b/sql/sql_derived.cc index 121e0321eb0..a740bb1b3c7 100644 --- a/sql/sql_derived.cc +++ b/sql/sql_derived.cc @@ -89,13 +89,15 @@ int mysql_derived(THD *thd, LEX *lex, SELECT_LEX_UNIT *unit, We have to do access checks here as this code is executed before any sql command is started to execute. */ +#ifndef NO_EMBEDDED_ACCESS_CHECKS if (tables) - res= check_table_access(thd,SELECT_ACL, tables); + res= check_table_access(thd,SELECT_ACL, tables,0); else - res= check_access(thd, SELECT_ACL, any_db); + res= check_access(thd, SELECT_ACL, any_db,0,0,0); if (res) DBUG_RETURN(1); - +#endif + if (!(res=open_and_lock_tables(thd,tables))) { if (is_union || is_subsel) @@ -201,7 +203,9 @@ int mysql_derived(THD *thd, LEX *lex, SELECT_LEX_UNIT *unit, org_table_list->table=table; table->derived_select_number= select_cursor->select_number; table->tmp_table= TMP_TABLE; +#ifndef NO_EMBEDDED_ACCESS_CHECKS org_table_list->grant.privilege= SELECT_ACL; +#endif if (lex->describe) { // to fix a problem in EXPLAIN |