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 2021/02/04 15:49:31 UTC

[GitHub] [shardingsphere] giggs131400 opened a new issue #9334: Failed to parse sensitive field under encryption scenario

giggs131400 opened a new issue #9334:
URL: https://github.com/apache/shardingsphere/issues/9334


   ## Bug Report
   
   ### Which version of ShardingSphere did you use?
   5.0.0-alpha
   
   ### Which project did you use? ShardingSphere-JDBC or ShardingSphere-Proxy?
   ShardingSphere-JDBC
   
   ### Steps to reproduce the behavior, such as: SQL to execute, sharding rule configuration, when exception occur etc.
   1. we have two tables, one is student, the other is score. And table student have column "stuname" we need to encryt
   2. we have sql:
   ```sql
   select student.id, uid, stuname 
   from score 
   left join student on student.id = score.id
   where stuname = ?
   ```
   3.  after shardingsphere rewrite it, we expected: 
   ```sql
   select student.id, uid, stuname_enc 
   from score 
   left join student on student.id = score.id
   where stuname_enc = ?
   ```
   but actually it parsed:
   ```sql
   select student.id, uid, **stuname**
   from score 
   left join student on student.id = score.id
   where stuname_enc = ?
   ```
   
   4. another scenario, we have sql:
   ```sql
   select AA.id, AA.uid, AA.stuname 
   from (select * from student whre stuname = ?) as AA
   ```
   after rewrite it, we expect
   ```sql
   select AA.id, AA.uid, AA.stuname_enc AS stuname 
   from (select * from student whre stuname_enc = ?) as AA
   ```
   but actually it parsed:
   ```sql
   select AA.id, AA.uid, AA.stuname_enc AS stuname 
   from (select * from student whre stuname = ?) as AA
   ``` 


----------------------------------------------------------------
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] terrymanu commented on issue #9334: Failed to parse sensitive field under encryption scenario

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






----------------------------------------------------------------
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] terrymanu edited a comment on issue #9334: Failed to parse sensitive field under encryption scenario

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


   There are 2 problems in this issue.
   
   The first problem is for SELECT JOIN , I just add the test case about it, please see #9346. 
   It is OK, so could you try the master branch?
   
   The second problem is for sub-query which is not in the current scope, we cannot process sub-query as well.
   There is no plan for now.
   
   I just create a new issue for encrypt about sub-query.


----------------------------------------------------------------
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] terrymanu closed issue #9334: Failed to parse sensitive field under encryption scenario

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


   


-- 
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: notifications-unsubscribe@shardingsphere.apache.org

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



[GitHub] [shardingsphere] terrymanu commented on issue #9334: Failed to parse sensitive field under encryption scenario

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


   There are 2 problems in this issue.
   
   The first problem is for SELECT JOIN , I just add the test case about it, please see #9346. 
   It is OK, so could you try the master branch?
   
   The second problem is for sub-query which is not in the current scope, we cannot process sub-query as well.
   There is no plan for now.


----------------------------------------------------------------
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] giggs131400 commented on issue #9334: Failed to parse sensitive field under encryption scenario

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


   I still encounter the first problem, and I add the steps how to reproduce it under the #9346 


----------------------------------------------------------------
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] terrymanu commented on issue #9334: Failed to parse sensitive field under encryption scenario

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


   It has been supported in version `5.0.0-beta`


-- 
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: notifications-unsubscribe@shardingsphere.apache.org

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



[GitHub] [shardingsphere] terrymanu commented on issue #9334: Failed to parse sensitive field under encryption scenario

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


   ref #9349


----------------------------------------------------------------
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] terrymanu edited a comment on issue #9334: Failed to parse sensitive field under encryption scenario

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


   There are 2 problems in this issue.
   
   The first problem is for SELECT JOIN , I just add the test case about it, please see #9346. 
   It is OK, so could you try the master branch?
   
   The second problem is for sub-query which is not in the current scope, we cannot process sub-query as well.
   There is no plan for now.
   
   I just create a new issue for encrypt about sub-query.


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