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
a2ad96cf
Commit
a2ad96cf
authored
Mar 27, 2005
by
serg@serg.mylan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
more wild_compare tests
parent
82072418
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
39 additions
and
4 deletions
+39
-4
mysql-test/r/grant2.result
mysql-test/r/grant2.result
+20
-3
mysql-test/t/grant2.test
mysql-test/t/grant2.test
+19
-1
No files found.
mysql-test/r/grant2.result
View file @
a2ad96cf
SET NAMES binary;
drop database if exists mysqltest;
drop database if exists mysqltest_1;
delete from mysql.user where user like 'mysqltest\_%';
delete from mysql.db where user like 'mysqltest\_%';
delete from mysql.tables_priv where user like 'mysqltest\_%';
...
...
@@ -9,9 +10,6 @@ grant all privileges on `my\_%`.* to mysqltest_1@localhost with grant option;
select current_user();
current_user()
mysqltest_1@localhost
select current_user;
current_user
mysqltest_1@localhost
grant all privileges on `my\_1`.* to mysqltest_2@localhost with grant option;
grant all privileges on `my_%`.* to mysqltest_3@localhost with grant option;
ERROR 42000: Access denied for user 'mysqltest_1'@'localhost' to database 'my_%'
...
...
@@ -28,6 +26,25 @@ ERROR 42000: There is no such grant defined for user 'mysqltest_3' on host 'loca
delete from mysql.user where user like 'mysqltest\_%';
delete from mysql.db where user like 'mysqltest\_%';
flush privileges;
create database mysqltest_1;
grant all privileges on `mysqltest\_1`.* to mysqltest_1@localhost with grant option;
select current_user();
current_user()
mysqltest_1@localhost
show databases;
Database
mysqltest_1
test
grant all privileges on `mysqltest_1`.* to mysqltest_1@localhost with grant option;
ERROR 42000: Access denied for user 'mysqltest_1'@'localhost' to database 'mysqltest_1'
show grants for mysqltest_1@localhost;
Grants for mysqltest_1@localhost
GRANT USAGE ON *.* TO 'mysqltest_1'@'localhost'
GRANT ALL PRIVILEGES ON `mysqltest\_1`.* TO 'mysqltest_1'@'localhost' WITH GRANT OPTION
delete from mysql.user where user like 'mysqltest\_%';
delete from mysql.db where user like 'mysqltest\_%';
drop database mysqltest_1;
flush privileges;
create database mysqltest;
grant INSERT, SELECT on mysqltest.* to mysqltest_1@localhost;
flush privileges;
...
...
mysql-test/t/grant2.test
View file @
a2ad96cf
...
...
@@ -9,6 +9,7 @@ SET NAMES binary;
# prepare playground before tests
--
disable_warnings
drop
database
if
exists
mysqltest
;
drop
database
if
exists
mysqltest_1
;
--
enable_warnings
delete
from
mysql
.
user
where
user
like
'mysqltest\_%'
;
delete
from
mysql
.
db
where
user
like
'mysqltest\_%'
;
...
...
@@ -25,7 +26,6 @@ grant all privileges on `my\_%`.* to mysqltest_1@localhost with grant option;
connect
(
user1
,
localhost
,
mysqltest_1
,,);
connection
user1
;
select
current_user
();
select
current_user
;
grant
all
privileges
on
`my\_1`
.*
to
mysqltest_2
@
localhost
with
grant
option
;
--
error
1044
grant
all
privileges
on
`my_%`
.*
to
mysqltest_3
@
localhost
with
grant
option
;
...
...
@@ -39,6 +39,24 @@ delete from mysql.user where user like 'mysqltest\_%';
delete
from
mysql
.
db
where
user
like
'mysqltest\_%'
;
flush
privileges
;
#
# wild_compare part two - acl_cache
#
create
database
mysqltest_1
;
grant
all
privileges
on
`mysqltest\_1`
.*
to
mysqltest_1
@
localhost
with
grant
option
;
connect
(
user2
,
localhost
,
mysqltest_1
,,);
connection
user2
;
select
current_user
();
show
databases
;
--
error
1044
grant
all
privileges
on
`mysqltest_1`
.*
to
mysqltest_1
@
localhost
with
grant
option
;
disconnect
user2
;
connection
default
;
show
grants
for
mysqltest_1
@
localhost
;
delete
from
mysql
.
user
where
user
like
'mysqltest\_%'
;
delete
from
mysql
.
db
where
user
like
'mysqltest\_%'
;
drop
database
mysqltest_1
;
flush
privileges
;
#
# Bug #6173: One can circumvent missing UPDATE privilege if he has SELECT
...
...
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