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
0de92f82
Commit
0de92f82
authored
Mar 17, 2004
by
unknown
Browse files
Options
Browse Files
Download
Plain Diff
Merge sgluhov@bk-internal.mysql.com:/home/bk/mysql-4.1
into gluh.mysql.r18.ru:/home/gluh/mysql-4.1.clear
parents
48121583
ca0ece13
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
58 additions
and
8 deletions
+58
-8
mysql-test/r/grant.result
mysql-test/r/grant.result
+31
-0
mysql-test/t/grant.test
mysql-test/t/grant.test
+17
-0
sql/sql_acl.cc
sql/sql_acl.cc
+10
-8
No files found.
mysql-test/r/grant.result
View file @
0de92f82
...
...
@@ -146,6 +146,37 @@ Grants for drop_user@localhost
GRANT ALL PRIVILEGES ON *.* TO 'drop_user'@'localhost' WITH GRANT OPTION
GRANT ALL PRIVILEGES ON `test`.* TO 'drop_user'@'localhost' WITH GRANT OPTION
GRANT SELECT (a) ON `test`.`t1` TO 'drop_user'@'localhost'
set sql_mode=ansi_quotes;
show grants for drop_user@localhost;
Grants for drop_user@localhost
GRANT ALL PRIVILEGES ON *.* TO 'drop_user'@'localhost' WITH GRANT OPTION
GRANT ALL PRIVILEGES ON "test".* TO 'drop_user'@'localhost' WITH GRANT OPTION
GRANT SELECT (a) ON "test"."t1" TO 'drop_user'@'localhost'
set sql_mode=default;
set sql_quote_show_create=0;
show grants for drop_user@localhost;
Grants for drop_user@localhost
GRANT ALL PRIVILEGES ON *.* TO 'drop_user'@'localhost' WITH GRANT OPTION
GRANT ALL PRIVILEGES ON test.* TO 'drop_user'@'localhost' WITH GRANT OPTION
GRANT SELECT (a) ON test.t1 TO 'drop_user'@'localhost'
set sql_mode="ansi_quotes";
show grants for drop_user@localhost;
Grants for drop_user@localhost
GRANT ALL PRIVILEGES ON *.* TO 'drop_user'@'localhost' WITH GRANT OPTION
GRANT ALL PRIVILEGES ON test.* TO 'drop_user'@'localhost' WITH GRANT OPTION
GRANT SELECT (a) ON test.t1 TO 'drop_user'@'localhost'
set sql_quote_show_create=1;
show grants for drop_user@localhost;
Grants for drop_user@localhost
GRANT ALL PRIVILEGES ON *.* TO 'drop_user'@'localhost' WITH GRANT OPTION
GRANT ALL PRIVILEGES ON "test".* TO 'drop_user'@'localhost' WITH GRANT OPTION
GRANT SELECT (a) ON "test"."t1" TO 'drop_user'@'localhost'
set sql_mode="";
show grants for drop_user@localhost;
Grants for drop_user@localhost
GRANT ALL PRIVILEGES ON *.* TO 'drop_user'@'localhost' WITH GRANT OPTION
GRANT ALL PRIVILEGES ON `test`.* TO 'drop_user'@'localhost' WITH GRANT OPTION
GRANT SELECT (a) ON `test`.`t1` TO 'drop_user'@'localhost'
revoke all privileges, grant option from drop_user@localhost;
show grants for drop_user@localhost;
Grants for drop_user@localhost
...
...
mysql-test/t/grant.test
View file @
0de92f82
...
...
@@ -107,6 +107,23 @@ grant ALL PRIVILEGES on *.* to drop_user@localhost with GRANT OPTION;
grant
ALL
PRIVILEGES
on
test
.*
to
drop_user
@
localhost
with
GRANT
OPTION
;
grant
select
(
a
)
on
test
.
t1
to
drop_user
@
localhost
;
show
grants
for
drop_user
@
localhost
;
#
# Bug3086
#
set
sql_mode
=
ansi_quotes
;
show
grants
for
drop_user
@
localhost
;
set
sql_mode
=
default
;
set
sql_quote_show_create
=
0
;
show
grants
for
drop_user
@
localhost
;
set
sql_mode
=
"ansi_quotes"
;
show
grants
for
drop_user
@
localhost
;
set
sql_quote_show_create
=
1
;
show
grants
for
drop_user
@
localhost
;
set
sql_mode
=
""
;
show
grants
for
drop_user
@
localhost
;
revoke
all
privileges
,
grant
option
from
drop_user
@
localhost
;
show
grants
for
drop_user
@
localhost
;
drop
user
drop_user
@
localhost
;
...
...
sql/sql_acl.cc
View file @
0de92f82
...
...
@@ -3170,9 +3170,9 @@ int mysql_show_grants(THD *thd,LEX_USER *lex_user)
}
}
}
db
.
append
(
" ON
`"
,
5
);
db
.
append
(
acl_db
->
db
);
db
.
append
(
"
`.* TO '"
,
8
);
db
.
append
(
" ON
"
,
4
);
append_identifier
(
thd
,
&
db
,
acl_db
->
db
,
strlen
(
acl_db
->
db
)
);
db
.
append
(
"
.* TO '"
,
7
);
db
.
append
(
lex_user
->
user
.
str
,
lex_user
->
user
.
length
);
db
.
append
(
"'@'"
,
3
);
db
.
append
(
lex_user
->
host
.
str
,
lex_user
->
host
.
length
);
...
...
@@ -3270,11 +3270,13 @@ int mysql_show_grants(THD *thd,LEX_USER *lex_user)
}
}
}
global
.
append
(
" ON `"
,
5
);
global
.
append
(
grant_table
->
db
);
global
.
append
(
"`.`"
,
3
);
global
.
append
(
grant_table
->
tname
);
global
.
append
(
"` TO '"
,
6
);
global
.
append
(
" ON "
,
4
);
append_identifier
(
thd
,
&
global
,
grant_table
->
db
,
strlen
(
grant_table
->
db
));
global
.
append
(
'.'
);
append_identifier
(
thd
,
&
global
,
grant_table
->
tname
,
strlen
(
grant_table
->
tname
));
global
.
append
(
" TO '"
,
5
);
global
.
append
(
lex_user
->
user
.
str
,
lex_user
->
user
.
length
);
global
.
append
(
"'@'"
,
3
);
global
.
append
(
lex_user
->
host
.
str
,
lex_user
->
host
.
length
);
...
...
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