Details
-
Bug
-
Status: Closed (View Workflow)
-
Minor
-
Resolution: Not a Bug
-
10.1.13
-
None
Description
MariaDB allows you to drop a user while that user has active sessions. When the user is dropped, it can continue querying like nothing ever happened, even after flushing privileges:
--user is logged in and can query tables
|
MariaDB [mysql]> select count(*) from user; |
+----------+ |
| count(*) | |
+----------+ |
| 25 |
|
+----------+ |
1 row in set (0.00 sec) |
|
|
--user is then dropped by an admin
|
MariaDB [mysql]> drop user user_to_be_dropped@localhost; |
Query OK, 0 rows affected (0.00 sec) |
|
|
--user can continue querying
|
MariaDB [mysql]> select count(*) from user; |
+----------+ |
| count(*) | |
+----------+ |
| 24 |
|
+----------+ |
1 row in set (0.00 sec) |
|
|
--Even after flushing privileges
|
MariaDB [mysql]> flush privileges; |
Query OK, 0 rows affected (0.00 sec) |
|
|
MariaDB [mysql]> select count(*) from user; |
+----------+ |
| count(*) | |
+----------+ |
| 24 |
|
+----------+ |
1 row in set (0.00 sec) |
I would expect user_to_be_dropped@localhost to get an error when running another query after the flush privileges.
Is the above expected behaviour (meaning my expectations are wrong) or is this an actual bug?