Commit ce688789 authored by Sergei Golubchik's avatar Sergei Golubchik

fixes for embedded

parent cb9d3bec
......@@ -14,6 +14,8 @@
# smallest possible number of nodes and doesn't merge privileges that
# didn't change)
#
source include/not_embedded.inc;
create user foo@localhost;
create role role1;
create role role2;
......
......@@ -16,6 +16,9 @@ def information_schema ALL_PLUGINS PLUGIN_STATUS 3 NO varchar 16 48 NULL NULL N
def information_schema ALL_PLUGINS PLUGIN_TYPE 4 NO varchar 80 240 NULL NULL NULL utf8 utf8_general_ci varchar(80)
def information_schema ALL_PLUGINS PLUGIN_TYPE_VERSION 5 NO varchar 20 60 NULL NULL NULL utf8 utf8_general_ci varchar(20)
def information_schema ALL_PLUGINS PLUGIN_VERSION 2 NO varchar 20 60 NULL NULL NULL utf8 utf8_general_ci varchar(20)
def information_schema APPLICABLE_ROLES GRANTEE 1 NO varchar 190 570 NULL NULL NULL utf8 utf8_general_ci varchar(190)
def information_schema APPLICABLE_ROLES IS_GRANTABLE 3 NO varchar 3 9 NULL NULL NULL utf8 utf8_general_ci varchar(3)
def information_schema APPLICABLE_ROLES ROLE_NAME 2 NO varchar 128 384 NULL NULL NULL utf8 utf8_general_ci varchar(128)
def information_schema CHARACTER_SETS CHARACTER_SET_NAME 1 NO varchar 32 96 NULL NULL NULL utf8 utf8_general_ci varchar(32)
def information_schema CHARACTER_SETS DEFAULT_COLLATE_NAME 2 NO varchar 32 96 NULL NULL NULL utf8 utf8_general_ci varchar(32)
def information_schema CHARACTER_SETS DESCRIPTION 3 NO varchar 60 180 NULL NULL NULL utf8 utf8_general_ci varchar(60)
......@@ -72,12 +75,13 @@ def information_schema COLUMNS TABLE_CATALOG 1 NO varchar 512 1536 NULL NULL NU
def information_schema COLUMNS TABLE_NAME 3 NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64)
def information_schema COLUMNS TABLE_SCHEMA 2 NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64)
def information_schema COLUMN_PRIVILEGES COLUMN_NAME 5 NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64)
def information_schema COLUMN_PRIVILEGES GRANTEE 1 NO varchar 81 243 NULL NULL NULL utf8 utf8_general_ci varchar(81)
def information_schema COLUMN_PRIVILEGES GRANTEE 1 NO varchar 190 570 NULL NULL NULL utf8 utf8_general_ci varchar(190)
def information_schema COLUMN_PRIVILEGES IS_GRANTABLE 7 NO varchar 3 9 NULL NULL NULL utf8 utf8_general_ci varchar(3)
def information_schema COLUMN_PRIVILEGES PRIVILEGE_TYPE 6 NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64)
def information_schema COLUMN_PRIVILEGES TABLE_CATALOG 2 NO varchar 512 1536 NULL NULL NULL utf8 utf8_general_ci varchar(512)
def information_schema COLUMN_PRIVILEGES TABLE_NAME 4 NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64)
def information_schema COLUMN_PRIVILEGES TABLE_SCHEMA 3 NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64)
def information_schema ENABLED_ROLES ROLE_NAME 1 NULL YES varchar 128 384 NULL NULL NULL utf8 utf8_general_ci varchar(128)
def information_schema ENGINES COMMENT 3 NO varchar 160 480 NULL NULL NULL utf8 utf8_general_ci varchar(160)
def information_schema ENGINES ENGINE 1 NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64)
def information_schema ENGINES SAVEPOINTS 6 NULL YES varchar 3 9 NULL NULL NULL utf8 utf8_general_ci varchar(3)
......@@ -294,7 +298,7 @@ def information_schema SCHEMATA DEFAULT_CHARACTER_SET_NAME 3 NO varchar 32 96 N
def information_schema SCHEMATA DEFAULT_COLLATION_NAME 4 NO varchar 32 96 NULL NULL NULL utf8 utf8_general_ci varchar(32)
def information_schema SCHEMATA SCHEMA_NAME 2 NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64)
def information_schema SCHEMATA SQL_PATH 5 NULL YES varchar 512 1536 NULL NULL NULL utf8 utf8_general_ci varchar(512)
def information_schema SCHEMA_PRIVILEGES GRANTEE 1 NO varchar 81 243 NULL NULL NULL utf8 utf8_general_ci varchar(81)
def information_schema SCHEMA_PRIVILEGES GRANTEE 1 NO varchar 190 570 NULL NULL NULL utf8 utf8_general_ci varchar(190)
def information_schema SCHEMA_PRIVILEGES IS_GRANTABLE 5 NO varchar 3 9 NULL NULL NULL utf8 utf8_general_ci varchar(3)
def information_schema SCHEMA_PRIVILEGES PRIVILEGE_TYPE 4 NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64)
def information_schema SCHEMA_PRIVILEGES TABLE_CATALOG 2 NO varchar 512 1536 NULL NULL NULL utf8 utf8_general_ci varchar(512)
......@@ -355,7 +359,7 @@ def information_schema TABLE_CONSTRAINTS CONSTRAINT_SCHEMA 2 NO varchar 64 192
def information_schema TABLE_CONSTRAINTS CONSTRAINT_TYPE 6 NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64)
def information_schema TABLE_CONSTRAINTS TABLE_NAME 5 NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64)
def information_schema TABLE_CONSTRAINTS TABLE_SCHEMA 4 NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64)
def information_schema TABLE_PRIVILEGES GRANTEE 1 NO varchar 81 243 NULL NULL NULL utf8 utf8_general_ci varchar(81)
def information_schema TABLE_PRIVILEGES GRANTEE 1 NO varchar 190 570 NULL NULL NULL utf8 utf8_general_ci varchar(190)
def information_schema TABLE_PRIVILEGES IS_GRANTABLE 6 NO varchar 3 9 NULL NULL NULL utf8 utf8_general_ci varchar(3)
def information_schema TABLE_PRIVILEGES PRIVILEGE_TYPE 5 NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64)
def information_schema TABLE_PRIVILEGES TABLE_CATALOG 2 NO varchar 512 1536 NULL NULL NULL utf8 utf8_general_ci varchar(512)
......@@ -388,7 +392,7 @@ def information_schema TRIGGERS SQL_MODE 18 NO varchar 8192 24576 NULL NULL NUL
def information_schema TRIGGERS TRIGGER_CATALOG 1 NO varchar 512 1536 NULL NULL NULL utf8 utf8_general_ci varchar(512)
def information_schema TRIGGERS TRIGGER_NAME 3 NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64)
def information_schema TRIGGERS TRIGGER_SCHEMA 2 NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64)
def information_schema USER_PRIVILEGES GRANTEE 1 NO varchar 81 243 NULL NULL NULL utf8 utf8_general_ci varchar(81)
def information_schema USER_PRIVILEGES GRANTEE 1 NO varchar 190 570 NULL NULL NULL utf8 utf8_general_ci varchar(190)
def information_schema USER_PRIVILEGES IS_GRANTABLE 4 NO varchar 3 9 NULL NULL NULL utf8 utf8_general_ci varchar(3)
def information_schema USER_PRIVILEGES PRIVILEGE_TYPE 3 NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64)
def information_schema USER_PRIVILEGES TABLE_CATALOG 2 NO varchar 512 1536 NULL NULL NULL utf8 utf8_general_ci varchar(512)
......@@ -500,6 +504,9 @@ COL_CML TABLE_SCHEMA TABLE_NAME COLUMN_NAME DATA_TYPE CHARACTER_MAXIMUM_LENGTH C
3.0000 information_schema ALL_PLUGINS LOAD_OPTION varchar 64 192 utf8 utf8_general_ci varchar(64)
3.0000 information_schema ALL_PLUGINS PLUGIN_MATURITY varchar 12 36 utf8 utf8_general_ci varchar(12)
3.0000 information_schema ALL_PLUGINS PLUGIN_AUTH_VERSION varchar 80 240 utf8 utf8_general_ci varchar(80)
3.0000 information_schema APPLICABLE_ROLES GRANTEE varchar 190 570 utf8 utf8_general_ci varchar(190)
3.0000 information_schema APPLICABLE_ROLES ROLE_NAME varchar 128 384 utf8 utf8_general_ci varchar(128)
3.0000 information_schema APPLICABLE_ROLES IS_GRANTABLE varchar 3 9 utf8 utf8_general_ci varchar(3)
3.0000 information_schema CHARACTER_SETS CHARACTER_SET_NAME varchar 32 96 utf8 utf8_general_ci varchar(32)
3.0000 information_schema CHARACTER_SETS DEFAULT_COLLATE_NAME varchar 32 96 utf8 utf8_general_ci varchar(32)
3.0000 information_schema CHARACTER_SETS DESCRIPTION varchar 60 180 utf8 utf8_general_ci varchar(60)
......@@ -555,13 +562,14 @@ NULL information_schema COLUMNS DATETIME_PRECISION bigint NULL NULL NULL NULL bi
3.0000 information_schema COLUMNS EXTRA varchar 27 81 utf8 utf8_general_ci varchar(27)
3.0000 information_schema COLUMNS PRIVILEGES varchar 80 240 utf8 utf8_general_ci varchar(80)
3.0000 information_schema COLUMNS COLUMN_COMMENT varchar 1024 3072 utf8 utf8_general_ci varchar(1024)
3.0000 information_schema COLUMN_PRIVILEGES GRANTEE varchar 81 243 utf8 utf8_general_ci varchar(81)
3.0000 information_schema COLUMN_PRIVILEGES GRANTEE varchar 190 570 utf8 utf8_general_ci varchar(190)
3.0000 information_schema COLUMN_PRIVILEGES TABLE_CATALOG varchar 512 1536 utf8 utf8_general_ci varchar(512)
3.0000 information_schema COLUMN_PRIVILEGES TABLE_SCHEMA varchar 64 192 utf8 utf8_general_ci varchar(64)
3.0000 information_schema COLUMN_PRIVILEGES TABLE_NAME varchar 64 192 utf8 utf8_general_ci varchar(64)
3.0000 information_schema COLUMN_PRIVILEGES COLUMN_NAME varchar 64 192 utf8 utf8_general_ci varchar(64)
3.0000 information_schema COLUMN_PRIVILEGES PRIVILEGE_TYPE varchar 64 192 utf8 utf8_general_ci varchar(64)
3.0000 information_schema COLUMN_PRIVILEGES IS_GRANTABLE varchar 3 9 utf8 utf8_general_ci varchar(3)
3.0000 information_schema ENABLED_ROLES ROLE_NAME varchar 128 384 utf8 utf8_general_ci varchar(128)
3.0000 information_schema ENGINES ENGINE varchar 64 192 utf8 utf8_general_ci varchar(64)
3.0000 information_schema ENGINES SUPPORT varchar 8 24 utf8 utf8_general_ci varchar(8)
3.0000 information_schema ENGINES COMMENT varchar 160 480 utf8 utf8_general_ci varchar(160)
......@@ -778,7 +786,7 @@ NULL information_schema ROUTINES LAST_ALTERED datetime NULL NULL NULL NULL datet
3.0000 information_schema SCHEMATA DEFAULT_CHARACTER_SET_NAME varchar 32 96 utf8 utf8_general_ci varchar(32)
3.0000 information_schema SCHEMATA DEFAULT_COLLATION_NAME varchar 32 96 utf8 utf8_general_ci varchar(32)
3.0000 information_schema SCHEMATA SQL_PATH varchar 512 1536 utf8 utf8_general_ci varchar(512)
3.0000 information_schema SCHEMA_PRIVILEGES GRANTEE varchar 81 243 utf8 utf8_general_ci varchar(81)
3.0000 information_schema SCHEMA_PRIVILEGES GRANTEE varchar 190 570 utf8 utf8_general_ci varchar(190)
3.0000 information_schema SCHEMA_PRIVILEGES TABLE_CATALOG varchar 512 1536 utf8 utf8_general_ci varchar(512)
3.0000 information_schema SCHEMA_PRIVILEGES TABLE_SCHEMA varchar 64 192 utf8 utf8_general_ci varchar(64)
3.0000 information_schema SCHEMA_PRIVILEGES PRIVILEGE_TYPE varchar 64 192 utf8 utf8_general_ci varchar(64)
......@@ -839,7 +847,7 @@ NULL information_schema TABLESPACES NODEGROUP_ID bigint NULL NULL NULL NULL bigi
3.0000 information_schema TABLE_CONSTRAINTS TABLE_SCHEMA varchar 64 192 utf8 utf8_general_ci varchar(64)
3.0000 information_schema TABLE_CONSTRAINTS TABLE_NAME varchar 64 192 utf8 utf8_general_ci varchar(64)
3.0000 information_schema TABLE_CONSTRAINTS CONSTRAINT_TYPE varchar 64 192 utf8 utf8_general_ci varchar(64)
3.0000 information_schema TABLE_PRIVILEGES GRANTEE varchar 81 243 utf8 utf8_general_ci varchar(81)
3.0000 information_schema TABLE_PRIVILEGES GRANTEE varchar 190 570 utf8 utf8_general_ci varchar(190)
3.0000 information_schema TABLE_PRIVILEGES TABLE_CATALOG varchar 512 1536 utf8 utf8_general_ci varchar(512)
3.0000 information_schema TABLE_PRIVILEGES TABLE_SCHEMA varchar 64 192 utf8 utf8_general_ci varchar(64)
3.0000 information_schema TABLE_PRIVILEGES TABLE_NAME varchar 64 192 utf8 utf8_general_ci varchar(64)
......@@ -872,7 +880,7 @@ NULL information_schema TRIGGERS CREATED datetime NULL NULL NULL NULL datetime
3.0000 information_schema TRIGGERS CHARACTER_SET_CLIENT varchar 32 96 utf8 utf8_general_ci varchar(32)
3.0000 information_schema TRIGGERS COLLATION_CONNECTION varchar 32 96 utf8 utf8_general_ci varchar(32)
3.0000 information_schema TRIGGERS DATABASE_COLLATION varchar 32 96 utf8 utf8_general_ci varchar(32)
3.0000 information_schema USER_PRIVILEGES GRANTEE varchar 81 243 utf8 utf8_general_ci varchar(81)
3.0000 information_schema USER_PRIVILEGES GRANTEE varchar 190 570 utf8 utf8_general_ci varchar(190)
3.0000 information_schema USER_PRIVILEGES TABLE_CATALOG varchar 512 1536 utf8 utf8_general_ci varchar(512)
3.0000 information_schema USER_PRIVILEGES PRIVILEGE_TYPE varchar 64 192 utf8 utf8_general_ci varchar(64)
3.0000 information_schema USER_PRIVILEGES IS_GRANTABLE varchar 3 9 utf8 utf8_general_ci varchar(3)
......
......@@ -161,6 +161,10 @@ def mysql proxies_priv Proxied_user 4 NO char 16 48 NULL NULL NULL utf8 utf8_bi
def mysql proxies_priv Timestamp 7 CURRENT_TIMESTAMP NO timestamp NULL NULL NULL NULL 0 NULL NULL timestamp on update CURRENT_TIMESTAMP
def mysql proxies_priv User 2 NO char 16 48 NULL NULL NULL utf8 utf8_bin char(16) PRI
def mysql proxies_priv With_grant 5 0 NO tinyint NULL NULL 3 0 NULL NULL NULL tinyint(1)
def mysql roles_mapping Admin_option 4 N NO enum 1 3 NULL NULL NULL utf8 utf8_general_ci enum('N','Y')
def mysql roles_mapping Host 1 NO char 60 180 NULL NULL NULL utf8 utf8_bin char(60) PRI
def mysql roles_mapping Role 3 NO char 16 48 NULL NULL NULL utf8 utf8_bin char(16) PRI
def mysql roles_mapping User 2 NO char 16 48 NULL NULL NULL utf8 utf8_bin char(16) PRI
def mysql servers Db 3 NO char 64 192 NULL NULL NULL utf8 utf8_general_ci char(64)
def mysql servers Host 2 NO char 64 192 NULL NULL NULL utf8 utf8_general_ci char(64)
def mysql servers Owner 9 NO char 64 192 NULL NULL NULL utf8 utf8_general_ci char(64)
......@@ -224,6 +228,7 @@ def mysql user Grant_priv 14 N NO enum 1 3 NULL NULL NULL utf8 utf8_general_ci e
def mysql user Host 1 NO char 60 180 NULL NULL NULL utf8 utf8_bin char(60) PRI
def mysql user Index_priv 16 N NO enum 1 3 NULL NULL NULL utf8 utf8_general_ci enum('N','Y')
def mysql user Insert_priv 5 N NO enum 1 3 NULL NULL NULL utf8 utf8_general_ci enum('N','Y')
def mysql user is_role 43 N NO enum 1 3 NULL NULL NULL utf8 utf8_general_ci enum('N','Y')
def mysql user Lock_tables_priv 21 N NO enum 1 3 NULL NULL NULL utf8 utf8_general_ci enum('N','Y')
def mysql user max_connections 39 0 NO int NULL NULL 10 0 NULL NULL NULL int(11) unsigned
def mysql user max_questions 37 0 NO int NULL NULL 10 0 NULL NULL NULL int(11) unsigned
......@@ -480,6 +485,10 @@ NULL mysql procs_priv Timestamp timestamp NULL NULL NULL NULL timestamp
NULL mysql proxies_priv With_grant tinyint NULL NULL NULL NULL tinyint(1)
3.0000 mysql proxies_priv Grantor char 77 231 utf8 utf8_bin char(77)
NULL mysql proxies_priv Timestamp timestamp NULL NULL NULL NULL timestamp
3.0000 mysql roles_mapping Host char 60 180 utf8 utf8_bin char(60)
3.0000 mysql roles_mapping User char 16 48 utf8 utf8_bin char(16)
3.0000 mysql roles_mapping Role char 16 48 utf8 utf8_bin char(16)
3.0000 mysql roles_mapping Admin_option enum 1 3 utf8 utf8_general_ci enum('N','Y')
3.0000 mysql servers Server_name char 64 192 utf8 utf8_general_ci char(64)
3.0000 mysql servers Host char 64 192 utf8 utf8_general_ci char(64)
3.0000 mysql servers Db char 64 192 utf8 utf8_general_ci char(64)
......@@ -567,3 +576,4 @@ NULL mysql user max_connections int NULL NULL NULL NULL int(11) unsigned
NULL mysql user max_user_connections int NULL NULL NULL NULL int(11)
1.0000 mysql user plugin char 64 64 latin1 latin1_swedish_ci char(64)
1.0000 mysql user authentication_string text 65535 65535 utf8 utf8_bin text
3.0000 mysql user is_role enum 1 3 utf8 utf8_general_ci enum('N','Y')
......@@ -54,6 +54,9 @@ def mysql proxies_priv 0 mysql PRIMARY 1 Host A #CARD# NULL NULL BTREE
def mysql proxies_priv 0 mysql PRIMARY 2 User A #CARD# NULL NULL BTREE
def mysql proxies_priv 0 mysql PRIMARY 3 Proxied_host A #CARD# NULL NULL BTREE
def mysql proxies_priv 0 mysql PRIMARY 4 Proxied_user A #CARD# NULL NULL BTREE
def mysql roles_mapping 0 mysql Host 1 Host A #CARD# NULL NULL BTREE
def mysql roles_mapping 0 mysql Host 2 User A #CARD# NULL NULL BTREE
def mysql roles_mapping 0 mysql Host 3 Role A #CARD# NULL NULL BTREE
def mysql servers 0 mysql PRIMARY 1 Server_name A #CARD# NULL NULL BTREE
def mysql tables_priv 1 mysql Grantor 1 Grantor A #CARD# NULL NULL BTREE
def mysql tables_priv 0 mysql PRIMARY 1 Host A #CARD# NULL NULL BTREE
......@@ -123,6 +126,9 @@ def mysql proxies_priv 0 mysql PRIMARY 1 Host A #CARD# NULL NULL BTREE
def mysql proxies_priv 0 mysql PRIMARY 2 User A #CARD# NULL NULL BTREE
def mysql proxies_priv 0 mysql PRIMARY 3 Proxied_host A #CARD# NULL NULL BTREE
def mysql proxies_priv 0 mysql PRIMARY 4 Proxied_user A #CARD# NULL NULL BTREE
def mysql roles_mapping 0 mysql Host 1 Host A #CARD# NULL NULL BTREE
def mysql roles_mapping 0 mysql Host 2 User A #CARD# NULL NULL BTREE
def mysql roles_mapping 0 mysql Host 3 Role A #CARD# NULL NULL BTREE
def mysql servers 0 mysql PRIMARY 1 Server_name A #CARD# NULL NULL BTREE
def mysql tables_priv 1 mysql Grantor 1 Grantor A #CARD# NULL NULL BTREE
def mysql tables_priv 0 mysql PRIMARY 1 Host A #CARD# NULL NULL BTREE
......
......@@ -27,6 +27,7 @@ def mysql PRIMARY mysql plugin PRIMARY KEY
def mysql PRIMARY mysql proc PRIMARY KEY
def mysql PRIMARY mysql procs_priv PRIMARY KEY
def mysql PRIMARY mysql proxies_priv PRIMARY KEY
def mysql Host mysql roles_mapping UNIQUE
def mysql PRIMARY mysql servers PRIMARY KEY
def mysql PRIMARY mysql tables_priv PRIMARY KEY
def mysql PRIMARY mysql table_stats PRIMARY KEY
......@@ -61,6 +62,7 @@ def mysql PRIMARY mysql plugin PRIMARY KEY
def mysql PRIMARY mysql proc PRIMARY KEY
def mysql PRIMARY mysql procs_priv PRIMARY KEY
def mysql PRIMARY mysql proxies_priv PRIMARY KEY
def mysql Host mysql roles_mapping UNIQUE
def mysql PRIMARY mysql servers PRIMARY KEY
def mysql PRIMARY mysql tables_priv PRIMARY KEY
def mysql PRIMARY mysql table_stats PRIMARY KEY
......
......@@ -39,6 +39,29 @@ user_comment
Separator -----------------------------------------------------
TABLE_CATALOG def
TABLE_SCHEMA information_schema
TABLE_NAME APPLICABLE_ROLES
TABLE_TYPE SYSTEM VIEW
ENGINE MEMORY
VERSION 10
ROW_FORMAT Fixed
TABLE_ROWS #TBLR#
AVG_ROW_LENGTH #ARL#
DATA_LENGTH #DL#
MAX_DATA_LENGTH #MDL#
INDEX_LENGTH #IL#
DATA_FREE #DF#
AUTO_INCREMENT NULL
CREATE_TIME #CRT#
UPDATE_TIME #UT#
CHECK_TIME #CT#
TABLE_COLLATION utf8_general_ci
CHECKSUM NULL
CREATE_OPTIONS #CO#
TABLE_COMMENT #TC#
user_comment
Separator -----------------------------------------------------
TABLE_CATALOG def
TABLE_SCHEMA information_schema
TABLE_NAME CHARACTER_SETS
TABLE_TYPE SYSTEM VIEW
ENGINE MEMORY
......@@ -177,6 +200,29 @@ user_comment
Separator -----------------------------------------------------
TABLE_CATALOG def
TABLE_SCHEMA information_schema
TABLE_NAME ENABLED_ROLES
TABLE_TYPE SYSTEM VIEW
ENGINE MEMORY
VERSION 10
ROW_FORMAT Fixed
TABLE_ROWS #TBLR#
AVG_ROW_LENGTH #ARL#
DATA_LENGTH #DL#
MAX_DATA_LENGTH #MDL#
INDEX_LENGTH #IL#
DATA_FREE #DF#
AUTO_INCREMENT NULL
CREATE_TIME #CRT#
UPDATE_TIME #UT#
CHECK_TIME #CT#
TABLE_COLLATION utf8_general_ci
CHECKSUM NULL
CREATE_OPTIONS #CO#
TABLE_COMMENT #TC#
user_comment
Separator -----------------------------------------------------
TABLE_CATALOG def
TABLE_SCHEMA information_schema
TABLE_NAME ENGINES
TABLE_TYPE SYSTEM VIEW
ENGINE MEMORY
......@@ -862,6 +908,29 @@ user_comment
Separator -----------------------------------------------------
TABLE_CATALOG def
TABLE_SCHEMA information_schema
TABLE_NAME APPLICABLE_ROLES
TABLE_TYPE SYSTEM VIEW
ENGINE MEMORY
VERSION 10
ROW_FORMAT Fixed
TABLE_ROWS #TBLR#
AVG_ROW_LENGTH #ARL#
DATA_LENGTH #DL#
MAX_DATA_LENGTH #MDL#
INDEX_LENGTH #IL#
DATA_FREE #DF#
AUTO_INCREMENT NULL
CREATE_TIME #CRT#
UPDATE_TIME #UT#
CHECK_TIME #CT#
TABLE_COLLATION utf8_general_ci
CHECKSUM NULL
CREATE_OPTIONS #CO#
TABLE_COMMENT #TC#
user_comment
Separator -----------------------------------------------------
TABLE_CATALOG def
TABLE_SCHEMA information_schema
TABLE_NAME CHARACTER_SETS
TABLE_TYPE SYSTEM VIEW
ENGINE MEMORY
......@@ -1000,6 +1069,29 @@ user_comment
Separator -----------------------------------------------------
TABLE_CATALOG def
TABLE_SCHEMA information_schema
TABLE_NAME ENABLED_ROLES
TABLE_TYPE SYSTEM VIEW
ENGINE MEMORY
VERSION 10
ROW_FORMAT Fixed
TABLE_ROWS #TBLR#
AVG_ROW_LENGTH #ARL#
DATA_LENGTH #DL#
MAX_DATA_LENGTH #MDL#
INDEX_LENGTH #IL#
DATA_FREE #DF#
AUTO_INCREMENT NULL
CREATE_TIME #CRT#
UPDATE_TIME #UT#
CHECK_TIME #CT#
TABLE_COLLATION utf8_general_ci
CHECKSUM NULL
CREATE_OPTIONS #CO#
TABLE_COMMENT #TC#
user_comment
Separator -----------------------------------------------------
TABLE_CATALOG def
TABLE_SCHEMA information_schema
TABLE_NAME ENGINES
TABLE_TYPE SYSTEM VIEW
ENGINE MEMORY
......
......@@ -428,6 +428,29 @@ user_comment User proxy privileges
Separator -----------------------------------------------------
TABLE_CATALOG def
TABLE_SCHEMA mysql
TABLE_NAME roles_mapping
TABLE_TYPE BASE TABLE
ENGINE MYISAM_OR_MARIA
VERSION 10
ROW_FORMAT Fixed
TABLE_ROWS #TBLR#
AVG_ROW_LENGTH #ARL#
DATA_LENGTH #DL#
MAX_DATA_LENGTH #MDL#
INDEX_LENGTH #IL#
DATA_FREE #DF#
AUTO_INCREMENT NULL
CREATE_TIME #CRT#
UPDATE_TIME #UT#
CHECK_TIME #CT#
TABLE_COLLATION utf8_bin
CHECKSUM NULL
CREATE_OPTIONS #CO#
TABLE_COMMENT #TC#
user_comment Granted roles
Separator -----------------------------------------------------
TABLE_CATALOG def
TABLE_SCHEMA mysql
TABLE_NAME servers
TABLE_TYPE BASE TABLE
ENGINE MYISAM_OR_MARIA
......@@ -1088,6 +1111,29 @@ user_comment User proxy privileges
Separator -----------------------------------------------------
TABLE_CATALOG def
TABLE_SCHEMA mysql
TABLE_NAME roles_mapping
TABLE_TYPE BASE TABLE
ENGINE MYISAM_OR_MARIA
VERSION 10
ROW_FORMAT Fixed
TABLE_ROWS #TBLR#
AVG_ROW_LENGTH #ARL#
DATA_LENGTH #DL#
MAX_DATA_LENGTH #MDL#
INDEX_LENGTH #IL#
DATA_FREE #DF#
AUTO_INCREMENT NULL
CREATE_TIME #CRT#
UPDATE_TIME #UT#
CHECK_TIME #CT#
TABLE_COLLATION utf8_bin
CHECKSUM NULL
CREATE_OPTIONS #CO#
TABLE_COMMENT #TC#
user_comment Granted roles
Separator -----------------------------------------------------
TABLE_CATALOG def
TABLE_SCHEMA mysql
TABLE_NAME servers
TABLE_TYPE BASE TABLE
ENGINE MYISAM_OR_MARIA
......
source include/not_embedded.inc;
grant create user on *.* to foo@localhost;
########################################
......
source include/not_embedded.inc;
connect (mysql, localhost, root,,);
use mysql;
......
source include/not_embedded.inc;
connect (mysql, localhost, root,,);
use mysql;
......
source include/not_embedded.inc;
create role r1;
grant r1 to root@localhost;
create user u1;
......
source include/not_embedded.inc;
connect (mysql, localhost, root,,);
use mysql;
create user 'test'@'localhost';
......
......@@ -4,6 +4,7 @@
# create event
# mysqldump dumping the definer
source include/not_embedded.inc;
let MYSQLD_DATADIR=`select @@datadir`;
create database mysqltest1;
......
source include/not_embedded.inc;
create role role1;
--error ER_INVALID_ROLE
......
source include/not_embedded.inc;
create role r1;
create user u1;
......
source include/not_embedded.inc;
#create a user with no privileges
create user test_user@localhost;
......
source include/not_embedded.inc;
#create a user with no privileges
create user test_user@localhost;
create role test_role1;
......
source include/not_embedded.inc;
#create a user with no privileges
create user 'test_user'@'localhost';
create role test_role1;
......
source include/not_embedded.inc;
#create a user with no privileges
create user 'test_user'@'localhost';
......
source include/not_embedded.inc;
#create a user with no privileges
create user test_user@localhost;
......
source include/not_embedded.inc;
create user 'test_user'@'localhost';
create role test_role1;
create role test_role2;
......
source include/not_embedded.inc;
#create a user with no privileges
create user test_user@localhost;
......
source include/not_embedded.inc;
create user test_user@localhost;
create role test_role1;
create role test_role2;
......
source include/not_embedded.inc;
create user test_user@localhost;
create role test_role1;
create role test_role2;
......
source include/not_embedded.inc;
#create a user with no privileges
create user test_user@localhost;
create role test_role1;
......
......@@ -311,6 +311,18 @@ class ACL_DB :public ACL_ACCESS
ulong initial_access; /* access bits present in the table */
};
static char *safe_str(char *str)
{ return str ? str : const_cast<char*>(""); }
static const char *safe_str(const char *str)
{ return str ? str : ""; }
#ifndef DBUG_OFF
/* status variables, only visible in SHOW STATUS after -#d,role_merge_stats */
ulong role_global_merges= 0, role_db_merges= 0, role_table_merges= 0,
role_column_merges= 0, role_routine_merges= 0;
#endif
#ifndef NO_EMBEDDED_ACCESS_CHECKS
static void update_hostname(acl_host_and_ip *host, const char *hostname);
static ulong get_sort(uint count,...);
......@@ -328,12 +340,6 @@ static bool show_table_and_column_privileges(THD *, const char *, const char *,
static int show_routine_grants(THD *, const char *, const char *, HASH *,
const char *, int, char *, int);
static char *safe_str(char *str)
{ return str ? str : const_cast<char*>(""); }
static const char *safe_str(const char *str)
{ return str ? str : ""; }
class ACL_PROXY_USER :public ACL_ACCESS
{
acl_host_and_ip host;
......@@ -4503,12 +4509,6 @@ static int count_subgraph_nodes(ACL_ROLE *role, ACL_ROLE *grantee, void *context
static int merge_role_privileges(ACL_ROLE *, ACL_ROLE *, void *);
#ifndef DBUG_OFF
/* status variables, only visible in SHOW STATUS after -#d,role_merge_stats */
ulong role_global_merges= 0, role_db_merges= 0, role_table_merges= 0,
role_column_merges= 0, role_routine_merges= 0;
#endif
/**
rebuild privileges of all affected roles
......@@ -10469,6 +10469,7 @@ LEX_USER *get_current_user(THD *thd, LEX_USER *user, bool lock)
if (!dup)
return 0;
#ifndef NO_EMBEDDED_ACCESS_CHECKS
if (is_invalid_role_name(user->user.str))
return 0;
......@@ -10480,6 +10481,8 @@ LEX_USER *get_current_user(THD *thd, LEX_USER *user, bool lock)
dup->host= host_not_specified;
if (lock)
mysql_mutex_unlock(&acl_cache->lock);
#endif
return dup;
}
......
......@@ -1246,7 +1246,7 @@ bool mysql_make_view(THD *thd, File_parser *parser, TABLE_LIST *table,
TABLE_LIST *view_tables= lex->query_tables;
TABLE_LIST *view_tables_tail= 0;
TABLE_LIST *tbl;
Security_context *security_ctx;
Security_context *security_ctx= 0;
/*
Check rights to run commands (EXPLAIN SELECT & SHOW CREATE) which show
......@@ -1421,6 +1421,7 @@ bool mysql_make_view(THD *thd, File_parser *parser, TABLE_LIST *table,
if (view_select->options & OPTION_TO_QUERY_CACHE)
old_lex->select_lex.options|= OPTION_TO_QUERY_CACHE;
#ifndef NO_EMBEDDED_ACCESS_CHECKS
if (table->view_suid)
{
/*
......@@ -1441,6 +1442,7 @@ bool mysql_make_view(THD *thd, File_parser *parser, TABLE_LIST *table,
*/
security_ctx= table->security_ctx;
}
#endif
/* Assign the context to the tables referenced in the view */
if (view_tables)
......
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