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/25 04:33:04 UTC

[GitHub] [shardingsphere] tristaZero opened a new issue #9497: Add more encrypt test cases for integration test

tristaZero opened a new issue #9497:
URL: https://github.com/apache/shardingsphere/issues/9497


   
   Currently our integration test engine can run the encryption scenario. But more cases are needed to test. Here is my list. Welcome your any cases to add,
   
   ####  Init_SQL
   ```sql
   // For configuration without plainText column
   CREATE TABLE t_user (user_id INT NOT NULL, pwd VARCHAR(45) NULL, pwd_cipher VARCHAR(45) NULL, PRIMARY KEY (user_id));
   
   // For configuration with plainText column
   CREATE TABLE t_user_with_plain (user_id INT NOT NULL, pwd VARCHAR(45) NULL, pwd_cipher VARCHAR(45) NULL, pwd_plain VARCHAR(45), PRIMARY KEY (user_id));
   ```
   
   #### Cases
   
   > All the following cases are expected to run on both of the tables above.
   
   ```sql
   // DML
   INSERT INTO t_user(user_id, pwd) VALUES (2,'b'), (3, 'c')
   INSERT INTO t_user SET user_id = 3, pwd = 'c';
   
   UPDATE t_user SET pwd = 'c1' WHERE pwd = 'c';
   UPDATE t_user SET pwd = 'c1' WHERE user_id = 2;
   
   DELETE FROM t_user WHERE pwd = 'c' and user_id = 2; 
   DELETE FROM t_user WHERE pwd = 'c' or user_id = 3; 
   
   // DDL
   ALTER TABLE t_user MODIFY pwd pwd_new VARCHAR(50)
   ALTER TABLE t_user DROP pwd;
   // Encrypt rule exists
   CREATE TABLE t_user (user_id INT NOT NULL, pwd VARCHAR(45) NULL, pwd_cipher VARCHAR(45) NULL);
   
   // DQL
   SELECT id, pwd FROM t_user WHERE pwd = 'a';
   SELECT * FROM t_user;
   SELECT id FROM t_user WHERE pwd in ('a', 'b');
   SELECT id FROM t_user WHERE pwd in ('a', 'b') and id = 1;
   // It still needs asserting the column count
   SELECT * FROM t_user WHERE pwd in ('a', 'b') or id = 1;
   ```


----------------------------------------------------------------
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 closed issue #9497: Add more encrypt test cases for integration test

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


   


----------------------------------------------------------------
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] JiekerTime commented on issue #9497: Add more encrypt test cases for integration test

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


   Hi @tristaZero !i will try to add it!


----------------------------------------------------------------
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 #9497: Add more encrypt test cases for integration test

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


   Done.


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