diff options
author | unknown <gkodinov/kgeorge@macbook.gmz> | 2006-11-21 10:25:10 +0200 |
---|---|---|
committer | unknown <gkodinov/kgeorge@macbook.gmz> | 2006-11-21 10:25:10 +0200 |
commit | cab412666eba39347410f1369e56ace47938a76d (patch) | |
tree | c44d2c18e89360773b0b48c5779b7f4511a322dc /mysql-test/t/grant.test | |
parent | 1fbe1fc3b0ac8ff351e9d6910471c739310df86c (diff) | |
download | mariadb-git-cab412666eba39347410f1369e56ace47938a76d.tar.gz |
Bug #23556: TRUNCATE TABLE still maps to DELETE
- TRUNCATE requires DROP privilege, not DELETE
mysql-test/r/grant.result:
Bug #23556: TRUNCATE TABLE still maps to DELETE
- test case
mysql-test/r/trigger-grant.result:
Bug #23556: TRUNCATE TABLE still maps to DELETE
- updated test case
mysql-test/t/grant.test:
Bug #23556: TRUNCATE TABLE still maps to DELETE
- test case
mysql-test/t/trigger-grant.test:
Bug #23556: TRUNCATE TABLE still maps to DELETE
- updated test case
Diffstat (limited to 'mysql-test/t/grant.test')
-rw-r--r-- | mysql-test/t/grant.test | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/mysql-test/t/grant.test b/mysql-test/t/grant.test index d3781d58780..91d8b248bcc 100644 --- a/mysql-test/t/grant.test +++ b/mysql-test/t/grant.test @@ -863,4 +863,39 @@ REVOKE EXECUTE ON PROCEDURE p1 FROM 1234567890abcdefGHIKL@localhost; --error ER_WRONG_STRING_LENGTH REVOKE EXECUTE ON PROCEDURE t1 FROM some_user_name@1234567890abcdefghij1234567890abcdefghij1234567890abcdefghijQWERTY; + + +# +# 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 |