strongduanmu opened a new issue, #25616:
URL: https://github.com/apache/shardingsphere/issues/25616

   ## Bug Report
   
   ### Which version of ShardingSphere did you use?
   
   
[0997ec9](https://github.com/apache/shardingsphere/commit/0997ec95c9e699fab8e8289c5d3c111d02463910)
   
   ### Which project did you use? ShardingSphere-JDBC or ShardingSphere-Proxy?
   
   ShardingSphere-Proxy
   
   ### Expected behavior
   
   Return correct mask result when I config same value of from-x and to-y with 
KEEP_FROM_X_TO_Y
   
   ### Actual behavior
   
   ```
   java.lang.AssertionError: 
   Expected: is "**c******"
        but: was "abc123456"
   Expected :**c******
   Actual   :abc123456
   <Click to see difference>
   ```
   
   ### Reason analyze (If you can)
   
   ### Steps to reproduce the behavior, such as: SQL to execute, sharding rule 
configuration, when exception occur etc.
   
   ```java
   class KeepFromXToYMaskAlgorithmTest {
       
       private KeepFromXToYMaskAlgorithm maskAlgorithm;
       
       @BeforeEach
       void setUp() {
           maskAlgorithm = new KeepFromXToYMaskAlgorithm();
           maskAlgorithm.init(PropertiesBuilder.build(new Property("from-x", 
"2"), new Property("to-y", "2"), new Property("replace-char", "*")));
       }
       
       @Test
       void assertMask() {
           assertThat(maskAlgorithm.mask("abc123456"), is("**c******"));
       }
   }
   ```
   
   ### Example codes for reproduce this issue (such as a github link).
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: 
[email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to