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
1096dbd5
Commit
1096dbd5
authored
Feb 01, 2007
by
gkodinov/kgeorge@rakia.gmz
Browse files
Options
Browse Files
Download
Plain Diff
Merge gkodinov@bk-internal.mysql.com:/home/bk/mysql-5.1-opt
into rakia.gmz:/home/kgeorge/mysql/autopush/B23556-5.1-opt
parents
3235a1f9
06dd1244
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
60 additions
and
5 deletions
+60
-5
mysql-test/r/grant.result
mysql-test/r/grant.result
+20
-0
mysql-test/r/trigger-grant.result
mysql-test/r/trigger-grant.result
+2
-2
mysql-test/t/grant.test
mysql-test/t/grant.test
+35
-0
mysql-test/t/trigger-grant.test
mysql-test/t/trigger-grant.test
+2
-2
sql/sql_parse.cc
sql/sql_parse.cc
+1
-1
No files found.
mysql-test/r/grant.result
View file @
1096dbd5
...
@@ -1037,4 +1037,24 @@ REVOKE EXECUTE ON PROCEDURE p1 FROM 1234567890abcdefGHIKL@localhost;
...
@@ -1037,4 +1037,24 @@ REVOKE EXECUTE ON PROCEDURE p1 FROM 1234567890abcdefGHIKL@localhost;
ERROR HY000: String '1234567890abcdefGHIKL' is too long for user name (should be no longer than 16)
ERROR HY000: String '1234567890abcdefGHIKL' is too long for user name (should be no longer than 16)
REVOKE EXECUTE ON PROCEDURE t1 FROM some_user_name@1234567890abcdefghij1234567890abcdefghij1234567890abcdefghijQWERTY;
REVOKE EXECUTE ON PROCEDURE t1 FROM some_user_name@1234567890abcdefghij1234567890abcdefghij1234567890abcdefghijQWERTY;
ERROR HY000: String '1234567890abcdefghij1234567890abcdefghij1234567890abcdefghijQWERTY' is too long for host name (should be no longer than 60)
ERROR HY000: String '1234567890abcdefghij1234567890abcdefghij1234567890abcdefghijQWERTY' is too long for host name (should be no longer than 60)
CREATE USER bug23556@localhost;
CREATE DATABASE bug23556;
GRANT SELECT ON bug23556.* TO bug23556@localhost;
USE bug23556;
CREATE TABLE t1 (a INT PRIMARY KEY);
INSERT INTO t1 VALUES (1),(2),(3),(4),(5);
GRANT DELETE ON t1 TO bug23556@localhost;
USE bug23556;
TRUNCATE t1;
ERROR 42000: DROP command denied to user 'bug23556'@'localhost' for table 't1'
USE bug23556;
REVOKE DELETE ON t1 FROM bug23556@localhost;
GRANT DROP ON t1 TO bug23556@localhost;
USE bug23556;
TRUNCATE t1;
USE bug23556;
DROP TABLE t1;
USE test;
DROP DATABASE bug23556;
DROP USER bug23556@localhost;
End of 5.0 tests
End of 5.0 tests
mysql-test/r/trigger-grant.result
View file @
1096dbd5
...
@@ -14,8 +14,8 @@ CREATE TABLE t1(num_value INT);
...
@@ -14,8 +14,8 @@ CREATE TABLE t1(num_value INT);
CREATE TABLE t2(user_str TEXT);
CREATE TABLE t2(user_str TEXT);
---> connection: default
---> connection: default
GRANT INSERT, D
ELETE
ON mysqltest_db1.t1 TO mysqltest_dfn@localhost;
GRANT INSERT, D
ROP
ON mysqltest_db1.t1 TO mysqltest_dfn@localhost;
GRANT INSERT, D
ELETE
ON mysqltest_db1.t2 TO mysqltest_dfn@localhost;
GRANT INSERT, D
ROP
ON mysqltest_db1.t2 TO mysqltest_dfn@localhost;
---> connection: default
---> connection: default
GRANT SUPER ON *.* TO mysqltest_dfn@localhost;
GRANT SUPER ON *.* TO mysqltest_dfn@localhost;
...
...
mysql-test/t/grant.test
View file @
1096dbd5
...
@@ -939,4 +939,39 @@ REVOKE EXECUTE ON PROCEDURE p1 FROM 1234567890abcdefGHIKL@localhost;
...
@@ -939,4 +939,39 @@ REVOKE EXECUTE ON PROCEDURE p1 FROM 1234567890abcdefGHIKL@localhost;
--
error
ER_WRONG_STRING_LENGTH
--
error
ER_WRONG_STRING_LENGTH
REVOKE
EXECUTE
ON
PROCEDURE
t1
FROM
some_user_name
@
1234567890
abcdefghij1234567890abcdefghij1234567890abcdefghijQWERTY
;
REVOKE
EXECUTE
ON
PROCEDURE
t1
FROM
some_user_name
@
1234567890
abcdefghij1234567890abcdefghij1234567890abcdefghijQWERTY
;
#
# BUG#23556: TRUNCATE TABLE still maps to DELETE
#
CREATE
USER
bug23556
@
localhost
;
CREATE
DATABASE
bug23556
;
GRANT
SELECT
ON
bug23556
.*
TO
bug23556
@
localhost
;
connect
(
bug23556
,
localhost
,
bug23556
,,
bug23556
);
connection
default
;
USE
bug23556
;
CREATE
TABLE
t1
(
a
INT
PRIMARY
KEY
);
INSERT
INTO
t1
VALUES
(
1
),(
2
),(
3
),(
4
),(
5
);
GRANT
DELETE
ON
t1
TO
bug23556
@
localhost
;
connection
bug23556
;
USE
bug23556
;
--
error
ER_TABLEACCESS_DENIED_ERROR
TRUNCATE
t1
;
connection
default
;
USE
bug23556
;
REVOKE
DELETE
ON
t1
FROM
bug23556
@
localhost
;
GRANT
DROP
ON
t1
TO
bug23556
@
localhost
;
connection
bug23556
;
USE
bug23556
;
TRUNCATE
t1
;
connection
default
;
USE
bug23556
;
DROP
TABLE
t1
;
USE
test
;
DROP
DATABASE
bug23556
;
DROP
USER
bug23556
@
localhost
;
--
echo
End
of
5.0
tests
--
echo
End
of
5.0
tests
mysql-test/t/trigger-grant.test
View file @
1096dbd5
...
@@ -60,8 +60,8 @@ CREATE TABLE t2(user_str TEXT);
...
@@ -60,8 +60,8 @@ CREATE TABLE t2(user_str TEXT);
--
echo
--
echo
--
echo
--->
connection
:
default
--
echo
--->
connection
:
default
GRANT
INSERT
,
D
ELETE
ON
mysqltest_db1
.
t1
TO
mysqltest_dfn
@
localhost
;
GRANT
INSERT
,
D
ROP
ON
mysqltest_db1
.
t1
TO
mysqltest_dfn
@
localhost
;
GRANT
INSERT
,
D
ELETE
ON
mysqltest_db1
.
t2
TO
mysqltest_dfn
@
localhost
;
GRANT
INSERT
,
D
ROP
ON
mysqltest_db1
.
t2
TO
mysqltest_dfn
@
localhost
;
#
#
# Check that the user must have TRIGGER privilege to create a trigger.
# Check that the user must have TRIGGER privilege to create a trigger.
...
...
sql/sql_parse.cc
View file @
1096dbd5
...
@@ -3555,7 +3555,7 @@ mysql_execute_command(THD *thd)
...
@@ -3555,7 +3555,7 @@ mysql_execute_command(THD *thd)
break
;
break
;
}
}
DBUG_ASSERT
(
first_table
==
all_tables
&&
first_table
!=
0
);
DBUG_ASSERT
(
first_table
==
all_tables
&&
first_table
!=
0
);
if
(
check_one_table_access
(
thd
,
D
ELETE
_ACL
,
all_tables
))
if
(
check_one_table_access
(
thd
,
D
ROP
_ACL
,
all_tables
))
goto
error
;
goto
error
;
/*
/*
Don't allow this within a transaction because we want to use
Don't allow this within a transaction because we want to use
...
...
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