List:Commits« Previous MessageNext Message »
From:Sergei Golubchik Date:October 15 2009 5:02pm
Subject:Re: bzr commit into mysql-5.4.5-next-mr branch
(kristofer.pettersson:2888) Bug#27145
View as plain text  
Hi, Kristofer!

On Oct 12, Kristofer Pettersson wrote:
> 
>  2888 Kristofer Pettersson	2009-10-12
>       Bug#27145 EXTRA_ACL troubles

mostly ok, there are a only couple style issues - apparently result of a
difficult backport, as you didn't have them in your original patch.

ok to push after fixing them.

> === modified file 'sql/mysql_priv.h'
> --- a/sql/mysql_priv.h	2009-09-17 09:20:11 +0000
> +++ b/sql/mysql_priv.h	2009-10-12 13:34:13 +0000
> @@ -1120,9 +1120,11 @@ bool reload_acl_and_cache(THD *thd, ulon
>                            bool *write_to_binlog);
>  #ifndef NO_EMBEDDED_ACCESS_CHECKS
>  bool check_access(THD *thd, ulong access, const char *db, ulong *save_priv,
> -		  bool no_grant, bool no_errors, bool schema_db);
> -bool check_table_access(THD *thd, ulong want_access, TABLE_LIST *tables,
> -			uint number, bool no_errors);
> +                  bool no_grant, bool no_errors, bool schema_db);
> +bool check_table_access(THD *thd, ulong requirements,TABLE_LIST *tables,
> +                        bool no_errors,
> +                        bool any_combination_of_privileges_will_do,
> +                        uint number);
>  #else

Unless you have a good argument to do it differently, please try to keep
the names are the order or similar arguments in similar functions.

Now check_table_access has (thd, requirements, tables, no_errors,
any_combination_of_privileges_will_do, number) while check_grant uses
(thd, want_access, tables, any_combination_will_do, number, no_errors)

> === modified file 'sql/sql_parse.cc'
> --- a/sql/sql_parse.cc	2009-09-17 09:20:11 +0000
> +++ b/sql/sql_parse.cc	2009-10-12 13:34:13 +0000
> @@ -2230,28 +2231,33 @@ mysql_execute_command(THD *thd)
>    case SQLCOM_SHOW_STORAGE_ENGINES:
>    case SQLCOM_SHOW_PROFILE:
>    case SQLCOM_SELECT:
> -    thd->status_var.last_query_cost= 0.0;
> -    if (all_tables)
>      {

indentation is wrong, the whole block should have one indent level less.

> -      res= check_table_access(thd,
> -                              lex->exchange ? SELECT_ACL | FILE_ACL :
> -                              SELECT_ACL,
> -                              all_tables, UINT_MAX, FALSE);
> -    }
> -    else
> -      res= check_access(thd,
> -                        lex->exchange ? SELECT_ACL | FILE_ACL : SELECT_ACL,
> -                        any_db, 0, 0, 0, 0);
> +      thd->status_var.last_query_cost= 0.0;

Regards / Mit vielen Grüßen,
Sergei

-- 
   __  ___     ___ ____  __
  /  |/  /_ __/ __/ __ \/ /   Sergei Golubchik <serg@stripped>
 / /|_/ / // /\ \/ /_/ / /__  Principal Software Engineer/Server Architect
/_/  /_/\_, /___/\___\_\___/  Sun Microsystems GmbH, HRB München 161028
       <___/                  Sonnenallee 1, 85551 Kirchheim-Heimstetten
Geschäftsführer: Thomas Schroeder, Wolfgang Engels, Wolf Frenkel
Vorsitzender des Aufsichtsrates: Martin Häring
Thread
bzr commit into mysql-5.4.5-next-mr branch (kristofer.pettersson:2888)Bug#27145Kristofer Pettersson12 Oct
  • Re: bzr commit into mysql-5.4.5-next-mr branch(kristofer.pettersson:2888) Bug#27145Sergei Golubchik15 Oct
    • Re: bzr commit into mysql-5.4.5-next-mr branch(kristofer.pettersson:2888) Bug#27145Kristofer Pettersson16 Oct
      • Re: bzr commit into mysql-5.4.5-next-mr branch(kristofer.pettersson:2888) Bug#27145Sergei Golubchik16 Oct