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
49b18703
Commit
49b18703
authored
Apr 24, 2007
by
ramil/ram@mysql.com/ramil.myoffice.izhnet.ru
Browse files
Options
Browse Files
Download
Plain Diff
Merge mysql.com:/home/ram/work/mysql-5.0-maint
into mysql.com:/home/ram/work/b27515/b27515.5.0
parents
45400e5c
d1386154
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
34 additions
and
2 deletions
+34
-2
mysql-test/r/grant.result
mysql-test/r/grant.result
+11
-0
mysql-test/t/grant.test
mysql-test/t/grant.test
+22
-1
sql/sql_parse.cc
sql/sql_parse.cc
+1
-1
No files found.
mysql-test/r/grant.result
View file @
49b18703
...
...
@@ -657,6 +657,17 @@ delete from mysql.db where user='mysqltest1';
delete from mysql.tables_priv where user='mysqltest1';
flush privileges;
drop database mysqltest;
create database db27515;
use db27515;
create table t1 (a int);
grant alter on db27515.t1 to user27515@localhost;
grant insert, create on db27515.t2 to user27515@localhost;
rename table t1 to t2;
ERROR 42000: DROP command denied to user 'user27515'@'localhost' for table 't1'
revoke all privileges, grant option from user27515@localhost;
drop user user27515@localhost;
drop database db27515;
End of 4.1 tests
use test;
create table t1 (a int);
create table t2 as select * from mysql.user where user='';
...
...
mysql-test/t/grant.test
View file @
49b18703
...
...
@@ -540,7 +540,28 @@ delete from mysql.tables_priv where user='mysqltest1';
flush
privileges
;
drop
database
mysqltest
;
# End of 4.1 tests
#
# Bug #27515: DROP previlege is not required for RENAME TABLE
#
connection
master
;
create
database
db27515
;
use
db27515
;
create
table
t1
(
a
int
);
grant
alter
on
db27515
.
t1
to
user27515
@
localhost
;
grant
insert
,
create
on
db27515
.
t2
to
user27515
@
localhost
;
connect
(
conn27515
,
localhost
,
user27515
,
,
db27515
);
connection
conn27515
;
--
error
1142
rename
table
t1
to
t2
;
disconnect
conn27515
;
connection
master
;
revoke
all
privileges
,
grant
option
from
user27515
@
localhost
;
drop
user
user27515
@
localhost
;
drop
database
db27515
;
--
echo
End
of
4.1
tests
#
# Bug #16297 In memory grant tables not flushed when users's hostname is ""
...
...
sql/sql_parse.cc
View file @
49b18703
...
...
@@ -3263,7 +3263,7 @@ mysql_execute_command(THD *thd)
*/
old_list
=
table
[
0
];
new_list
=
table
->
next_local
[
0
];
if
(
check_grant
(
thd
,
ALTER_ACL
,
&
old_list
,
0
,
1
,
0
)
||
if
(
check_grant
(
thd
,
ALTER_ACL
|
DROP_ACL
,
&
old_list
,
0
,
1
,
0
)
||
(
!
test_all_bits
(
table
->
next_local
->
grant
.
privilege
,
INSERT_ACL
|
CREATE_ACL
)
&&
check_grant
(
thd
,
INSERT_ACL
|
CREATE_ACL
,
&
new_list
,
0
,
1
,
0
)))
...
...
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