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
321eb3dc
Commit
321eb3dc
authored
Mar 06, 2006
by
gluh@mysql.com
Browse files
Options
Browse Files
Download
Plain Diff
Merge sgluhov@bk-internal.mysql.com:/home/bk/mysql-5.0
into mysql.com:/home/gluh/MySQL/Merge/5.0
parents
593bd1d3
f3ce98d2
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
38 additions
and
1 deletion
+38
-1
mysql-test/r/grant.result
mysql-test/r/grant.result
+18
-0
mysql-test/t/grant.test
mysql-test/t/grant.test
+16
-0
sql/sql_acl.cc
sql/sql_acl.cc
+4
-1
No files found.
mysql-test/r/grant.result
View file @
321eb3dc
...
...
@@ -624,3 +624,21 @@ drop user mysqltest_7@;
flush privileges;
show grants for mysqltest_7@;
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;
mysql-test/t/grant.test
View file @
321eb3dc
...
...
@@ -511,4 +511,20 @@ flush privileges; # BUG#16297(flush should be removed when that bug is fixed)
--
error
1141
show
grants
for
mysqltest_7
@
;
#
# Bug#14385: GRANT and mapping to correct user account problems
#
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.%'
;
show
grants
for
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
;
# End of 4.1 tests
sql/sql_acl.cc
View file @
321eb3dc
...
...
@@ -2258,7 +2258,10 @@ static GRANT_NAME *name_hash_search(HASH *name_hash,
{
if
(
exact
)
{
if
(
compare_hostname
(
&
grant_name
->
host
,
host
,
ip
))
if
((
host
&&
!
my_strcasecmp
(
system_charset_info
,
host
,
grant_name
->
host
.
hostname
))
||
(
ip
&&
!
strcmp
(
ip
,
grant_name
->
host
.
hostname
)))
return
grant_name
;
}
else
...
...
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