Skip to content

show create user doesn't give right response #12408

Closed
@cyliu0

Description

@cyliu0

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)

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    type/bugThe issue is confirmed as a bug.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions