diff options
author | unknown <gluh@mysql.com> | 2005-09-14 12:46:03 +0500 |
---|---|---|
committer | unknown <gluh@mysql.com> | 2005-09-14 12:46:03 +0500 |
commit | f42792275fafe18374fc38777c0e509c91e54737 (patch) | |
tree | b4381c5bfe9e4fdd22327e65c2bd6a4a3f42809f /sql/sql_show.cc | |
parent | 392dd4d0f36f15e54ea1edc9d1bc40f79f3baa52 (diff) | |
parent | 2828c5f594c39eef28558be68e263423853783fd (diff) | |
download | mariadb-git-f42792275fafe18374fc38777c0e509c91e54737.tar.gz |
Merge sgluhov@bk-internal.mysql.com:/home/bk/mysql-5.0
into mysql.com:/home/gluh/MySQL/Bugs/5.0.cml
sql/sql_show.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 80361e0ed11..821e49e288c 100644 --- a/sql/sql_show.cc +++ b/sql/sql_show.cc @@ -2041,8 +2041,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))) @@ -2464,7 +2464,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; @@ -2480,12 +2480,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); |