Details
-
Bug
-
Status: Closed (View Workflow)
-
Major
-
Resolution: Won't Fix
-
5.5.32
-
None
-
None
Description
This is actually a known MySQL bug (1), but I didn't find a report for MariaDB, which is behaving the same. What's more, it was fixed for MySQL 5.6, but they didn't back-port the fix to 5.5 and 5.1, which is a pity. If you could try to look at possible back-porting into that versions at least in MariaDB, that would be great.
For the case MySQL bug report vanishes in the future, this is what is wrong:
When we grant CREATE TEMPORARY TABLES privileges for a user, he won't be able to do anything with the table actually.
Reproducer:
$ mysql -u root
mysql> CREATE USER temp_priv_user;
mysql> CREATE DATABASE temp_priv;
mysql> GRANT CREATE TEMPORARY TABLES ON temp_priv.* TO temp_priv_user@localhost;
$ mysql -u temp_priv_user temp_priv
mysql> CREATE TEMPORARY TABLE tmp1(a INT);
mysql> INSERT INTO tmp1 VALUES (11), (12), (13);
Actual results:
ERROR 1142 (42000): INSERT command denied to user 'temp_priv_user'@'localhost' for table 'tmp1'
Expected results:
rows are inserted