summaryrefslogtreecommitdiff
path: root/sql/sql_show.cc
diff options
context:
space:
mode:
Diffstat (limited to 'sql/sql_show.cc')
-rw-r--r--sql/sql_show.cc12
1 files changed, 10 insertions, 2 deletions
diff --git a/sql/sql_show.cc b/sql/sql_show.cc
index 1079c1e3d98..73adad222fb 100644
--- a/sql/sql_show.cc
+++ b/sql/sql_show.cc
@@ -3620,8 +3620,7 @@ static int get_schema_column_record(THD *thd, TABLE_LIST *tables,
col_access= get_column_grant(thd, &tables->grant,
db_name->str, table_name->str,
field->field_name) & COL_ACLS;
- if (lex->sql_command != SQLCOM_SHOW_FIELDS &&
- !tables->schema_table && !col_access)
+ if (!tables->schema_table && !col_access)
continue;
end= tmp;
for (uint bitnr=0; col_access ; col_access>>=1,bitnr++)
@@ -4414,6 +4413,12 @@ static int get_schema_triggers_record(THD *thd, TABLE_LIST *tables,
{
Table_triggers_list *triggers= tables->table->triggers;
int event, timing;
+
+#ifndef NO_EMBEDDED_ACCESS_CHECKS
+ if (check_table_access(thd, TRIGGER_ACL, tables, 1))
+ goto ret;
+#endif
+
for (event= 0; event < (int)TRG_EVENT_MAX; event++)
{
for (timing= 0; timing < (int)TRG_ACTION_MAX; timing++)
@@ -4450,6 +4455,9 @@ static int get_schema_triggers_record(THD *thd, TABLE_LIST *tables,
}
}
}
+#ifndef NO_EMBEDDED_ACCESS_CHECKS
+ret:
+#endif
DBUG_RETURN(0);
}