| 6878 | */ |
| 6879 | |
| 6880 | bool check_one_table_access(THD *thd, privilege_t privilege, |
| 6881 | TABLE_LIST *all_tables) |
| 6882 | { |
| 6883 | if (check_single_table_access (thd,privilege,all_tables, FALSE)) |
| 6884 | return 1; |
| 6885 | |
| 6886 | /* Check rights on tables of subselects and implicitly opened tables */ |
| 6887 | TABLE_LIST *subselects_tables, *view= all_tables->view ? all_tables : 0; |
| 6888 | if ((subselects_tables= all_tables->next_global)) |
| 6889 | { |
| 6890 | /* |
| 6891 | Access rights asked for the first table of a view should be the same |
| 6892 | as for the view |
| 6893 | */ |
| 6894 | if (view && subselects_tables->belong_to_view == view) |
| 6895 | { |
| 6896 | if (check_single_table_access (thd, privilege, subselects_tables, FALSE)) |
| 6897 | return 1; |
| 6898 | subselects_tables= subselects_tables->next_global; |
| 6899 | } |
| 6900 | if (subselects_tables && |
| 6901 | (check_table_access(thd, SELECT_ACL, subselects_tables, FALSE, |
| 6902 | UINT_MAX, FALSE))) |
| 6903 | return 1; |
| 6904 | } |
| 6905 | return 0; |
| 6906 | } |
| 6907 | |
| 6908 | |
| 6909 | static bool check_show_access(THD *thd, TABLE_LIST *table) |
no test coverage detected