Details
-
Type:
Bug
-
Status: Closed
-
Priority:
Major
-
Resolution: Won't Fix
-
Affects Version/s: 5.5.32
-
Fix Version/s: 5.5.33
-
Component/s: None
-
Labels: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
Gliffy Diagrams
Attachments
Issue Links
Activity
- All
- Comments
- Work Log
- History
- Activity
- Transitions
If it's implemented in MySQL 5.6, it will eventually be merged into 10.x.
In regard to 5.5, I'm not sure it's a right thing to do to make such a change in a post-GA version (that's exactly why MySQL didn't do it in 5.5), but I'll pass it to Sergei for a verdict.