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
19ffa1cd
Commit
19ffa1cd
authored
Mar 23, 2004
by
bell@sanja.is.com.ua
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
used right table for grants check (BUG#3270)
parent
cba6ff75
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
20 additions
and
1 deletion
+20
-1
mysql-test/t/alter_table.test
mysql-test/t/alter_table.test
+19
-0
sql/sql_parse.cc
sql/sql_parse.cc
+1
-1
No files found.
mysql-test/t/alter_table.test
View file @
19ffa1cd
...
@@ -3,6 +3,8 @@
...
@@ -3,6 +3,8 @@
#
#
drop
table
if
exists
t1
;
drop
table
if
exists
t1
;
drop
database
if
exists
mysqltest
;
create
table
t1
(
create
table
t1
(
col1
int
not
null
auto_increment
primary
key
,
col1
int
not
null
auto_increment
primary
key
,
col2
varchar
(
30
)
not
null
,
col2
varchar
(
30
)
not
null
,
...
@@ -99,3 +101,20 @@ select * from t1;
...
@@ -99,3 +101,20 @@ select * from t1;
select
*
from
mysqltest
.
t1
;
select
*
from
mysqltest
.
t1
;
drop
table
t1
;
drop
table
t1
;
drop
database
mysqltest
;
drop
database
mysqltest
;
#
# Rights for renaming test (Bug #3270)
#
connect
(
root
,
localhost
,
root
,,
test
,
0
,
mysql
-
master
.
sock
);
connection
root
;
--
disable_warnings
create
database
mysqltest
;
--
enable_warnings
create
table
mysqltest
.
t1
(
a
int
,
b
int
,
c
int
);
grant
all
on
mysqltest
.
t1
to
mysqltest_1
@
localhost
;
connect
(
user1
,
localhost
,
mysqltest_1
,,
mysqltest
,
0
,
mysql
-
master
.
sock
);
connection
user1
;
--
error
1142
alter
table
t1
rename
t2
;
connection
root
;
drop
database
mysqltest
;
sql/sql_parse.cc
View file @
19ffa1cd
...
@@ -1446,7 +1446,7 @@ mysql_execute_command(void)
...
@@ -1446,7 +1446,7 @@ mysql_execute_command(void)
tmp_table
.
real_name
=
lex
->
name
;
tmp_table
.
real_name
=
lex
->
name
;
tmp_table
.
db
=
lex
->
db
;
tmp_table
.
db
=
lex
->
db
;
tmp_table
.
grant
.
privilege
=
priv
;
tmp_table
.
grant
.
privilege
=
priv
;
if
(
check_grant
(
thd
,
INSERT_ACL
|
CREATE_ACL
,
tables
))
if
(
check_grant
(
thd
,
INSERT_ACL
|
CREATE_ACL
,
&
tmp_table
))
goto
error
;
goto
error
;
}
}
}
}
...
...
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