Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DROP USER IF EXISTS behavior difference #10196

Closed
morgo opened this issue Apr 18, 2019 · 1 comment · Fixed by #10395
Closed

DROP USER IF EXISTS behavior difference #10196

morgo opened this issue Apr 18, 2019 · 1 comment · Fixed by #10395
Assignees

Comments

@morgo
Copy link
Contributor

morgo commented Apr 18, 2019

Bug Report

Please answer these questions before submitting your issue. Thanks!

  1. What did you do?
    If possible, provide a recipe for reproducing the error.

This is a similar problem to #7867 :

DROP USER IF EXISTS idontexist;
  1. What did you expect to see?

MySQL:

mysql80> DROP USER IF EXISTS idontexist;
Query OK, 0 rows affected, 1 warning (0.00 sec)

mysql80> SHOW WARNINGS;
+-------+------+---------------------------------------------------+
| Level | Code | Message                                           |
+-------+------+---------------------------------------------------+
| Note  | 3162 | Authorization ID 'idontexist'@'%' does not exist. |
+-------+------+---------------------------------------------------+
1 row in set (0.00 sec)
  1. What did you see instead?
mysql> DROP USER IF EXISTS idontexist;
Query OK, 0 rows affected (0.01 sec)
  1. What version of TiDB are you using (tidb-server -V or run select tidb_version(); on TiDB)?
mysql> select tidb_version()\G
*************************** 1. row ***************************
tidb_version(): Release Version: v3.0.0-beta.1-109-g7666f688b
Git Commit Hash: 7666f688b3d91ea84fa6b0a20c2e784fff3c8945
Git Branch: master
UTC Build Time: 2019-04-17 05:09:28
GoVersion: go version go1.12.1 linux/amd64
Race Enabled: false
TiKV Min Version: 2.1.0-alpha.1-ff3dd160846b7d1aed9079c389fc188f7f5ea13e
Check Table Before Drop: false
1 row in set (0.00 sec)
@july2993
Copy link
Contributor

july2993 commented May 8, 2019

I test with 5.7.21, Message is User.... but not Authorization ID..

Server version: 5.7.21-log Homebrew

mysql> DROP USER IF EXISTS idontexist;
Query OK, 0 rows affected, 1 warning (0.03 sec)

mysql> show warnings;
+-------+------+---------------------------------------+
| Level | Code | Message                               |
+-------+------+---------------------------------------+
| Note  | 3162 | User 'idontexist'@'%' does not exist. |
+-------+------+---------------------------------------+
1 row in set (0.00 sec)

mysql>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants