Commit 8b7e79be authored by unknown's avatar unknown

Merge sanja.is.com.ua:/home/bell/mysql/bk/mysql-4.1

into sanja.is.com.ua:/home/bell/mysql/bk/work-mem_root-4.1

parents 82fd4268 f7972fb2
...@@ -59,7 +59,7 @@ static void refresh_status(void); ...@@ -59,7 +59,7 @@ static void refresh_status(void);
static bool append_file_to_dir(THD *thd, char **filename_ptr, static bool append_file_to_dir(THD *thd, char **filename_ptr,
char *table_name); char *table_name);
inline bool single_table_command_access(THD *thd, ulong privilege, static bool single_table_command_access(THD *thd, ulong privilege,
TABLE_LIST *tables, int *res); TABLE_LIST *tables, int *res);
const char *any_db="*any*"; // Special symbol for check_access const char *any_db="*any*"; // Special symbol for check_access
...@@ -3123,7 +3123,7 @@ error: ...@@ -3123,7 +3123,7 @@ error:
1 - access denied 1 - access denied
*/ */
inline bool single_table_command_access(THD *thd, ulong privilege, static bool single_table_command_access(THD *thd, ulong privilege,
TABLE_LIST *tables, int *res) TABLE_LIST *tables, int *res)
{ {
...@@ -3135,12 +3135,14 @@ inline bool single_table_command_access(THD *thd, ulong privilege, ...@@ -3135,12 +3135,14 @@ inline bool single_table_command_access(THD *thd, ulong privilege,
tables->next= 0; tables->next= 0;
if (grant_option && check_grant(thd, privilege, tables)) if (grant_option && check_grant(thd, privilege, tables))
return 1; return 1;
tables->next= subselects_tables;
// check rights on tables of subselect (if exists) // check rights on tables of subselect (if exists)
if (subselects_tables && if (subselects_tables)
(*res= check_table_access(thd, SELECT_ACL, subselects_tables))) {
tables->next= subselects_tables;
if ((*res= check_table_access(thd, SELECT_ACL, subselects_tables)))
return 1; return 1;
}
return 0; return 0;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment