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/08/16 07:45:38 UTC

[GitHub] [shardingsphere] vinceLin054 opened a new issue #6881: 4.1.0 DATA MASKING insert sql rewrite wrong

vinceLin054 opened a new issue #6881:
URL: https://github.com/apache/shardingsphere/issues/6881


   **When I execute the insert values containing SQL functions like now() in front of the mask field, the parameter position error occurs.**
   
   Here is my configuration :
   
   ```
         tables:
           my_users:
             columns:
               phone_number:
                 plainColumn: phone_number
                 cipherColumn: encryptor_phone_number
                 encryptor: encryptor_aes
               given_name:
                 plainColumn: given_name
                 cipherColumn: encryptor_given_name
                 encryptor: encryptor_aes
                 logicColumn: given_name
   ```
   
   Logic SQL:
   ```
   INSERT INTO
            
           my_users
        
           ( 
           created_at, updated_at, phone_number, given_name, avatar_url, password, password_strength 
        )
           VALUES
           ( 
           now(), now(), ?, ?, ?, ?, ?
        )
   
   ```
   Actual SQL:
   ```
   INSERT INTO
            
           my_users
        
           ( 
           created_at, updated_at, encryptor_phone_number, phone_number, encryptor_given_name, given_name, avatar_url, password, pasword_strength 
        )
           VALUES
           (now(), now(), ?, ?, ?, ?, ?, ?, ?) ::: [123123123123, tom, M4RQIlytSdcEMugmk8N9qQ==, 123123123123, chd9v7LIHgzGCFAunDNSGA==, tom, 0]
   ```
   


----------------------------------------------------------------
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] vinceLin054 edited a comment on issue #6881: 4.1.0 DATA MASKING insert sql rewrite wrong

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


   ![image](https://user-images.githubusercontent.com/52090552/90329695-9f326a00-dfd9-11ea-8230-75bc013b49b2.png)
   ![image](https://user-images.githubusercontent.com/52090552/90329678-81fd9b80-dfd9-11ea-9e48-7a56335ff5c3.png)
   
   When I went into debug mode, I found that discoveroriginalParameters are 5 but insertStatementContext.columnNames are 7. This makes the replacedindexandparameters mappings mismatched.


----------------------------------------------------------------
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] vinceLin054 commented on issue #6881: 4.1.0 DATA MASKING insert sql rewrite wrong

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


   
   ![image](https://user-images.githubusercontent.com/52090552/90329591-c0468b00-dfd8-11ea-8a84-b08820a7eeda.png)
   
   When I went into debug mode, I found that discoveroriginalParameters are 5 but insertStatementContext.columnNames are 7. This makes the replacedindexandparameters mappings mismatched.


----------------------------------------------------------------
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] vinceLin054 commented on issue #6881: 4.1.0 DATA MASKING insert sql rewrite wrong

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


   Thank you for your reply, waiting for your next release.


----------------------------------------------------------------
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] vinceLin054 closed issue #6881: 4.1.0 DATA MASKING insert sql rewrite wrong

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


   


----------------------------------------------------------------
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 #6881: 4.1.0 DATA MASKING insert sql rewrite wrong

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


   @vinceLin054 Hi thanks for your feedback.
   This bug has been fixed on the `master branch` already. Please wait for our next release. Or you can have a try with the master branch.


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