-
Notifications
You must be signed in to change notification settings - Fork 326
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
Fix (issuse: #104) : Cast error when 'set password' #112
base: main
Are you sure you want to change the base?
Conversation
@Oldbread3 PTAL:) |
Will this fix cause exception for statement like |
Amend use name at code path below might be the proper way to fix this issue. Line 6506 in ffd596b
|
when using statement should i just cast SQLIdentifierExpr to MySqlUserName in MysqlStatementParser.class (code path above) or or use Line 77 in 55ca0c9
|
@@ -74,7 +74,13 @@ private static List<PolarAccountInfo> getGrantees(ByteString sql, PolarAccountIn | |||
SQLSetStatement statement = | |||
(SQLSetStatement) FastsqlUtils.parseSql(sql, SQLParserFeature.IgnoreNameQuotes).get(0); | |||
SQLAssignItem assignItem = statement.getItems().get(0); | |||
MySqlUserName userName = (MySqlUserName) assignItem.getTarget(); | |||
SQLExpr target = assignItem.getTarget(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this might be a more safe way to fix this issue, cause it did't change parseSet() function in MysqlStatementParser, and won't affect other using scenario. PTAL:) @Oldbread3
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
@@ -74,7 +74,13 @@ private static List<PolarAccountInfo> getGrantees(ByteString sql, PolarAccountIn | |||
SQLSetStatement statement = | |||
(SQLSetStatement) FastsqlUtils.parseSql(sql, SQLParserFeature.IgnoreNameQuotes).get(0); | |||
SQLAssignItem assignItem = statement.getItems().get(0); | |||
MySqlUserName userName = (MySqlUserName) assignItem.getTarget(); | |||
SQLExpr target = assignItem.getTarget(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
这个pr还不能合入嘛 @Oldbread3 @ZSYTY |
89ea352
to
ba432af
Compare
Problems solved in this PR
issuse: #104
Changes proposed in this PR
Tests
Release note