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
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
MariaDB
Commits
b8344be4
Commit
b8344be4
authored
Jan 14, 2019
by
Sergei Golubchik
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
cleanup
parent
9b3f177c
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
12 deletions
+8
-12
sql/sql_acl.cc
sql/sql_acl.cc
+8
-12
No files found.
sql/sql_acl.cc
View file @
b8344be4
...
...
@@ -624,7 +624,6 @@ static int acl_user_compare(const ACL_USER *a, const ACL_USER *b);
static
void
rebuild_acl_users
();
static
int
acl_db_compare
(
const
ACL_DB
*
a
,
const
ACL_DB
*
b
);
static
void
rebuild_acl_dbs
();
static
ulong
get_sort
(
uint
count
,...);
static
void
init_check_host
(
void
);
static
void
rebuild_check_host
(
void
);
static
void
rebuild_role_grants
(
void
);
...
...
@@ -3980,13 +3979,12 @@ static bool test_if_create_new_users(THD *thd)
****************************************************************************/
static
int
replace_user_table
(
THD
*
thd
,
const
User_table
&
user_table
,
LEX_USER
*
combo
,
ulong
rights
,
bool
revoke_grant
,
bool
can_create_user
,
bool
no_auto_create
)
LEX_USER
*
const
combo
,
ulong
rights
,
const
bool
revoke_grant
,
const
bool
can_create_user
,
const
bool
no_auto_create
)
{
int
error
=
-
1
;
bool
old_row_exists
=
0
;
char
what
=
(
revoke_grant
)
?
'N'
:
'Y'
;
uchar
user_key
[
MAX_KEY_LENGTH
];
bool
handle_as_role
=
combo
->
is_role
();
LEX
*
lex
=
thd
->
lex
;
...
...
@@ -4003,11 +4001,9 @@ static int replace_user_table(THD *thd, const User_table &user_table,
table
->
key_info
->
key_length
);
if
(
table
->
file
->
ha_index_read_idx_map
(
table
->
record
[
0
],
0
,
user_key
,
HA_WHOLE_KEY
,
HA_READ_KEY_EXACT
))
HA_WHOLE_KEY
,
HA_READ_KEY_EXACT
))
{
/* what == 'N' means revoke */
if
(
what
==
'N'
)
if
(
revoke_grant
)
{
my_error
(
ER_NONEXISTING_GRANT
,
MYF
(
0
),
combo
->
user
.
str
,
combo
->
host
.
str
);
goto
end
;
...
...
@@ -4220,13 +4216,13 @@ static int replace_user_table(THD *thd, const User_table &user_table,
static
int
replace_db_table
(
TABLE
*
table
,
const
char
*
db
,
const
LEX_USER
&
combo
,
ulong
rights
,
bool
revoke_grant
)
ulong
rights
,
const
bool
revoke_grant
)
{
uint
i
;
ulong
priv
,
store_rights
;
bool
old_row_exists
=
0
;
int
error
;
char
what
=
(
revoke_grant
)
?
'N'
:
'Y'
;
char
what
=
revoke_grant
?
'N'
:
'Y'
;
uchar
user_key
[
MAX_KEY_LENGTH
];
DBUG_ENTER
(
"replace_db_table"
);
...
...
@@ -4255,7 +4251,7 @@ static int replace_db_table(TABLE *table, const char *db,
HA_WHOLE_KEY
,
HA_READ_KEY_EXACT
))
{
if
(
what
==
'N'
)
if
(
revoke_grant
)
{
// no row, no revoke
my_error
(
ER_NONEXISTING_GRANT
,
MYF
(
0
),
combo
.
user
.
str
,
combo
.
host
.
str
);
goto
abort
;
...
...
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