mirror of
https://github.com/MariaDB/server.git
synced 2025-09-02 09:41:40 +03:00
Bug #23556: TRUNCATE TABLE still maps to DELETE
- TRUNCATE requires DROP privilege, not DELETE
This commit is contained in:
@@ -972,4 +972,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)
|
||||
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)
|
||||
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
|
||||
|
Reference in New Issue
Block a user