HongJinFeng opened a new issue #3628: Index out of bounds exception when set 
value of encrypt parameter
URL: https://github.com/apache/incubator-shardingsphere/issues/3628
 
 
   Encrypt-JDBC rewrite wrong sql when sql contain character '('. Besides, it 
works normally with the version of 4.0.0-RC2.
   
   Version of ShardingSphere
   4.0.0-RC3
   
   JDBC i use
   Encrypt-JDBC
   
   Steps to reproduce the behavior, such as: SQL to execute, sharding rule 
configuration, when exception occur etc.
   1.MySQL table and encrypt configuration
   table:
   create table t_demo{
   username varchar(20),
   phone varchar(20),
   username_encrypt(64),
   phone_encrypt(64),
   version timestamp
   }
   encrypt configuration
   spring.shardingsphere.datasource.name = ds
   spring.shardingsphere.datasource.ds.type = 
com.alibaba.druid.pool.DruidDataSource
   spring.shardingsphere.datasource.ds.driver-class-name = com.mysql.jdbc.Driver
   spring.shardingsphere.datasource.ds.url = xxx
   spring.shardingsphere.datasource.ds.username = xxx
   spring.shardingsphere.datasource.ds.password = xxx
   spring.shardingsphere.encrypt.encryptors.encryptor_aes.type = AES
   spring.shardingsphere.encrypt.tables.t_demo.columns.username.plainColumn = 
username
   spring.shardingsphere.encrypt.tables.t_demo.columns.username.cipherColumn = 
username_encrypt
   spring.shardingsphere.encrypt.tables.t_demo.columns.phone.plainColumn = phone
   spring.shardingsphere.encrypt.tables.t_demo.columns.phone.cipherColumn = 
phone_encrypt
   spring.shardingsphere.encrypt.tables.t_demo.columns.phone.encryptor = 
encryptor_aes
   spring.shardingsphere.encrypt.tables.t_demo.columns.username.encryptor = 
encryptor_aes
   
   2.My sql
   insert into t_demo (username,version,phone) values 
('xxx',UNIX_TIMESTAMP(),'xxx')
   
   3 Bug occur when set parameters
   StandardParameterBuilder.getParameters()
   
![image](https://user-images.githubusercontent.com/33616750/69897414-c3d0ae00-1386-11ea-89d6-7c540413c73c.png)
   
![image](https://user-images.githubusercontent.com/33616750/69897415-cd5a1600-1386-11ea-8cc3-27175299e6d2.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:
[email protected]


With regards,
Apache Git Services

Reply via email to