Commit 5d34f827 authored by unknown's avatar unknown

SHOW PRIVILEGES updated (Bug#3227)


Docs/README.1st:
  Change mode to -rw-rw-r--
parent 0a6f6662
File mode changed from 100755 to 100644
...@@ -36,6 +36,12 @@ ...@@ -36,6 +36,12 @@
#define REPL_SLAVE_ACL (1L << 19) #define REPL_SLAVE_ACL (1L << 19)
#define REPL_CLIENT_ACL (1L << 20) #define REPL_CLIENT_ACL (1L << 20)
/*
don't forget to update
static struct show_privileges_st sys_privileges[]
in sql_show.cc when adding new privileges!
*/
#define DB_ACLS \ #define DB_ACLS \
(UPDATE_ACL | SELECT_ACL | INSERT_ACL | DELETE_ACL | CREATE_ACL | DROP_ACL | \ (UPDATE_ACL | SELECT_ACL | INSERT_ACL | DELETE_ACL | CREATE_ACL | DROP_ACL | \
......
...@@ -219,30 +219,32 @@ struct show_privileges_st { ...@@ -219,30 +219,32 @@ struct show_privileges_st {
const char *comment; const char *comment;
}; };
/*
TODO: Update with new privileges
*/
static struct show_privileges_st sys_privileges[]= static struct show_privileges_st sys_privileges[]=
{ {
{"Select", "Tables", "To retrieve rows from table"}, {"Alter", "Tables", "To alter the table"},
{"Insert", "Tables", "To insert data into tables"}, {"Create temporary tables","Databases","To use CREATE TEMPORARY TABLE"},
{"Update", "Tables", "To update existing rows "},
{"Delete", "Tables", "To delete existing rows"},
{"Index", "Tables", "To create or drop indexes"},
{"Alter", "Tables", "To alter the table"},
{"Create", "Databases,Tables,Indexes", "To create new databases and tables"}, {"Create", "Databases,Tables,Indexes", "To create new databases and tables"},
{"Drop", "Databases,Tables", "To drop databases and tables"}, {"Delete", "Tables", "To delete existing rows"},
{"Grant", "Databases,Tables", "To give to other users those privileges you possess"}, {"Drop", "Databases,Tables", "To drop databases and tables"},
{"File", "File access on server", "To read and write files on the server"},
{"Grant option", "Databases,Tables", "To give to other users those privileges you possess"},
{"Index", "Tables", "To create or drop indexes"},
{"Insert", "Tables", "To insert data into tables"},
{"Lock tables","Databases","To use LOCK TABLES (together with SELECT privilege)"},
{"Process", "Server Admin", "To view the plain text of currently executing queries"},
{"References", "Databases,Tables", "To have references on tables"}, {"References", "Databases,Tables", "To have references on tables"},
{"Reload", "Server Admin", "To reload or refresh tables, logs and privileges"}, {"Reload", "Server Admin", "To reload or refresh tables, logs and privileges"},
{"Replication client","Server Admin","To ask where the slave or master servers are"},
{"Replication slave","Server Admin","To read binary log events from the master"},
{"Select", "Tables", "To retrieve rows from table"},
{"Show databases","Server Admin","To see all databases with SHOW DATABASES"},
{"Shutdown","Server Admin", "To shutdown the server"}, {"Shutdown","Server Admin", "To shutdown the server"},
{"Process", "Server Admin", "To view the plain text of currently executing queries"}, {"Super","Server Admin","To use KILL thread, SET GLOBAL, CHANGE MASTER, etc."},
{"File", "File access on server", "To read and write files on the server"}, {"Update", "Tables", "To update existing rows"},
{"Usage","Server Admin","No privileges - allow connect only"},
{NullS, NullS, NullS} {NullS, NullS, NullS}
}; };
int mysqld_show_privileges(THD *thd) int mysqld_show_privileges(THD *thd)
{ {
List<Item> field_list; List<Item> field_list;
...@@ -299,11 +301,11 @@ static struct show_column_type_st sys_column_types[]= ...@@ -299,11 +301,11 @@ static struct show_column_type_st sys_column_types[]=
{ {
{"tinyint", {"tinyint",
1, "-128", "127", 0, 0, "YES", "YES", 1, "-128", "127", 0, 0, "YES", "YES",
"NO", "YES", "YES", "NO", "NULL,0", "NO", "YES", "YES", "NO", "NULL,0",
"A very small integer"}, "A very small integer"},
{"tinyint unsigned", {"tinyint unsigned",
1, "0" , "255", 0, 0, "YES", "YES", 1, "0" , "255", 0, 0, "YES", "YES",
"YES", "YES", "YES", "NO", "NULL,0", "YES", "YES", "YES", "NO", "NULL,0",
"A very small integer"}, "A very small integer"},
}; };
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment