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
88be0aa2
Commit
88be0aa2
authored
Oct 18, 2010
by
Dmitry Shulga
Browse files
Options
Browse Files
Download
Plain Diff
Auto-merge from mysql-5.1-bugteam for bug#36742.
parents
367549ab
99077143
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
20 deletions
+10
-20
mysql-test/r/grant3.result
mysql-test/r/grant3.result
+5
-20
mysql-test/t/grant3.test
mysql-test/t/grant3.test
+5
-0
No files found.
mysql-test/r/grant3.result
View file @
88be0aa2
...
@@ -21,123 +21,108 @@ grant select on test.* to CUser@LOCALHOST;
...
@@ -21,123 +21,108 @@ grant select on test.* to CUser@LOCALHOST;
flush privileges;
flush privileges;
SELECT user, host FROM mysql.user where user = 'CUser' order by 1,2;
SELECT user, host FROM mysql.user where user = 'CUser' order by 1,2;
user host
user host
CUser LOCALHOST
CUser localhost
CUser localhost
SELECT user, host, db, select_priv FROM mysql.db where user = 'CUser' order by 1,2;
SELECT user, host, db, select_priv FROM mysql.db where user = 'CUser' order by 1,2;
user host db select_priv
user host db select_priv
CUser LOCALHOST test Y
CUser localhost test Y
CUser localhost test Y
REVOKE ALL PRIVILEGES, GRANT OPTION FROM 'CUser'@'LOCALHOST';
REVOKE ALL PRIVILEGES, GRANT OPTION FROM 'CUser'@'LOCALHOST';
flush privileges;
flush privileges;
SELECT user, host FROM mysql.user where user = 'CUser' order by 1,2;
SELECT user, host FROM mysql.user where user = 'CUser' order by 1,2;
user host
user host
CUser LOCALHOST
CUser localhost
CUser localhost
SELECT user, host, db, select_priv FROM mysql.db where user = 'CUser' order by 1,2;
SELECT user, host, db, select_priv FROM mysql.db where user = 'CUser' order by 1,2;
user host db select_priv
user host db select_priv
CUser localhost test Y
REVOKE ALL PRIVILEGES, GRANT OPTION FROM 'CUser'@'localhost';
REVOKE ALL PRIVILEGES, GRANT OPTION FROM 'CUser'@'localhost';
flush privileges;
flush privileges;
SELECT user, host FROM mysql.user where user = 'CUser' order by 1,2;
SELECT user, host FROM mysql.user where user = 'CUser' order by 1,2;
user host
user host
CUser LOCALHOST
CUser localhost
CUser localhost
SELECT user, host, db, select_priv FROM mysql.db where user = 'CUser' order by 1,2;
SELECT user, host, db, select_priv FROM mysql.db where user = 'CUser' order by 1,2;
user host db select_priv
user host db select_priv
DROP USER CUser@localhost;
DROP USER CUser@localhost;
DROP USER CUser@LOCALHOST;
DROP USER CUser@LOCALHOST;
ERROR HY000: Operation DROP USER failed for 'CUser'@'localhost'
create table t1 (a int);
create table t1 (a int);
grant select on test.t1 to CUser@localhost;
grant select on test.t1 to CUser@localhost;
grant select on test.t1 to CUser@LOCALHOST;
grant select on test.t1 to CUser@LOCALHOST;
flush privileges;
flush privileges;
SELECT user, host FROM mysql.user where user = 'CUser' order by 1,2;
SELECT user, host FROM mysql.user where user = 'CUser' order by 1,2;
user host
user host
CUser LOCALHOST
CUser localhost
CUser localhost
SELECT user, host, db, Table_name, Table_priv, Column_priv FROM mysql.tables_priv where user = 'CUser' order by 1,2;
SELECT user, host, db, Table_name, Table_priv, Column_priv FROM mysql.tables_priv where user = 'CUser' order by 1,2;
user host db Table_name Table_priv Column_priv
user host db Table_name Table_priv Column_priv
CUser LOCALHOST test t1 Select
CUser localhost test t1 Select
CUser localhost test t1 Select
REVOKE ALL PRIVILEGES, GRANT OPTION FROM 'CUser'@'LOCALHOST';
REVOKE ALL PRIVILEGES, GRANT OPTION FROM 'CUser'@'LOCALHOST';
flush privileges;
flush privileges;
SELECT user, host FROM mysql.user where user = 'CUser' order by 1,2;
SELECT user, host FROM mysql.user where user = 'CUser' order by 1,2;
user host
user host
CUser LOCALHOST
CUser localhost
CUser localhost
SELECT user, host, db, Table_name, Table_priv, Column_priv FROM mysql.tables_priv where user = 'CUser' order by 1,2;
SELECT user, host, db, Table_name, Table_priv, Column_priv FROM mysql.tables_priv where user = 'CUser' order by 1,2;
user host db Table_name Table_priv Column_priv
user host db Table_name Table_priv Column_priv
CUser localhost test t1 Select
REVOKE ALL PRIVILEGES, GRANT OPTION FROM 'CUser'@'localhost';
REVOKE ALL PRIVILEGES, GRANT OPTION FROM 'CUser'@'localhost';
flush privileges;
flush privileges;
SELECT user, host FROM mysql.user where user = 'CUser' order by 1,2;
SELECT user, host FROM mysql.user where user = 'CUser' order by 1,2;
user host
user host
CUser LOCALHOST
CUser localhost
CUser localhost
SELECT user, host, db, Table_name, Table_priv, Column_priv FROM mysql.tables_priv where user = 'CUser' order by 1,2;
SELECT user, host, db, Table_name, Table_priv, Column_priv FROM mysql.tables_priv where user = 'CUser' order by 1,2;
user host db Table_name Table_priv Column_priv
user host db Table_name Table_priv Column_priv
DROP USER CUser@localhost;
DROP USER CUser@localhost;
DROP USER CUser@LOCALHOST;
DROP USER CUser@LOCALHOST;
ERROR HY000: Operation DROP USER failed for 'CUser'@'localhost'
grant select(a) on test.t1 to CUser@localhost;
grant select(a) on test.t1 to CUser@localhost;
grant select(a) on test.t1 to CUser@LOCALHOST;
grant select(a) on test.t1 to CUser@LOCALHOST;
flush privileges;
flush privileges;
SELECT user, host FROM mysql.user where user = 'CUser' order by 1,2;
SELECT user, host FROM mysql.user where user = 'CUser' order by 1,2;
user host
user host
CUser LOCALHOST
CUser localhost
CUser localhost
SELECT user, host, db, Table_name, Table_priv, Column_priv FROM mysql.tables_priv where user = 'CUser' order by 1,2;
SELECT user, host, db, Table_name, Table_priv, Column_priv FROM mysql.tables_priv where user = 'CUser' order by 1,2;
user host db Table_name Table_priv Column_priv
user host db Table_name Table_priv Column_priv
CUser LOCALHOST test t1 Select
CUser localhost test t1 Select
CUser localhost test t1 Select
REVOKE ALL PRIVILEGES, GRANT OPTION FROM 'CUser'@'LOCALHOST';
REVOKE ALL PRIVILEGES, GRANT OPTION FROM 'CUser'@'LOCALHOST';
flush privileges;
flush privileges;
SELECT user, host FROM mysql.user where user = 'CUser' order by 1,2;
SELECT user, host FROM mysql.user where user = 'CUser' order by 1,2;
user host
user host
CUser LOCALHOST
CUser localhost
CUser localhost
SELECT user, host, db, Table_name, Table_priv, Column_priv FROM mysql.tables_priv where user = 'CUser' order by 1,2;
SELECT user, host, db, Table_name, Table_priv, Column_priv FROM mysql.tables_priv where user = 'CUser' order by 1,2;
user host db Table_name Table_priv Column_priv
user host db Table_name Table_priv Column_priv
CUser localhost test t1 Select
REVOKE ALL PRIVILEGES, GRANT OPTION FROM 'CUser'@'localhost';
REVOKE ALL PRIVILEGES, GRANT OPTION FROM 'CUser'@'localhost';
flush privileges;
flush privileges;
SELECT user, host FROM mysql.user where user = 'CUser' order by 1,2;
SELECT user, host FROM mysql.user where user = 'CUser' order by 1,2;
user host
user host
CUser LOCALHOST
CUser localhost
CUser localhost
SELECT user, host, db, Table_name, Table_priv, Column_priv FROM mysql.tables_priv where user = 'CUser' order by 1,2;
SELECT user, host, db, Table_name, Table_priv, Column_priv FROM mysql.tables_priv where user = 'CUser' order by 1,2;
user host db Table_name Table_priv Column_priv
user host db Table_name Table_priv Column_priv
DROP USER CUser@localhost;
DROP USER CUser@localhost;
DROP USER CUser@LOCALHOST;
DROP USER CUser@LOCALHOST;
ERROR HY000: Operation DROP USER failed for 'CUser'@'localhost'
drop table t1;
drop table t1;
grant select on test.* to CUser2@localhost;
grant select on test.* to CUser2@localhost;
grant select on test.* to CUser2@LOCALHOST;
grant select on test.* to CUser2@LOCALHOST;
flush privileges;
flush privileges;
SELECT user, host FROM mysql.user where user = 'CUser2' order by 1,2;
SELECT user, host FROM mysql.user where user = 'CUser2' order by 1,2;
user host
user host
CUser2 LOCALHOST
CUser2 localhost
CUser2 localhost
SELECT user, host, db, select_priv FROM mysql.db where user = 'CUser2' order by 1,2;
SELECT user, host, db, select_priv FROM mysql.db where user = 'CUser2' order by 1,2;
user host db select_priv
user host db select_priv
CUser2 LOCALHOST test Y
CUser2 localhost test Y
CUser2 localhost test Y
REVOKE SELECT ON test.* FROM 'CUser2'@'LOCALHOST';
REVOKE SELECT ON test.* FROM 'CUser2'@'LOCALHOST';
flush privileges;
flush privileges;
SELECT user, host FROM mysql.user where user = 'CUser2' order by 1,2;
SELECT user, host FROM mysql.user where user = 'CUser2' order by 1,2;
user host
user host
CUser2 LOCALHOST
CUser2 localhost
CUser2 localhost
SELECT user, host, db, select_priv FROM mysql.db where user = 'CUser2' order by 1,2;
SELECT user, host, db, select_priv FROM mysql.db where user = 'CUser2' order by 1,2;
user host db select_priv
user host db select_priv
CUser2 localhost test Y
REVOKE SELECT ON test.* FROM 'CUser2'@'localhost';
REVOKE SELECT ON test.* FROM 'CUser2'@'localhost';
ERROR 42000: There is no such grant defined for user 'CUser2' on host 'localhost'
flush privileges;
flush privileges;
SELECT user, host FROM mysql.user where user = 'CUser2' order by 1,2;
SELECT user, host FROM mysql.user where user = 'CUser2' order by 1,2;
user host
user host
CUser2 LOCALHOST
CUser2 localhost
CUser2 localhost
SELECT user, host, db, select_priv FROM mysql.db where user = 'CUser2' order by 1,2;
SELECT user, host, db, select_priv FROM mysql.db where user = 'CUser2' order by 1,2;
user host db select_priv
user host db select_priv
DROP USER CUser2@localhost;
DROP USER CUser2@localhost;
DROP USER CUser2@LOCALHOST;
DROP USER CUser2@LOCALHOST;
ERROR HY000: Operation DROP USER failed for 'CUser2'@'localhost'
CREATE DATABASE mysqltest_1;
CREATE DATABASE mysqltest_1;
CREATE TABLE mysqltest_1.t1 (a INT);
CREATE TABLE mysqltest_1.t1 (a INT);
CREATE USER 'mysqltest1'@'%';
CREATE USER 'mysqltest1'@'%';
...
...
mysql-test/t/grant3.test
View file @
88be0aa2
...
@@ -64,6 +64,7 @@ SELECT user, host FROM mysql.user where user = 'CUser' order by 1,2;
...
@@ -64,6 +64,7 @@ SELECT user, host FROM mysql.user where user = 'CUser' order by 1,2;
SELECT
user
,
host
,
db
,
select_priv
FROM
mysql
.
db
where
user
=
'CUser'
order
by
1
,
2
;
SELECT
user
,
host
,
db
,
select_priv
FROM
mysql
.
db
where
user
=
'CUser'
order
by
1
,
2
;
DROP
USER
CUser
@
localhost
;
DROP
USER
CUser
@
localhost
;
--
error
ER_CANNOT_USER
DROP
USER
CUser
@
LOCALHOST
;
DROP
USER
CUser
@
LOCALHOST
;
#### table grants
#### table grants
...
@@ -88,6 +89,7 @@ SELECT user, host FROM mysql.user where user = 'CUser' order by 1,2;
...
@@ -88,6 +89,7 @@ SELECT user, host FROM mysql.user where user = 'CUser' order by 1,2;
SELECT
user
,
host
,
db
,
Table_name
,
Table_priv
,
Column_priv
FROM
mysql
.
tables_priv
where
user
=
'CUser'
order
by
1
,
2
;
SELECT
user
,
host
,
db
,
Table_name
,
Table_priv
,
Column_priv
FROM
mysql
.
tables_priv
where
user
=
'CUser'
order
by
1
,
2
;
DROP
USER
CUser
@
localhost
;
DROP
USER
CUser
@
localhost
;
--
error
ER_CANNOT_USER
DROP
USER
CUser
@
LOCALHOST
;
DROP
USER
CUser
@
LOCALHOST
;
### column grants
### column grants
...
@@ -112,6 +114,7 @@ SELECT user, host FROM mysql.user where user = 'CUser' order by 1,2;
...
@@ -112,6 +114,7 @@ SELECT user, host FROM mysql.user where user = 'CUser' order by 1,2;
SELECT
user
,
host
,
db
,
Table_name
,
Table_priv
,
Column_priv
FROM
mysql
.
tables_priv
where
user
=
'CUser'
order
by
1
,
2
;
SELECT
user
,
host
,
db
,
Table_name
,
Table_priv
,
Column_priv
FROM
mysql
.
tables_priv
where
user
=
'CUser'
order
by
1
,
2
;
DROP
USER
CUser
@
localhost
;
DROP
USER
CUser
@
localhost
;
--
error
ER_CANNOT_USER
DROP
USER
CUser
@
LOCALHOST
;
DROP
USER
CUser
@
LOCALHOST
;
drop
table
t1
;
drop
table
t1
;
...
@@ -131,6 +134,7 @@ flush privileges;
...
@@ -131,6 +134,7 @@ flush privileges;
SELECT
user
,
host
FROM
mysql
.
user
where
user
=
'CUser2'
order
by
1
,
2
;
SELECT
user
,
host
FROM
mysql
.
user
where
user
=
'CUser2'
order
by
1
,
2
;
SELECT
user
,
host
,
db
,
select_priv
FROM
mysql
.
db
where
user
=
'CUser2'
order
by
1
,
2
;
SELECT
user
,
host
,
db
,
select_priv
FROM
mysql
.
db
where
user
=
'CUser2'
order
by
1
,
2
;
--
error
ER_NONEXISTING_GRANT
REVOKE
SELECT
ON
test
.*
FROM
'CUser2'
@
'localhost'
;
REVOKE
SELECT
ON
test
.*
FROM
'CUser2'
@
'localhost'
;
flush
privileges
;
flush
privileges
;
...
@@ -138,6 +142,7 @@ SELECT user, host FROM mysql.user where user = 'CUser2' order by 1,2;
...
@@ -138,6 +142,7 @@ SELECT user, host FROM mysql.user where user = 'CUser2' order by 1,2;
SELECT
user
,
host
,
db
,
select_priv
FROM
mysql
.
db
where
user
=
'CUser2'
order
by
1
,
2
;
SELECT
user
,
host
,
db
,
select_priv
FROM
mysql
.
db
where
user
=
'CUser2'
order
by
1
,
2
;
DROP
USER
CUser2
@
localhost
;
DROP
USER
CUser2
@
localhost
;
--
error
ER_CANNOT_USER
DROP
USER
CUser2
@
LOCALHOST
;
DROP
USER
CUser2
@
LOCALHOST
;
...
...
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