From ac8180c2fcfd5e1ca40b5281b7a29e2457d25e4c Mon Sep 17 00:00:00 2001 From: "bell@sanja.is.com.ua" <> Date: Fri, 30 May 2003 21:09:37 +0300 Subject: [PATCH] after review changes --- sql/sql_parse.cc | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/sql/sql_parse.cc b/sql/sql_parse.cc index 542b2e0d96e..9ebb6305f70 100644 --- a/sql/sql_parse.cc +++ b/sql/sql_parse.cc @@ -59,7 +59,7 @@ static void refresh_status(void); static bool append_file_to_dir(THD *thd, char **filename_ptr, 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); const char *any_db="*any*"; // Special symbol for check_access @@ -3123,7 +3123,7 @@ error: 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) { @@ -3135,12 +3135,14 @@ inline bool single_table_command_access(THD *thd, ulong privilege, tables->next= 0; if (grant_option && check_grant(thd, privilege, tables)) return 1; - tables->next= subselects_tables; // check rights on tables of subselect (if exists) - if (subselects_tables && - (*res= check_table_access(thd, SELECT_ACL, subselects_tables))) - return 1; + if (subselects_tables) + { + tables->next= subselects_tables; + if ((*res= check_table_access(thd, SELECT_ACL, subselects_tables))) + return 1; + } return 0; }