Skip to content

Granting create temporary tables to *.* should not take effect #29280

@djshow832

Description

@djshow832

Bug Report

Please answer these questions before submitting your issue. Thanks!

1. Minimal reproduce step (Required)

mysql -h127.1 -uroot -P4000

mysql> create database tmpdb;
Query OK, 0 rows affected (0.01 sec)

mysql> drop user test_user;
Query OK, 0 rows affected (0.00 sec)

mysql> create user test_user;
Query OK, 0 rows affected (0.01 sec)

mysql> grant create temporary tables on *.* to test_user;
Query OK, 0 rows affected (0.01 sec)
mysql -h127.1 -utest_user -P4000

mysql> show databases;
+--------------------+
| Database           |
+--------------------+
| INFORMATION_SCHEMA |
+--------------------+
1 row in set (0.00 sec)

mysql> create temporary table tmpdb.tmp(id int);
Query OK, 0 rows affected (0.00 sec)

2. What did you expect to see? (Required)

mysql -h127.1 -utest_user -Ac

mysql> create temporary table tmpdb.tmp(id int);
ERROR 1044 (42000): Access denied for user 'test_user'@'localhost' to database 'tmpdb'

3. What did you see instead (Required)

mysql -h127.1 -utest_user -P4000

mysql> create temporary table tmpdb.tmp(id int);
Query OK, 0 rows affected (0.00 sec)

4. What is your TiDB version? (Required)

master

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions