Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
mariadb
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
mariadb
Commits
ce688789
Commit
ce688789
authored
Oct 18, 2013
by
Sergei Golubchik
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixes for embedded
parent
cb9d3bec
Changes
27
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
27 changed files
with
223 additions
and
21 deletions
+223
-21
mysql-test/include/acl_roles_recursive.inc
mysql-test/include/acl_roles_recursive.inc
+2
-0
mysql-test/suite/funcs_1/r/is_columns_is_embedded.result
mysql-test/suite/funcs_1/r/is_columns_is_embedded.result
+16
-8
mysql-test/suite/funcs_1/r/is_columns_mysql_embedded.result
mysql-test/suite/funcs_1/r/is_columns_mysql_embedded.result
+10
-0
mysql-test/suite/funcs_1/r/is_statistics_mysql_embedded.result
...-test/suite/funcs_1/r/is_statistics_mysql_embedded.result
+6
-0
mysql-test/suite/funcs_1/r/is_table_constraints_mysql_embedded.result
...uite/funcs_1/r/is_table_constraints_mysql_embedded.result
+2
-0
mysql-test/suite/funcs_1/r/is_tables_is_embedded.result
mysql-test/suite/funcs_1/r/is_tables_is_embedded.result
+92
-0
mysql-test/suite/funcs_1/r/is_tables_mysql_embedded.result
mysql-test/suite/funcs_1/r/is_tables_mysql_embedded.result
+46
-0
mysql-test/t/acl_roles_admin.test
mysql-test/t/acl_roles_admin.test
+2
-0
mysql-test/t/acl_roles_create_and_drop_role.test
mysql-test/t/acl_roles_create_and_drop_role.test
+2
-0
mysql-test/t/acl_roles_create_and_drop_role_invalid_user_table.test
.../t/acl_roles_create_and_drop_role_invalid_user_table.test
+2
-0
mysql-test/t/acl_roles_create_and_grant_role.test
mysql-test/t/acl_roles_create_and_grant_role.test
+2
-0
mysql-test/t/acl_roles_default_create_user_not_role.test
mysql-test/t/acl_roles_default_create_user_not_role.test
+2
-0
mysql-test/t/acl_roles_definer.test
mysql-test/t/acl_roles_definer.test
+1
-0
mysql-test/t/acl_roles_none_public.test
mysql-test/t/acl_roles_none_public.test
+2
-0
mysql-test/t/acl_roles_rebuild_role_grants.test
mysql-test/t/acl_roles_rebuild_role_grants.test
+1
-0
mysql-test/t/acl_roles_rename_user.test
mysql-test/t/acl_roles_rename_user.test
+1
-0
mysql-test/t/acl_roles_set_role-database-recursive.test
mysql-test/t/acl_roles_set_role-database-recursive.test
+2
-0
mysql-test/t/acl_roles_set_role-database-simple.test
mysql-test/t/acl_roles_set_role-database-simple.test
+2
-0
mysql-test/t/acl_roles_set_role-multiple-role.test
mysql-test/t/acl_roles_set_role-multiple-role.test
+2
-0
mysql-test/t/acl_roles_set_role-recursive.test
mysql-test/t/acl_roles_set_role-recursive.test
+1
-0
mysql-test/t/acl_roles_set_role-routine-simple.test
mysql-test/t/acl_roles_set_role-routine-simple.test
+2
-0
mysql-test/t/acl_roles_set_role-simple.test
mysql-test/t/acl_roles_set_role-simple.test
+1
-0
mysql-test/t/acl_roles_set_role-table-column-priv.test
mysql-test/t/acl_roles_set_role-table-column-priv.test
+2
-0
mysql-test/t/acl_roles_set_role-table-simple.test
mysql-test/t/acl_roles_set_role-table-simple.test
+2
-0
mysql-test/t/acl_roles_show_grants.test
mysql-test/t/acl_roles_show_grants.test
+2
-0
sql/sql_acl.cc
sql/sql_acl.cc
+15
-12
sql/sql_view.cc
sql/sql_view.cc
+3
-1
No files found.
mysql-test/include/acl_roles_recursive.inc
View file @
ce688789
...
...
@@ -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
;
...
...
mysql-test/suite/funcs_1/r/is_columns_is_embedded.result
View file @
ce688789
This diff is collapsed.
Click to expand it.
mysql-test/suite/funcs_1/r/is_columns_mysql_embedded.result
View file @
ce688789
...
...
@@ -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')
mysql-test/suite/funcs_1/r/is_statistics_mysql_embedded.result
View file @
ce688789
...
...
@@ -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
...
...
mysql-test/suite/funcs_1/r/is_table_constraints_mysql_embedded.result
View file @
ce688789
...
...
@@ -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
...
...
mysql-test/suite/funcs_1/r/is_tables_is_embedded.result
View file @
ce688789
...
...
@@ -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
...
...
mysql-test/suite/funcs_1/r/is_tables_mysql_embedded.result
View file @
ce688789
...
...
@@ -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
...
...
mysql-test/t/acl_roles_admin.test
View file @
ce688789
source
include
/
not_embedded
.
inc
;
grant
create
user
on
*.*
to
foo
@
localhost
;
########################################
...
...
mysql-test/t/acl_roles_create_and_drop_role.test
View file @
ce688789
source
include
/
not_embedded
.
inc
;
connect
(
mysql
,
localhost
,
root
,,);
use
mysql
;
...
...
mysql-test/t/acl_roles_create_and_drop_role_invalid_user_table.test
View file @
ce688789
source
include
/
not_embedded
.
inc
;
connect
(
mysql
,
localhost
,
root
,,);
use
mysql
;
...
...
mysql-test/t/acl_roles_create_and_grant_role.test
View file @
ce688789
source
include
/
not_embedded
.
inc
;
create
role
r1
;
grant
r1
to
root
@
localhost
;
create
user
u1
;
...
...
mysql-test/t/acl_roles_default_create_user_not_role.test
View file @
ce688789
source
include
/
not_embedded
.
inc
;
connect
(
mysql
,
localhost
,
root
,,);
use
mysql
;
create
user
'test'
@
'localhost'
;
...
...
mysql-test/t/acl_roles_definer.test
View file @
ce688789
...
...
@@ -4,6 +4,7 @@
# create event
# mysqldump dumping the definer
source
include
/
not_embedded
.
inc
;
let
MYSQLD_DATADIR
=
`select @@datadir`
;
create
database
mysqltest1
;
...
...
mysql-test/t/acl_roles_none_public.test
View file @
ce688789
source
include
/
not_embedded
.
inc
;
create
role
role1
;
--
error
ER_INVALID_ROLE
...
...
mysql-test/t/acl_roles_rebuild_role_grants.test
View file @
ce688789
source
include
/
not_embedded
.
inc
;
create
role
r1
;
create
user
u1
;
...
...
mysql-test/t/acl_roles_rename_user.test
View file @
ce688789
source
include
/
not_embedded
.
inc
;
#create a user with no privileges
create
user
test_user
@
localhost
;
...
...
mysql-test/t/acl_roles_set_role-database-recursive.test
View file @
ce688789
source
include
/
not_embedded
.
inc
;
#create a user with no privileges
create
user
test_user
@
localhost
;
create
role
test_role1
;
...
...
mysql-test/t/acl_roles_set_role-database-simple.test
View file @
ce688789
source
include
/
not_embedded
.
inc
;
#create a user with no privileges
create
user
'test_user'
@
'localhost'
;
create
role
test_role1
;
...
...
mysql-test/t/acl_roles_set_role-multiple-role.test
View file @
ce688789
source
include
/
not_embedded
.
inc
;
#create a user with no privileges
create
user
'test_user'
@
'localhost'
;
...
...
mysql-test/t/acl_roles_set_role-recursive.test
View file @
ce688789
source
include
/
not_embedded
.
inc
;
#create a user with no privileges
create
user
test_user
@
localhost
;
...
...
mysql-test/t/acl_roles_set_role-routine-simple.test
View file @
ce688789
source
include
/
not_embedded
.
inc
;
create
user
'test_user'
@
'localhost'
;
create
role
test_role1
;
create
role
test_role2
;
...
...
mysql-test/t/acl_roles_set_role-simple.test
View file @
ce688789
source
include
/
not_embedded
.
inc
;
#create a user with no privileges
create
user
test_user
@
localhost
;
...
...
mysql-test/t/acl_roles_set_role-table-column-priv.test
View file @
ce688789
source
include
/
not_embedded
.
inc
;
create
user
test_user
@
localhost
;
create
role
test_role1
;
create
role
test_role2
;
...
...
mysql-test/t/acl_roles_set_role-table-simple.test
View file @
ce688789
source
include
/
not_embedded
.
inc
;
create
user
test_user
@
localhost
;
create
role
test_role1
;
create
role
test_role2
;
...
...
mysql-test/t/acl_roles_show_grants.test
View file @
ce688789
source
include
/
not_embedded
.
inc
;
#create a user with no privileges
create
user
test_user
@
localhost
;
create
role
test_role1
;
...
...
sql/sql_acl.cc
View file @
ce688789
...
...
@@ -311,6 +311,18 @@ public:
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
;
}
...
...
sql/sql_view.cc
View file @
ce688789
...
...
@@ -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
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment