Bug #17573 | Security Elevation Problem: DROP USER does not drop that users procedures | ||
---|---|---|---|
Submitted: | 20 Feb 2006 10:56 | Modified: | 20 Feb 2006 11:50 |
Reporter: | Kristian Koehntopp | Email Updates: | |
Status: | Duplicate | Impact on me: | |
Category: | MySQL Server | Severity: | S2 (Serious) |
Version: | 5.0.18 | OS: | Linux (Linux) |
Assigned to: | CPU Architecture: | Any |
[20 Feb 2006 10:56]
Kristian Koehntopp
[20 Feb 2006 11:29]
Kristian Koehntopp
The same problem affects triggers. root@localhost [boom]> show create table t\G *************************** 1. row *************************** Table: t Create Table: CREATE TABLE `t` ( `id` bigint(20) unsigned NOT NULL, `cu` varchar(80) NOT NULL, `su` varchar(80) NOT NULL ) ENGINE=MyISAM DEFAULT CHARSET=utf8 1 row in set (0.00 sec) root@localhost [boom]> show triggers\G *************************** 1. row *************************** Trigger: insert_t Event: INSERT Table: t Statement: begin set new.cu = current_user(), new.su=session_user(); end Timing: BEFORE Created: NULL sql_mode: Definer: a@% 1 row in set (0.00 sec) root@localhost [boom]> insert into t (id) values ( 2); Query OK, 1 row affected, 2 warnings (0.01 sec) root@localhost [boom]> select * from t; +----+-----+----------------+ | id | cu | su | +----+-----+----------------+ | 1 | a@% | a@localhost | | 2 | a@% | root@localhost | +----+-----+----------------+ 2 rows in set (0.00 sec) root@localhost [boom]> drop user a; Query OK, 0 rows affected (0.00 sec) root@localhost [boom]> insert into t (id) values ( 3); Query OK, 1 row affected, 2 warnings (0.00 sec) root@localhost [boom]> select * from t; +----+----------------+----------------+ | id | cu | su | +----+----------------+----------------+ | 1 | a@% | a@localhost | | 2 | a@% | root@localhost | | 3 | root@localhost | root@localhost | +----+----------------+----------------+ 3 rows in set (0.00 sec)