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 fails to correctly show locked accounts #37966

Closed
dveeden opened this issue Sep 19, 2022 · 3 comments · Fixed by #37967
Closed

SHOW CREATE USER fails to correctly show locked accounts #37966

dveeden opened this issue Sep 19, 2022 · 3 comments · Fixed by #37967
Labels
affects-5.0 This bug affects 5.0.x versions. affects-5.1 This bug affects 5.1.x versions. affects-5.2 This bug affects 5.2.x versions. affects-5.3 This bug affects 5.3.x versions. affects-5.4 This bug affects 5.4.x versions. affects-6.0 affects-6.1 affects-6.2 affects-6.3 severity/major sig/sql-infra SIG: SQL Infra type/bug The issue is confirmed as a bug.

Comments

@dveeden
Copy link
Contributor

dveeden commented Sep 19, 2022

Bug Report

1. Minimal reproduce step (Required)

CREATE USER 'foo'@'%' IDENTIFIED BY 'foo' ACCOUNT LOCK;
SHOW CREATE USER 'foo'@'%';

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

sql> CREATE USER 'foo'@'%' IDENTIFIED BY 'foo' ACCOUNT LOCK;
Query OK, 0 rows affected (0.0121 sec)

sql> SHOW CREATE USER 'foo'@'%';
+------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| CREATE USER for foo@%                                                                                                                                            |
+------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| CREATE USER 'foo'@'%' IDENTIFIED WITH 'mysql_native_password' AS '*F3A2A51A9B0F2BE2468926B4132313728C250DBF' REQUIRE NONE PASSWORD EXPIRE DEFAULT ACCOUNT LOCK |
+------------------------------------------------------------------------------------------------------------------------------------------------------------------+
1 row in set (0.0017 sec)

3. What did you see instead (Required)

sql> CREATE USER 'foo'@'%' IDENTIFIED BY 'foo' ACCOUNT LOCK;
Query OK, 0 rows affected (0.0121 sec)

sql> SHOW CREATE USER 'foo'@'%';
+------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| CREATE USER for foo@%                                                                                                                                            |
+------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| CREATE USER 'foo'@'%' IDENTIFIED WITH 'mysql_native_password' AS '*F3A2A51A9B0F2BE2468926B4132313728C250DBF' REQUIRE NONE PASSWORD EXPIRE DEFAULT ACCOUNT UNLOCK |
+------------------------------------------------------------------------------------------------------------------------------------------------------------------+
1 row in set (0.0017 sec)

It should have said ACCOUNT LOCK instead.

4. What is your TiDB version? (Required)

sql> SELECT tidb_version()\G
*************************** 1. row ***************************
tidb_version(): Release Version: v6.3.0-alpha-292-gbc0f951d0-dirty
Edition: Community
Git Commit Hash: bc0f951d0a4aff73adaf249383aeddde78649de6
Git Branch: master
UTC Build Time: 2022-09-19 19:08:51
GoVersion: go1.18
Race Enabled: false
TiKV Min Version: 6.2.0-alpha
Check Table Before Drop: false
Store: unistore
1 row in set (0.0009 sec)

This is probably related to #37051

@dveeden dveeden added the type/bug The issue is confirmed as a bug. label Sep 19, 2022
@dveeden
Copy link
Contributor Author

dveeden commented Sep 19, 2022

/severity major

@ti-chi-bot ti-chi-bot added severity/major may-affects-4.0 This bug maybe affects 4.0.x versions. may-affects-5.0 This bug maybe affects 5.0.x versions. may-affects-5.1 This bug maybe affects 5.1.x versions. may-affects-5.2 This bug maybe affects 5.2.x versions. may-affects-5.3 This bug maybe affects 5.3.x versions. may-affects-5.4 This bug maybe affects 5.4.x versions. may-affects-6.0 may-affects-6.1 may-affects-6.2 may-affects-6.3 labels Sep 19, 2022
@dveeden
Copy link
Contributor Author

dveeden commented Sep 19, 2022

/remove-label may-affects-4.0
/remove-label may-affects-5.0
/remove-label may-affects-5.1
/remove-label may-affects-5.2
/remove-label may-affects-5.3
/remove-label may-affects-5.4
/remove-label may-affects-6.0
/remove-label may-affects-6.1
/remove-label may-affects-6.2
/label affects-6.3

@ti-chi-bot ti-chi-bot removed may-affects-4.0 This bug maybe affects 4.0.x versions. may-affects-5.0 This bug maybe affects 5.0.x versions. may-affects-5.1 This bug maybe affects 5.1.x versions. may-affects-5.2 This bug maybe affects 5.2.x versions. may-affects-5.3 This bug maybe affects 5.3.x versions. may-affects-5.4 This bug maybe affects 5.4.x versions. may-affects-6.0 may-affects-6.1 may-affects-6.2 labels Sep 19, 2022
@ti-chi-bot
Copy link
Member

@dveeden: The label(s) affects-6.3 cannot be applied. These labels are supported: challenge-program, compatibility-breaker, first-time-contributor, contribution, require-LGT3, good first issue, correctness, duplicate, proposal, security, needs-more-info, needs-cherry-pick-4.0, needs-cherry-pick-5.0, needs-cherry-pick-5.1, needs-cherry-pick-5.2, needs-cherry-pick-5.3, needs-cherry-pick-5.4, needs-cherry-pick-6.0, needs-cherry-pick-6.1, needs-cherry-pick-6.2, affects-4.0, affects-5.0, affects-5.1, affects-5.2, affects-5.3, affects-5.4, affects-6.0, affects-6.1, affects-6.2, may-affects-4.0, may-affects-5.0, may-affects-5.1, may-affects-5.2, may-affects-5.3, may-affects-5.4, may-affects-6.0, may-affects-6.1, may-affects-6.2.

In response to this:

/remove-label may-affects-4.0
/remove-label may-affects-5.0
/remove-label may-affects-5.1
/remove-label may-affects-5.2
/remove-label may-affects-5.3
/remove-label may-affects-5.4
/remove-label may-affects-6.0
/remove-label may-affects-6.1
/remove-label may-affects-6.2
/label affects-6.3

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the ti-community-infra/tichi repository.

@ChenPeng2013 ChenPeng2013 added affects-5.0 This bug affects 5.0.x versions. affects-5.1 This bug affects 5.1.x versions. labels Oct 8, 2022
@ChenPeng2013 ChenPeng2013 added affects-5.2 This bug affects 5.2.x versions. affects-5.3 This bug affects 5.3.x versions. affects-5.4 This bug affects 5.4.x versions. affects-6.0 affects-6.1 affects-6.2 affects-6.3 labels Oct 8, 2022
@jebter jebter added the sig/sql-infra SIG: SQL Infra label Jan 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
affects-5.0 This bug affects 5.0.x versions. affects-5.1 This bug affects 5.1.x versions. affects-5.2 This bug affects 5.2.x versions. affects-5.3 This bug affects 5.3.x versions. affects-5.4 This bug affects 5.4.x versions. affects-6.0 affects-6.1 affects-6.2 affects-6.3 severity/major sig/sql-infra SIG: SQL Infra type/bug The issue is confirmed as a bug.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants