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
f5b7774e
Commit
f5b7774e
authored
Oct 01, 2004
by
dellis@goetia.(none)
Browse files
Options
Browse Files
Download
Plain Diff
Merge dellis@bk-internal.mysql.com:/home/bk/mysql-4.1
into goetia.(none):/home/dellis/mysqlab/bk/mysql-4.1
parents
f095b82a
8a12b5ad
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
72 additions
and
2 deletions
+72
-2
BitKeeper/etc/logging_ok
BitKeeper/etc/logging_ok
+1
-0
mysql-test/r/grant.result
mysql-test/r/grant.result
+27
-0
mysql-test/t/grant.test
mysql-test/t/grant.test
+29
-0
sql/sql_acl.cc
sql/sql_acl.cc
+15
-2
No files found.
BitKeeper/etc/logging_ok
View file @
f5b7774e
...
@@ -34,6 +34,7 @@ brian@brian-akers-computer.local
...
@@ -34,6 +34,7 @@ brian@brian-akers-computer.local
brian@private-client-ip-101.oz.net
brian@private-client-ip-101.oz.net
carsten@tsort.bitbybit.dk
carsten@tsort.bitbybit.dk
davida@isil.mysql.com
davida@isil.mysql.com
dellis@goetia.(none)
dlenev@brandersnatch.localdomain
dlenev@brandersnatch.localdomain
dlenev@build.mysql.com
dlenev@build.mysql.com
dlenev@jabberwock.localdomain
dlenev@jabberwock.localdomain
...
...
mysql-test/r/grant.result
View file @
f5b7774e
...
@@ -248,3 +248,30 @@ GRANT SELECT ON `ab%`.* TO 'test11'@'localhost'
...
@@ -248,3 +248,30 @@ GRANT SELECT ON `ab%`.* TO 'test11'@'localhost'
GRANT SELECT ON `a%`.* TO 'test11'@'localhost'
GRANT SELECT ON `a%`.* TO 'test11'@'localhost'
delete from mysql.user where user='test11';
delete from mysql.user where user='test11';
delete from mysql.db where user='test11';
delete from mysql.db where user='test11';
USE test;
CREATE TABLE t1 (a int );
CREATE TABLE t2 LIKE t1;
CREATE TABLE t3 LIKE t1;
CREATE TABLE t4 LIKE t1;
CREATE TABLE t5 LIKE t1;
CREATE TABLE t6 LIKE t1;
CREATE TABLE t7 LIKE t1;
CREATE TABLE t8 LIKE t1;
CREATE TABLE t9 LIKE t1;
CREATE TABLE t10 LIKE t1;
GRANT SELECT ON test.t1 TO testuser@localhost;
GRANT SELECT ON test.t2 TO testuser@localhost;
GRANT SELECT ON test.t3 TO testuser@localhost;
GRANT SELECT ON test.t4 TO testuser@localhost;
GRANT SELECT ON test.t5 TO testuser@localhost;
GRANT SELECT ON test.t6 TO testuser@localhost;
GRANT SELECT ON test.t7 TO testuser@localhost;
GRANT SELECT ON test.t8 TO testuser@localhost;
GRANT SELECT ON test.t9 TO testuser@localhost;
GRANT SELECT ON test.t10 TO testuser@localhost;
REVOKE ALL PRIVILEGES, GRANT OPTION FROM testuser@localhost;
SHOW GRANTS FOR testuser@localhost;
Grants for testuser@localhost
GRANT USAGE ON *.* TO 'testuser'@'localhost'
DROP USER testuser@localhost;
DROP TABLE t1,t2,t3,t4,t5,t6,t7,t8,t9,t10;
mysql-test/t/grant.test
View file @
f5b7774e
...
@@ -189,3 +189,32 @@ show grants for test11@localhost;
...
@@ -189,3 +189,32 @@ show grants for test11@localhost;
delete from mysql.user where user='
test11
';
delete from mysql.user where user='
test11
';
delete from mysql.db where user='
test11
'
;
delete from mysql.db where user='
test11
'
;
#
# Bug #5831: REVOKE ALL PRIVILEGES, GRANT OPTION does not revoke everything
#
USE
test
;
CREATE
TABLE
t1
(
a
int
);
CREATE
TABLE
t2
LIKE
t1
;
CREATE
TABLE
t3
LIKE
t1
;
CREATE
TABLE
t4
LIKE
t1
;
CREATE
TABLE
t5
LIKE
t1
;
CREATE
TABLE
t6
LIKE
t1
;
CREATE
TABLE
t7
LIKE
t1
;
CREATE
TABLE
t8
LIKE
t1
;
CREATE
TABLE
t9
LIKE
t1
;
CREATE
TABLE
t10
LIKE
t1
;
GRANT
SELECT
ON
test
.
t1
TO
testuser
@
localhost
;
GRANT
SELECT
ON
test
.
t2
TO
testuser
@
localhost
;
GRANT
SELECT
ON
test
.
t3
TO
testuser
@
localhost
;
GRANT
SELECT
ON
test
.
t4
TO
testuser
@
localhost
;
GRANT
SELECT
ON
test
.
t5
TO
testuser
@
localhost
;
GRANT
SELECT
ON
test
.
t6
TO
testuser
@
localhost
;
GRANT
SELECT
ON
test
.
t7
TO
testuser
@
localhost
;
GRANT
SELECT
ON
test
.
t8
TO
testuser
@
localhost
;
GRANT
SELECT
ON
test
.
t9
TO
testuser
@
localhost
;
GRANT
SELECT
ON
test
.
t10
TO
testuser
@
localhost
;
REVOKE
ALL
PRIVILEGES
,
GRANT
OPTION
FROM
testuser
@
localhost
;
SHOW
GRANTS
FOR
testuser
@
localhost
;
DROP
USER
testuser
@
localhost
;
DROP
TABLE
t1
,
t2
,
t3
,
t4
,
t5
,
t6
,
t7
,
t8
,
t9
,
t10
;
sql/sql_acl.cc
View file @
f5b7774e
...
@@ -3622,7 +3622,7 @@ int mysql_revoke_all(THD *thd, List <LEX_USER> &list)
...
@@ -3622,7 +3622,7 @@ int mysql_revoke_all(THD *thd, List <LEX_USER> &list)
}
}
/* Remove db access privileges */
/* Remove db access privileges */
for
(
counter
=
0
;
counter
<
acl_dbs
.
elements
;
counter
++
)
for
(
counter
=
0
;
counter
<
acl_dbs
.
elements
;
)
{
{
const
char
*
user
,
*
host
;
const
char
*
user
,
*
host
;
...
@@ -3636,12 +3636,18 @@ int mysql_revoke_all(THD *thd, List <LEX_USER> &list)
...
@@ -3636,12 +3636,18 @@ int mysql_revoke_all(THD *thd, List <LEX_USER> &list)
!
my_strcasecmp
(
system_charset_info
,
lex_user
->
host
.
str
,
host
))
!
my_strcasecmp
(
system_charset_info
,
lex_user
->
host
.
str
,
host
))
{
{
if
(
replace_db_table
(
tables
[
1
].
table
,
acl_db
->
db
,
*
lex_user
,
~
0
,
1
))
if
(
replace_db_table
(
tables
[
1
].
table
,
acl_db
->
db
,
*
lex_user
,
~
0
,
1
))
{
result
=
-
1
;
result
=
-
1
;
++
counter
;
continue
;
}
}
}
}
else
++
counter
;
}
/* Remove column access */
/* Remove column access */
for
(
counter
=
0
;
counter
<
column_priv_hash
.
records
;
counter
++
)
for
(
counter
=
0
;
counter
<
column_priv_hash
.
records
;
)
{
{
const
char
*
user
,
*
host
;
const
char
*
user
,
*
host
;
GRANT_TABLE
*
grant_table
=
(
GRANT_TABLE
*
)
hash_element
(
&
column_priv_hash
,
GRANT_TABLE
*
grant_table
=
(
GRANT_TABLE
*
)
hash_element
(
&
column_priv_hash
,
...
@@ -3660,6 +3666,7 @@ int mysql_revoke_all(THD *thd, List <LEX_USER> &list)
...
@@ -3660,6 +3666,7 @@ int mysql_revoke_all(THD *thd, List <LEX_USER> &list)
~
0
,
0
,
1
))
~
0
,
0
,
1
))
{
{
result
=
-
1
;
result
=
-
1
;
++
counter
;
continue
;
continue
;
}
}
if
(
grant_table
->
cols
)
if
(
grant_table
->
cols
)
...
@@ -3670,10 +3677,16 @@ int mysql_revoke_all(THD *thd, List <LEX_USER> &list)
...
@@ -3670,10 +3677,16 @@ int mysql_revoke_all(THD *thd, List <LEX_USER> &list)
grant_table
->
db
,
grant_table
->
db
,
grant_table
->
tname
,
grant_table
->
tname
,
~
0
,
1
))
~
0
,
1
))
{
result
=
-
1
;
result
=
-
1
;
++
counter
;
continue
;
}
}
}
}
}
}
else
++
counter
;
}
}
}
VOID
(
pthread_mutex_unlock
(
&
acl_cache
->
lock
));
VOID
(
pthread_mutex_unlock
(
&
acl_cache
->
lock
));
...
...
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