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

show create user doesn't give right response #12408

Closed
cyliu0 opened this issue Sep 26, 2019 · 1 comment
Closed

show create user doesn't give right response #12408

cyliu0 opened this issue Sep 26, 2019 · 1 comment
Labels
type/bug The issue is confirmed as a bug.

Comments

@cyliu0
Copy link
Contributor

cyliu0 commented Sep 26, 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.

Create user with requirement, then show create user. On TiDB, no matter which method you required, show create user will not show it.

  1. What did you expect to see?
    On MySQL
mysql> create user a;
Query OK, 0 rows affected (0.04 sec)

mysql> show create user a\G
*************************** 1. row ***************************
CREATE USER for a@%: CREATE USER 'a'@'%' IDENTIFIED WITH 'caching_sha2_password' REQUIRE NONE PASSWORD EXPIRE DEFAULT ACCOUNT UNLOCK PASSWORD HISTORY DEFAULT PASSWORD REUSE INTERVAL DEFAULT PASSWORD REQUIRE CURRENT DEFAULT
1 row in set (0.01 sec)

mysql> create user b require x509;
Query OK, 0 rows affected (0.01 sec)

mysql> show create user b\G
*************************** 1. row ***************************
CREATE USER for b@%: CREATE USER 'b'@'%' IDENTIFIED WITH 'caching_sha2_password' REQUIRE X509 PASSWORD EXPIRE DEFAULT ACCOUNT UNLOCK PASSWORD HISTORY DEFAULT PASSWORD REUSE INTERVAL DEFAULT PASSWORD REQUIRE CURRENT DEFAULT
1 row in set (0.00 sec)
  1. What did you see instead?
    On TiDB
mysql> create user a;
Query OK, 0 rows affected (0.00 sec)

mysql> show create user a;
+-----------------------------------------------------------------------------------------------------------------------+
| CREATE USER for a@%                                                                                                   |
+-----------------------------------------------------------------------------------------------------------------------+
| CREATE USER 'a'@'%' IDENTIFIED WITH 'mysql_native_password' AS '' REQUIRE NONE PASSWORD EXPIRE DEFAULT ACCOUNT UNLOCK |
+-----------------------------------------------------------------------------------------------------------------------+
1 row in set (0.00 sec)

mysql> create user b require x509;
Query OK, 0 rows affected, 1 warning (0.00 sec)

mysql> show create user b;
+-----------------------------------------------------------------------------------------------------------------------+
| CREATE USER for b@%                                                                                                   |
+-----------------------------------------------------------------------------------------------------------------------+
| CREATE USER 'b'@'%' IDENTIFIED WITH 'mysql_native_password' AS '' REQUIRE NONE PASSWORD EXPIRE DEFAULT ACCOUNT UNLOCK |
+-----------------------------------------------------------------------------------------------------------------------+
1 row in set (0.00 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: v4.0.0-alpha-360-gdab72fbd1-dirty
Git Commit Hash: dab72fbd16a5c5329d32cbafcb6f9aace3bdf10d
Git Branch: master
UTC Build Time: 2019-09-26 03:16:57
GoVersion: go version go1.12.9 darwin/amd64
Race Enabled: false
TiKV Min Version: v3.0.0-60965b006877ca7234adaced7890d7b029ed1306
Check Table Before Drop: false
1 row in set (0.00 sec)
@cyliu0 cyliu0 added the type/bug The issue is confirmed as a bug. label Sep 26, 2019
@kolbe
Copy link
Contributor

kolbe commented Feb 12, 2020

Fixed by #13955

@kolbe kolbe closed this as completed Feb 12, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type/bug The issue is confirmed as a bug.
Projects
None yet
Development

No branches or pull requests

2 participants