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/10/12 12:43:53 UTC

[GitHub] [shardingsphere] liuchaoheliang opened a new issue #7763: sql rewrite not work for select ... where cipherColumn is null

liuchaoheliang opened a new issue #7763:
URL: https://github.com/apache/shardingsphere/issues/7763


   sql   case:   select * from user_info where mobile is null or mobile = ? 
   rewrite result : SQL: select * from user_info where mobile is null or mobile_enc = ?
   why the frist mobile column can not be rewrited?


----------------------------------------------------------------
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] liuchaoheliang commented on issue #7763: sql rewrite not work for select ... where cipherColumn is null

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


   Did you test it on the 5.x version?
   i running on  4.x version , Does the 4.x version stop maintenance?


----------------------------------------------------------------
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] tristaZero commented on issue #7763: sql rewrite not work for select ... where cipherColumn is null

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


   Hi @liuchaoheliang I supposed we fixed this bug on the master branch.
   ```
    Logic SQL: select * from t_encrypt where user_id is null
   [INFO ] 11:23:25.331 [ShardingSphere-Command-2] ShardingSphere-SQL - SQLStatement: org.apache.shardingsphere.sql.parser.sql.dialect.statement.mysql.dml.MySQLSelectStatement@3c0023c7
   [INFO ] 11:23:25.331 [ShardingSphere-Command-2] ShardingSphere-SQL - Actual SQL: dataSource ::: select *  from t_encrypt where user_cipher is null
   ```
   ```yaml
   rules:
   - !ENCRYPT
     encryptors:
       aes_encryptor:
         type: AES
         props:
           aes-key-value: 123456abc
       md5_encryptor:
         type: MD5
     tables:
       t_encrypt:
         columns:
           user_id:
             plainColumn: user_plain
             cipherColumn: user_cipher
             encryptorName: aes_encryptor
           order_id:
             cipherColumn: order_cipher
             encryptorName: md5_encryptor
   ```


----------------------------------------------------------------
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] tristaZero commented on issue #7763: sql rewrite not work for select ... where cipherColumn is null

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


   > Did you test it on the 5.x version?
   
   @liuchaoheliang Yep, 5.x is coming soon.


----------------------------------------------------------------
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] liuchaoheliang commented on issue #7763: sql rewrite not work for select ... where cipherColumn is null

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


   all right !
   it seems that only I can fix this bug myself .
   thank you very much ! 


----------------------------------------------------------------
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] liuchaoheliang commented on issue #7763: sql rewrite not work for select ... where cipherColumn is null

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


   yes , very simple!
   like this :
   spring.shardingsphere.encrypt.encryptors.mobile_encryptor.type=mobile
   
   spring.shardingsphere.props.query.with.cipher.column=true
   spring.shardingsphere.props.sql.show=true
   spring.shardingsphere.encrypt.tables.user_info.columns.mobile.cipherColumn=mobile_enc
   spring.shardingsphere.encrypt.tables.user_info.columns.mobile.encryptor=mobile_encryptor
   
   
   
   the mobile column is cipherColumn
   


----------------------------------------------------------------
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 #7763: sql rewrite not work for select ... where cipherColumn is null

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


   can you show your configuration?


----------------------------------------------------------------
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] liuchaoheliang closed issue #7763: sql rewrite not work for select ... where cipherColumn is null

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


   


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