Index out of bounds exception when set value of encrypt parameter
Index out of bounds exception when set value of encrypt parameter
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()

wrong index of encrypt insert value
Column index is not represent the position that encrypt value replace position, some columns' value are expression like MySQL function.

@terrymanu
Found the reason~~, it is a little complicate to describe. This case close.