You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shardingsphere.apache.org by GitBox <gi...@apache.org> on 2020/09/09 10:18:00 UTC

[GitHub] [shardingsphere] Keanhua opened a new issue #7359: query with encrypt column , the result is incorrected

Keanhua opened a new issue #7359:
URL: https://github.com/apache/shardingsphere/issues/7359


   ## Bug Report
   
   **For English only**, other languages will not accept.
   
   Before report a bug, make sure you have:
   
   - Searched open and closed [GitHub issues](https://github.com/apache/shardingsphere/issues).
   - Read documentation: [ShardingSphere Doc](https://shardingsphere.apache.org/document/current/en/overview).
   
   Please pay attention on issues you submitted, because we maybe need more details. 
   If no response anymore and we cannot reproduce it on current information, we will **close it**.
   
   Please answer these questions before submitting your issue. Thanks!
   
   ### Which version of ShardingSphere did you use?
   4.1.1
   ### Which project did you use? ShardingSphere-JDBC or ShardingSphere-Proxy?
   ShardingSphere-JDBC 
   ### Expected behavior
   when i query with encrypt ,it can query the data
   ### Actual behavior
   when i query with encrypt ,it can query no data
   ### Reason analyze (If you can)
   ![image](https://user-images.githubusercontent.com/31396902/92585879-2072d900-f2c8-11ea-95b0-41f6e0aacaa7.png)
   when the table is instance of SubqueryTableSegment , it will not add to tables, it not parse the encrypt param
   ![image](https://user-images.githubusercontent.com/31396902/92586331-ad1d9700-f2c8-11ea-818c-4891275d769d.png)
   when the table is instance of SimpleTableSegment , it will add to tables, it will parse the encrypt param
   ### 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).
   


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

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [shardingsphere] Keanhua edited a comment on issue #7359: query with encrypt column , the result is incorrected

Posted by GitBox <gi...@apache.org>.
Keanhua edited a comment on issue #7359:
URL: https://github.com/apache/shardingsphere/issues/7359#issuecomment-689475478


   ![image](https://user-images.githubusercontent.com/31396902/92587930-e5be7000-f2ca-11ea-945a-c2f7caa2a50e.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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [shardingsphere] Keanhua commented on issue #7359: query with encrypt column , the result is incorrected

Posted by GitBox <gi...@apache.org>.
Keanhua commented on issue #7359:
URL: https://github.com/apache/shardingsphere/issues/7359#issuecomment-690095575


   @kimmking but 4.0.1 is supported


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

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [shardingsphere] kimmking commented on issue #7359: query with encrypt column , the result is incorrected

Posted by GitBox <gi...@apache.org>.
kimmking commented on issue #7359:
URL: https://github.com/apache/shardingsphere/issues/7359#issuecomment-689473269


   plz show your config rules and logic sql/actual sql. 


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

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [shardingsphere] Keanhua removed a comment on issue #7359: query with encrypt column , the result is incorrected

Posted by GitBox <gi...@apache.org>.
Keanhua removed a comment on issue #7359:
URL: https://github.com/apache/shardingsphere/issues/7359#issuecomment-690090895


   @kimmking this is also a subquery but it can encrypt
   ![image](https://user-images.githubusercontent.com/31396902/92704620-a6088e80-f385-11ea-82c9-3678ca5d98df.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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [shardingsphere] kimmking closed issue #7359: query with encrypt column , the result is incorrected

Posted by GitBox <gi...@apache.org>.
kimmking closed issue #7359:
URL: https://github.com/apache/shardingsphere/issues/7359


   


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

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [shardingsphere] Keanhua commented on issue #7359: query with encrypt column , the result is incorrected

Posted by GitBox <gi...@apache.org>.
Keanhua commented on issue #7359:
URL: https://github.com/apache/shardingsphere/issues/7359#issuecomment-689475938


   Logic SQL: SELECT COUNT(1) FROM ( SELECT  id,create_time,update_time,name,idcard,result,operate_time,operator_id,operator_name,valid  FROM shangbao_idcard_verify 
    
    WHERE (valid = ? AND (name = ? OR idcard = ?)) ORDER BY id DESC ) TOTAL
   
   
    Actual SQL: ds ::: SELECT COUNT(1) FROM ( SELECT  id,create_time,update_time,name,idcard,result,operate_time,operator_id,operator_name,valid  FROM shangbao_idcard_verify 
    
    WHERE (valid = ? AND (name = ? OR idcard = ?)) ORDER BY id DESC ) TOTAL ::: [1, 533022199607040734, 533022199607040734]


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

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [shardingsphere] Keanhua commented on issue #7359: query with encrypt column , the result is incorrected

Posted by GitBox <gi...@apache.org>.
Keanhua commented on issue #7359:
URL: https://github.com/apache/shardingsphere/issues/7359#issuecomment-689475478


   encryptors:
     encryptor_aes:
       props:
         aes.key.value: 123131313
       type: AES
   tables:
     shangbao_idcard_verify:
       columns:
         idcard:
           cipherColumn: idcard
           encryptor: encryptor_aes


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

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [shardingsphere] Keanhua edited a comment on issue #7359: query with encrypt column , the result is incorrected

Posted by GitBox <gi...@apache.org>.
Keanhua edited a comment on issue #7359:
URL: https://github.com/apache/shardingsphere/issues/7359#issuecomment-689475938


   @kimmking 
   
   Logic SQL: SELECT COUNT(1) FROM ( SELECT  id,create_time,update_time,name,idcard,result,operate_time,operator_id,operator_name,valid  FROM shangbao_idcard_verify 
    
    WHERE (valid = ? AND (name = ? OR idcard = ?)) ORDER BY id DESC ) TOTAL
   
   
    Actual SQL: ds ::: SELECT COUNT(1) FROM ( SELECT  id,create_time,update_time,name,idcard,result,operate_time,operator_id,operator_name,valid  FROM shangbao_idcard_verify 
    
    WHERE (valid = ? AND (name = ? OR idcard = ?)) ORDER BY id DESC ) TOTAL ::: [1, 533022199607040734, 533022199607040734]


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

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [shardingsphere] Keanhua commented on issue #7359: query with encrypt column , the result is incorrected

Posted by GitBox <gi...@apache.org>.
Keanhua commented on issue #7359:
URL: https://github.com/apache/shardingsphere/issues/7359#issuecomment-690090895


   @kimmking this is also a subquery but it can encrypt
   ![image](https://user-images.githubusercontent.com/31396902/92704620-a6088e80-f385-11ea-82c9-3678ca5d98df.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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [shardingsphere] kimmking commented on issue #7359: query with encrypt column , the result is incorrected

Posted by GitBox <gi...@apache.org>.
kimmking commented on issue #7359:
URL: https://github.com/apache/shardingsphere/issues/7359#issuecomment-689486003


   encrypted query with subquery/join now is not supported.


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

For queries about this service, please contact Infrastructure at:
users@infra.apache.org