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
e5f2eba5
Commit
e5f2eba5
authored
Oct 01, 2004
by
unknown
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
0db72d6e
44d855e7
Changes
4
Hide 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 @
e5f2eba5
...
...
@@ -34,6 +34,7 @@ brian@brian-akers-computer.local
brian@private-client-ip-101.oz.net
carsten@tsort.bitbybit.dk
davida@isil.mysql.com
dellis@goetia.(none)
dlenev@brandersnatch.localdomain
dlenev@build.mysql.com
dlenev@jabberwock.localdomain
...
...
mysql-test/r/grant.result
View file @
e5f2eba5
...
...
@@ -248,3 +248,30 @@ GRANT SELECT ON `ab%`.* TO 'test11'@'localhost'
GRANT SELECT ON `a%`.* TO 'test11'@'localhost'
delete from mysql.user 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 @
e5f2eba5
...
...
@@ -189,3 +189,32 @@ show grants for test11@localhost;
delete from mysql.user 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 @
e5f2eba5
...
...
@@ -3622,7 +3622,7 @@ int mysql_revoke_all(THD *thd, List <LEX_USER> &list)
}
/* Remove db access privileges */
for
(
counter
=
0
;
counter
<
acl_dbs
.
elements
;
counter
++
)
for
(
counter
=
0
;
counter
<
acl_dbs
.
elements
;
)
{
const
char
*
user
,
*
host
;
...
...
@@ -3636,12 +3636,18 @@ int mysql_revoke_all(THD *thd, List <LEX_USER> &list)
!
my_strcasecmp
(
system_charset_info
,
lex_user
->
host
.
str
,
host
))
{
if
(
replace_db_table
(
tables
[
1
].
table
,
acl_db
->
db
,
*
lex_user
,
~
0
,
1
))
{
result
=
-
1
;
++
counter
;
continue
;
}
}
else
++
counter
;
}
/* Remove column access */
for
(
counter
=
0
;
counter
<
column_priv_hash
.
records
;
counter
++
)
for
(
counter
=
0
;
counter
<
column_priv_hash
.
records
;
)
{
const
char
*
user
,
*
host
;
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)
~
0
,
0
,
1
))
{
result
=
-
1
;
++
counter
;
continue
;
}
if
(
grant_table
->
cols
)
...
...
@@ -3670,9 +3677,15 @@ int mysql_revoke_all(THD *thd, List <LEX_USER> &list)
grant_table
->
db
,
grant_table
->
tname
,
~
0
,
1
))
{
result
=
-
1
;
++
counter
;
continue
;
}
}
}
else
++
counter
;
}
}
...
...
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