liming0 commented on issue #25005:
URL: 
https://github.com/apache/shardingsphere/issues/25005#issuecomment-1501572616

   > @FakeKotaro Thank you for your feedback, I will investigate this issue.
   Have you solved this problem?
   I saw a bugfix (25033) in 20096. I overwrote the file in fix to the local 
and this error still occurred. I used postgrea
   [https://github.com/apache/shardingsphere/pull/25033](url)
   databaseType:postgrea
   version:  5.3.2
   config:
   ```
   rules:
     # 加密策略
   - !ENCRYPT
     encryptors:
       enc-aes-c:
         type: AES-C
         props:
           aes-c-key-value: 
${shardingsphere.encrypt.commons.ept-zqsb.aes-c-key-value}
       enc-sha256:
         type: ${shardingsphere.encrypt.commons.enc-sha256}
     tables:
       t_person0:
         columns:
           person_name:
             encryptorName: enc-aes-c
             cipherColumn: person_name_plain
             assistedQueryColumn: person_name_query
             assistedQueryEncryptorName: enc-sha256
             plainColumn: person_name
   ```
   sql:`SELECT COUNT(1) FROM (SELECT DISTINCT person_name personName, gender 
FROM t_person0 WHERE personName IS NOT NULL) TOTAL`
   error:
   ```
   ### Error querying database.  Cause: java.sql.SQLException: Unknown 
exception: String index out of range: -22
   ### The error may exist in com/thunisoft/ept/zqsb/mapper/Person0Mapper.java 
(best guess)
   ### The error may involve 
com.thunisoft.ept.zqsb.mapper.Person0Mapper.findPageAsDistinct-Inline
   ### The error occurred while setting parameters
   ### SQL: SELECT COUNT(1) FROM (SELECT DISTINCT person_name personName, 
gender FROM t_person0 WHERE personName IS NOT NULL) TOTAL
   ### Cause: java.sql.SQLException: Unknown exception: String index out of 
range: -22
   ; uncategorized SQLException; SQL state [HY000]; error code [30000]; Unknown 
exception: String index out of range: -22; nested exception is 
java.sql.SQLException: Unknown exception: String index out of range: -22]
   ```
   Override:
   
![image](https://user-images.githubusercontent.com/50445932/230869092-a09f7f3a-f910-44be-9659-88f5173227f5.png)
   
   


-- 
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