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

CREATE USER/GRANT PRIVILEGE should begin a new transaction #10705

Closed
tiancaiamao opened this issue Jun 4, 2019 · 0 comments · Fixed by #10707
Closed

CREATE USER/GRANT PRIVILEGE should begin a new transaction #10705

tiancaiamao opened this issue Jun 4, 2019 · 0 comments · Fixed by #10707
Assignees
Labels
priority/release-blocker This issue blocks a release. Please solve it ASAP. type/bug The issue is confirmed as a bug. type/compatibility

Comments

@tiancaiamao
Copy link
Contributor

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.
mysql> begin;                                                                                                                                                                                         Query OK, 0 rows affected (0.00 sec)

mysql> create user 'xxx'@'%';                                                                                                                                                                       
Query OK, 1 row affected (0.01 sec)

mysql> grant all privileges on *.* to 'xxx'@'%';                                                                                                                                                    
ERROR 1062 (23000): Duplicate entry '%-xxx' for key 'PRIMARY'
  1. What did you expect to see?

Success

  1. What did you see instead?

Fail

  1. What version of TiDB are you using (tidb-server -V or run select tidb_version(); on TiDB)?

2.1, 3.0, master ... all of them


Just like DDL, create user grant xxx should begin a new transaction

@tiancaiamao tiancaiamao added the type/bugfix This PR fixes a bug. label Jun 4, 2019
@tiancaiamao tiancaiamao self-assigned this Jun 4, 2019
@tiancaiamao tiancaiamao added type/compatibility priority/release-blocker This issue blocks a release. Please solve it ASAP. labels Jun 4, 2019
@winkyao winkyao added type/bug The issue is confirmed as a bug. and removed type/bugfix This PR fixes a bug. labels Jun 4, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
priority/release-blocker This issue blocks a release. Please solve it ASAP. type/bug The issue is confirmed as a bug. type/compatibility
Projects
None yet
2 participants