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
b0b6d81b
Commit
b0b6d81b
authored
Jul 22, 2003
by
serg@serg.mylan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wild_compare fun: bug in GRANT db_pattern.* ...
parent
52e043fd
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
61 additions
and
0 deletions
+61
-0
mysql-test/r/grant2.result
mysql-test/r/grant2.result
+24
-0
mysql-test/t/grant2.test
mysql-test/t/grant2.test
+37
-0
No files found.
mysql-test/r/grant2.result
0 → 100644
View file @
b0b6d81b
delete from mysql.user where user like 'mysqltest\_%';
delete from mysql.db where user like 'mysqltest\_%';
flush privileges;
grant all privileges on `my\_%`.* to mysqltest_1@localhost with grant option;
select current_user();
current_user()
mysqltest_1@localhost
grant all privileges on `my\_1`.* to mysqltest_9@localhost with grant option;
ERROR 42000: Access denied for user: 'mysqltest_1@localhost' to database 'my\_1'
grant all privileges on `my_%`.* to mysqltest_2@localhost with grant option;
select current_user();
current_user()
mysqltest_2@localhost
grant all privileges on `mysql`.* to mysqltest_3@localhost with grant option;
select current_user();
current_user()
mysqltest_3@localhost
show grants for mysqltest_3@localhost;
Grants for mysqltest_3@localhost
GRANT USAGE ON *.* TO 'mysqltest_3'@'localhost'
GRANT ALL PRIVILEGES ON `mysql`.* TO 'mysqltest_3'@'localhost' WITH GRANT OPTION
delete from mysql.user where user like 'mysqltest\_%';
delete from mysql.db where user like 'mysqltest\_%';
flush privileges;
mysql-test/t/grant2.test
0 → 100644
View file @
b0b6d81b
#
# GRANT tests that require several connections
# (usually it's GRANT, reconnect as another user, try something)
#
#
# wild_compare fun
#
delete
from
mysql
.
user
where
user
like
'mysqltest\_%'
;
delete
from
mysql
.
db
where
user
like
'mysqltest\_%'
;
flush
privileges
;
grant
all
privileges
on
`my\_%`
.*
to
mysqltest_1
@
localhost
with
grant
option
;
connect
(
user1
,
localhost
,
mysqltest_1
,,);
connection
user1
;
select
current_user
();
--
error
1044
grant
all
privileges
on
`my\_1`
.*
to
mysqltest_9
@
localhost
with
grant
option
;
grant
all
privileges
on
`my_%`
.*
to
mysqltest_2
@
localhost
with
grant
option
;
disconnect
user1
;
connect
(
user2
,
localhost
,
mysqltest_2
,,);
connection
user2
;
select
current_user
();
grant
all
privileges
on
`mysql`
.*
to
mysqltest_3
@
localhost
with
grant
option
;
disconnect
user2
;
connect
(
user3
,
localhost
,
mysqltest_3
,,);
connection
user3
;
select
current_user
();
show
grants
for
mysqltest_3
@
localhost
;
disconnect
user3
;
connect
(
root
,
localhost
,
root
,,);
connection
root
;
delete
from
mysql
.
user
where
user
like
'mysqltest\_%'
;
delete
from
mysql
.
db
where
user
like
'mysqltest\_%'
;
flush
privileges
;
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