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
3e2c08cc
Commit
3e2c08cc
authored
May 29, 2006
by
msvensson@neptunus.(none)
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update after merge to 5.0
parent
20e07141
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
25 additions
and
20 deletions
+25
-20
mysql-test/r/grant.result
mysql-test/r/grant.result
+19
-18
mysql-test/t/grant.test
mysql-test/t/grant.test
+1
-1
sql/sql_acl.cc
sql/sql_acl.cc
+5
-1
No files found.
mysql-test/r/grant.result
View file @
3e2c08cc
...
@@ -624,6 +624,25 @@ GRANT USAGE ON *.* TO 'mysqltest_7'@'' IDENTIFIED BY PASSWORD '*2FB071A056F9BB74
...
@@ -624,6 +624,25 @@ GRANT USAGE ON *.* TO 'mysqltest_7'@'' IDENTIFIED BY PASSWORD '*2FB071A056F9BB74
drop user mysqltest_7@;
drop user mysqltest_7@;
show grants for mysqltest_7@;
show grants for mysqltest_7@;
ERROR 42000: There is no such grant defined for user 'mysqltest_7' on host ''
ERROR 42000: There is no such grant defined for user 'mysqltest_7' on host ''
create database mysqltest;
use mysqltest;
create table t1(f1 int);
GRANT DELETE ON mysqltest.t1 TO mysqltest1@'%';
GRANT SELECT ON mysqltest.t1 TO mysqltest1@'192.%';
show grants for mysqltest1@'192.%';
Grants for mysqltest1@192.%
GRANT USAGE ON *.* TO 'mysqltest1'@'192.%'
GRANT SELECT ON `mysqltest`.`t1` TO 'mysqltest1'@'192.%'
show grants for mysqltest1@'%';
Grants for mysqltest1@%
GRANT USAGE ON *.* TO 'mysqltest1'@'%'
GRANT DELETE ON `mysqltest`.`t1` TO 'mysqltest1'@'%'
delete from mysql.user where user='mysqltest1';
delete from mysql.db where user='mysqltest1';
delete from mysql.tables_priv where user='mysqltest1';
flush privileges;
drop database mysqltest;
use test;
create table t1 (a int);
create table t1 (a int);
create table t2 as select * from mysql.user where user='';
create table t2 as select * from mysql.user where user='';
delete from mysql.user where user='';
delete from mysql.user where user='';
...
@@ -834,21 +853,3 @@ insert into mysql.user select * from t2;
...
@@ -834,21 +853,3 @@ insert into mysql.user select * from t2;
flush privileges;
flush privileges;
drop table t2;
drop table t2;
drop table t1;
drop table t1;
create database mysqltest;
use mysqltest;
create table t1(f1 int);
GRANT DELETE ON mysqltest.t1 TO mysqltest1@'%';
GRANT SELECT ON mysqltest.t1 TO mysqltest1@'192.%';
show grants for mysqltest1@'192.%';
Grants for mysqltest1@192.%
GRANT USAGE ON *.* TO 'mysqltest1'@'192.%'
GRANT SELECT ON `mysqltest`.`t1` TO 'mysqltest1'@'192.%'
show grants for mysqltest1@'%';
Grants for mysqltest1@%
GRANT USAGE ON *.* TO 'mysqltest1'@'%'
GRANT DELETE ON `mysqltest`.`t1` TO 'mysqltest1'@'%'
delete from mysql.user where user='mysqltest1';
delete from mysql.db where user='mysqltest1';
delete from mysql.tables_priv where user='mysqltest1';
flush privileges;
drop database mysqltest;
mysql-test/t/grant.test
View file @
3e2c08cc
...
@@ -532,7 +532,7 @@ drop database mysqltest;
...
@@ -532,7 +532,7 @@ drop database mysqltest;
#
#
# Bug #16297 In memory grant tables not flushed when users's hostname is ""
# Bug #16297 In memory grant tables not flushed when users's hostname is ""
#
#
use
test
;
create
table
t1
(
a
int
);
create
table
t1
(
a
int
);
# Backup anonymous users and remove them. (They get in the way of
# Backup anonymous users and remove them. (They get in the way of
...
...
sql/sql_acl.cc
View file @
3e2c08cc
...
@@ -2273,7 +2273,8 @@ static GRANT_NAME *name_hash_search(HASH *name_hash,
...
@@ -2273,7 +2273,8 @@ static GRANT_NAME *name_hash_search(HASH *name_hash,
{
{
if
(
exact
)
if
(
exact
)
{
{
if
((
host
&&
if
(
!
grant_name
->
host
.
hostname
||
(
host
&&
!
my_strcasecmp
(
system_charset_info
,
host
,
!
my_strcasecmp
(
system_charset_info
,
host
,
grant_name
->
host
.
hostname
))
||
grant_name
->
host
.
hostname
))
||
(
ip
&&
!
strcmp
(
ip
,
grant_name
->
host
.
hostname
)))
(
ip
&&
!
strcmp
(
ip
,
grant_name
->
host
.
hostname
)))
...
@@ -4956,6 +4957,9 @@ static int handle_grant_struct(uint struct_no, bool drop,
...
@@ -4956,6 +4957,9 @@ static int handle_grant_struct(uint struct_no, bool drop,
}
}
if
(
!
user
)
if
(
!
user
)
user
=
""
;
user
=
""
;
if
(
!
host
)
host
=
""
;
#ifdef EXTRA_DEBUG
#ifdef EXTRA_DEBUG
DBUG_PRINT
(
"loop"
,(
"scan struct: %u index: %u user: '%s' host: '%s'"
,
DBUG_PRINT
(
"loop"
,(
"scan struct: %u index: %u user: '%s' host: '%s'"
,
struct_no
,
idx
,
user
,
host
));
struct_no
,
idx
,
user
,
host
));
...
...
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