diff options
author | unknown <bell@sanja.is.com.ua> | 2005-09-14 12:26:09 +0300 |
---|---|---|
committer | unknown <bell@sanja.is.com.ua> | 2005-09-14 12:26:09 +0300 |
commit | 2fcdbb8d7e11d7f067aa3b17ecc02f106344cf81 (patch) | |
tree | 8f20ee99d1bcfff01ffd56b0ec2aade7bc4a858f /sql/sql_show.cc | |
parent | 98b6fd8797bd6bac12c7b119c9bf0bc1fe94c22a (diff) | |
parent | 12dfd287c4404d7f7e9ac1ae70ce82dc7c22dced (diff) | |
download | mariadb-git-2fcdbb8d7e11d7f067aa3b17ecc02f106344cf81.tar.gz |
Merge sanja.is.com.ua:/home/bell/mysql/bk/mysql-5.0
into sanja.is.com.ua:/home/bell/mysql/bk/work-owner2-5.0
sql/mysql_priv.h:
Auto merged
sql/sql_acl.cc:
Auto merged
sql/sql_parse.cc:
Auto merged
sql/sql_show.cc:
Auto merged
sql/sql_view.cc:
Auto merged
Diffstat (limited to 'sql/sql_show.cc')
-rw-r--r-- | sql/sql_show.cc | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/sql/sql_show.cc b/sql/sql_show.cc index d12ad0010e2..726e90de4c8 100644 --- a/sql/sql_show.cc +++ b/sql/sql_show.cc @@ -2055,8 +2055,8 @@ int get_all_tables(THD *thd, TABLE_LIST *tables, COND *cond) (base_name= select_lex->db) && !bases.elements)) { #ifndef NO_EMBEDDED_ACCESS_CHECKS - if (with_i_schema || // don't check the rights if information schema db - !check_access(thd,SELECT_ACL, base_name, &thd->col_access,0,1) || + if (!check_access(thd,SELECT_ACL, base_name, + &thd->col_access, 0, 1, with_i_schema) || thd->master_access & (DB_ACLS | SHOW_DB_ACL) || acl_get(thd->host, thd->ip, thd->priv_user, base_name,0) || (grant_option && !check_grant_db(thd, base_name))) @@ -2478,7 +2478,7 @@ static int get_schema_column_record(THD *thd, struct st_table_list *tables, #ifndef NO_EMBEDDED_ACCESS_CHECKS uint col_access; check_access(thd,SELECT_ACL | EXTRA_ACL, base_name, - &tables->grant.privilege, 0, 0); + &tables->grant.privilege, 0, 0, test(tables->schema_table)); col_access= get_column_grant(thd, &tables->grant, base_name, file_name, field->field_name) & COL_ACLS; @@ -2494,12 +2494,7 @@ static int get_schema_column_record(THD *thd, struct st_table_list *tables, end=strmov(end,grant_types.type_names[bitnr]); } } - if (tables->schema_table) // any user has 'select' privilege on all - // I_S table columns - table->field[17]->store(grant_types.type_names[0], - strlen(grant_types.type_names[0]), cs); - else - table->field[17]->store(tmp+1,end == tmp ? 0 : (uint) (end-tmp-1), cs); + table->field[17]->store(tmp+1,end == tmp ? 0 : (uint) (end-tmp-1), cs); #endif table->field[1]->store(base_name, base_name_length, cs); |