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

In the USER management operation, when the hostname is not specified, it cannot be automatically set to% #104

Open
yejr opened this issue Nov 30, 2022 · 5 comments

Comments

@yejr
Copy link

yejr commented Nov 30, 2022

mysql>create user yejr identified by 'xx';  -- hostname  is not specified, treated as%
Query OK, 0 rows affected (0.12 sec)

mysql>show grants for yejr;  -- hostname  is not specified, treated as%
+----------------------------------+
| GRANTS FOR 'YEJR'@'%'            |
+----------------------------------+
| GRANT USAGE ON *.* TO 'yejr'@'%' |
+----------------------------------+
1 row in set (1.45 sec)

mysql>set password for yejr = password('xx');  -- hostname  is not specified, errors raised
ERROR 3009 (HY000): [154bfc7d7e002000][172.17.0.6:58709][d3]class com.alibaba.polardbx.druid.sql.ast.expr.SQLIdentifierExpr cannot be cast to class com.alibaba.polardbx.druid.sql.dialect.mysql.ast.expr.MySqlUserName (com.alibaba.polardbx.druid.sql.ast.expr.SQLIdentifierExpr and com.alibaba.polardbx.druid.sql.dialect.mysql.ast.expr.MySqlUserName are in unnamed module of loader 'app')

mysql>set password for yejr@'%' = password('xx');
Query OK, 0 rows affected (0.06 sec)
@F-ca7
Copy link
Collaborator

F-ca7 commented Nov 30, 2022

This is a bug caused by MySqlExprParser. We will fix it.

@joeCarf
Copy link
Contributor

joeCarf commented Dec 1, 2022

This is a bug caused by MySqlExprParser. We will fix it.

if no one fixes it, you can assign this to me, i'm interested and may have a try.

@F-ca7
Copy link
Collaborator

F-ca7 commented Dec 2, 2022

if no one fixes it, you can assign this to me, i'm interested and may have a try.

Sure. I will do the code review for your merge request.

@joeCarf
Copy link
Contributor

joeCarf commented Dec 2, 2022

if no one fixes it, you can assign this to me, i'm interested and may have a try.

Sure. I will do the code review for your merge request.

thanks a lot

@joeCarf
Copy link
Contributor

joeCarf commented Dec 2, 2022

hi, i opened a merge request.#112
I think it will fix this bug. @F-ca7

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

No branches or pull requests

3 participants