summaryrefslogtreecommitdiff
path: root/sql/sql_show.cc
diff options
context:
space:
mode:
authorVicențiu Ciorbaru <cvicentiu@gmail.com>2015-02-09 17:16:55 +0200
committerVicențiu Ciorbaru <cvicentiu@gmail.com>2015-02-09 17:16:55 +0200
commit4c69a6fff267f4c80ef1b360985b831932353c10 (patch)
tree14eff80432081255233bf086a9492215bab24156 /sql/sql_show.cc
parentbceb0b0be10bfbcd49981fa48981ca9b491b868e (diff)
downloadmariadb-git-4c69a6fff267f4c80ef1b360985b831932353c10.tar.gz
MDEV-6918 Create a way to see a user's default role.
Added an extra column to i_s_applicable_roles, named IS_DEFAULT. The column displays which role is the default role for the user querying the table.
Diffstat (limited to 'sql/sql_show.cc')
-rw-r--r--sql/sql_show.cc1
1 files changed, 1 insertions, 0 deletions
diff --git a/sql/sql_show.cc b/sql/sql_show.cc
index 1efd5c15c4d..20c40472d57 100644
--- a/sql/sql_show.cc
+++ b/sql/sql_show.cc
@@ -8220,6 +8220,7 @@ ST_FIELD_INFO applicable_roles_fields_info[]=
{"GRANTEE", USERNAME_WITH_HOST_CHAR_LENGTH, MYSQL_TYPE_STRING, 0, 0, 0, SKIP_OPEN_TABLE},
{"ROLE_NAME", USERNAME_CHAR_LENGTH, MYSQL_TYPE_STRING, 0, 0, 0, SKIP_OPEN_TABLE},
{"IS_GRANTABLE", 3, MYSQL_TYPE_STRING, 0, 0, 0, SKIP_OPEN_TABLE},
+ {"IS_DEFAULT", 3, MYSQL_TYPE_STRING, 0, MY_I_S_MAYBE_NULL, 0, SKIP_OPEN_TABLE},
{0, 0, MYSQL_TYPE_STRING, 0, 0, 0, SKIP_OPEN_TABLE}
};