| 12887 | } |
| 12888 | |
| 12889 | int fill_schema_enabled_roles(THD *thd, TABLE_LIST *tables, COND *cond) |
| 12890 | { |
| 12891 | TABLE *table= tables->table; |
| 12892 | #ifndef NO_EMBEDDED_ACCESS_CHECKS |
| 12893 | if (thd->security_ctx->priv_role[0]) |
| 12894 | { |
| 12895 | mysql_rwlock_rdlock(&LOCK_grant); |
| 12896 | mysql_mutex_lock(&acl_cache->lock); |
| 12897 | ACL_ROLE *acl_role= find_acl_role(Lex_cstring_strlen( |
| 12898 | thd->security_ctx->priv_role), |
| 12899 | false); |
| 12900 | if (acl_role) |
| 12901 | traverse_role_graph_down(acl_role, table, enabled_roles_insert, NULL); |
| 12902 | mysql_mutex_unlock(&acl_cache->lock); |
| 12903 | mysql_rwlock_unlock(&LOCK_grant); |
| 12904 | if (acl_role) |
| 12905 | return 0; |
| 12906 | } |
| 12907 | #endif |
| 12908 | |
| 12909 | restore_record(table, s->default_values); |
| 12910 | table->field[0]->set_null(); |
| 12911 | return schema_table_store_record(table->in_use, table); |
| 12912 | } |
| 12913 | |
| 12914 | |
| 12915 | /* |
nothing calls this directly
no test coverage detected