Sergei Golubchik skrev:
>> === 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)
>
I agree that it would be better to have a consistent order. The reason
for the current order is to make it easier to track the back porting
effort. If you don't see any increased risk I can perform this change
right away.
In a follow up patch I proposed for Kostja to remove the 'number'
attribute from both signatures as it is construction which is prone to
errors. However I considered it as a separate task.
Do you agree that is a good idea? It would obviously mean that we look
at those special cases where the TABLE_LIST contains more items then it
should.
>
>> === 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.
>
>
Ack. Peculiar and annoying indentation ghost is killed.