Bug Report
Which version of ShardingSphere did you use?
master @ 99a0b47
Which project did you use? ShardingSphere-JDBC or ShardingSphere-Proxy?
Both
Expected behavior
address_random_replace is usable as a mask rule name, column name or database name.
Actual behavior
The statements below fail with mismatched input 'address_random_replace' expecting {IF, IDENTIFIER_} or expecting IDENTIFIER_.
Reason analyze (If you can)
features/mask/distsql/parser/src/main/antlr4/imports/mask/Keyword.g4:138 defines the unreferenced ADDRESS_RANDOM_REPLACE lexer token: buildInMaskAlgorithmType omits it and no matching MaskAlgorithm exists. It precedes IDENTIFIER_ and shadows it.
It is the leftover of #24847 ("the keyword list now needs to be updated"): #24848 dropped only the BaseRule.g4 alternative, and #28071 removed five sibling keywords from both files but missed this one. #39012 removed unused DistSQL keyword tokens for the same reason.
Steps to reproduce the behavior, such as: SQL to execute, sharding rule configuration, when exception occur etc.
CREATE MASK RULE address_random_replace (COLUMNS((NAME=phone, TYPE(NAME=MD5))));
SHOW MASK RULES FROM address_random_replace;
DROP MASK RULE address_random_replace;
Example codes for reproduce this issue (such as a github link).
N/A
Could a committer confirm there is no plan to reintroduce this algorithm? If there is, the keyword should instead gain a buildInMaskAlgorithmType alternative.
Bug Report
Which version of ShardingSphere did you use?
master @ 99a0b47
Which project did you use? ShardingSphere-JDBC or ShardingSphere-Proxy?
Both
Expected behavior
address_random_replaceis usable as a mask rule name, column name or database name.Actual behavior
The statements below fail with
mismatched input 'address_random_replace' expecting {IF, IDENTIFIER_}orexpecting IDENTIFIER_.Reason analyze (If you can)
features/mask/distsql/parser/src/main/antlr4/imports/mask/Keyword.g4:138defines the unreferencedADDRESS_RANDOM_REPLACElexer token:buildInMaskAlgorithmTypeomits it and no matchingMaskAlgorithmexists. It precedesIDENTIFIER_and shadows it.It is the leftover of #24847 ("the keyword list now needs to be updated"): #24848 dropped only the
BaseRule.g4alternative, and #28071 removed five sibling keywords from both files but missed this one. #39012 removed unused DistSQL keyword tokens for the same reason.Steps to reproduce the behavior, such as: SQL to execute, sharding rule configuration, when exception occur etc.
Example codes for reproduce this issue (such as a github link).
N/A
Could a committer confirm there is no plan to reintroduce this algorithm? If there is, the keyword should instead gain a
buildInMaskAlgorithmTypealternative.