[GitHub] [incubator-shardingsphere] xiyelife commented on issue #2923: when using EncryptPreparedStatement to savebatch occours error

2019-09-05 Thread GitBox
xiyelife commented on issue #2923: when using EncryptPreparedStatement to 
savebatch occours error
URL: 
https://github.com/apache/incubator-shardingsphere/issues/2923#issuecomment-528351057
 
 
   yeah, I think so, we can deal with the remaining parameters by your way, i.e 
maxRows,fetchSize and so on. @tristaZero 


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:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [incubator-shardingsphere] xiyelife commented on issue #2923: when using EncryptPreparedStatement to savebatch occours error

2019-09-05 Thread GitBox
xiyelife commented on issue #2923: when using EncryptPreparedStatement to 
savebatch occours error
URL: 
https://github.com/apache/incubator-shardingsphere/issues/2923#issuecomment-528303029
 
 
   @tristaZero Hi, there are no incoming parameters to bind at the time of 
construction, which can cause the generation of EncryptInsertOptimizedStatement 
failed:
   
![image](https://user-images.githubusercontent.com/8772975/64334319-dac36680-d00a-11e9-9d20-0b35bab17c6d.png)
   I think the problem should be more complicated..


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:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [incubator-shardingsphere] xiyelife commented on issue #2923: when using EncryptPreparedStatement to savebatch occours error

2019-09-05 Thread GitBox
xiyelife commented on issue #2923: when using EncryptPreparedStatement to 
savebatch occours error
URL: 
https://github.com/apache/incubator-shardingsphere/issues/2923#issuecomment-528240055
 
 
   @tristaZero  ok ,that's what I thought at first. I'll try to modify my pr 
later.
   
   And I found that the latest version of the code(RC3-SNAPSHOT) would 
incorrectly insert my original column like this:
   **SQLRewriteEngine Pre:**
   columnNames=[name, ident, is_mobile_authed, mobile, modify_time, password, 
reg_device_info, reg_source, time_inst, time_upd, mobile, ident, name]
   parameters=[闵姐, 600xxx756, 1, 1xxx4, 11, jpaxsdsewrwe123123f, jpatest, 
111, 2019-09-05 15:27:47.77, 2019-09-05 15:27:47.77])]
   
   > name=闵姐
   
   > mobile=1xxx4
   
   **atfter SQLRewriteEngine:**
   SQLUnit(sql=insert into user_info (name_encrypt, ident_encrypt, 
is_mobile_authed, mobile_encrypt, modify_time, password, reg_device_info, 
reg_source, time_inst, time_upd, mobile, ident, name) values (?, ?, ?, ?, ?, ?, 
?, ?, ?, ?, ?, ?, ?), parameters=[*n/w+WpRwyeiTYgpM59dyF9g==, 
*i4sLpmagWmoLIiHZ5h7bt1kTeFpBZrxX8jgy/M8y0fU0=, 1, *mN6+s/ObMX0ZTcWp7pl9T6g==, 
11, jpaxsdsewrwe123123f, jpatest, 111, 2019-09-05 15:27:47.77, 2019-09-05 
15:27:47.77, 闵姐, 600xxx756, 1xxx4])
   
   > name=1xxx4
   
   > mobile=闵姐
   
   **the two columns are interchanged!!**
   The data stored in the database are also interchanged.
   
   
   
   
   


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:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [incubator-shardingsphere] xiyelife commented on issue #2923: when using EncryptPreparedStatement to savebatch occours error

2019-09-05 Thread GitBox
xiyelife commented on issue #2923: when using EncryptPreparedStatement to 
savebatch occours error
URL: 
https://github.com/apache/incubator-shardingsphere/issues/2923#issuecomment-528223411
 
 
   not only batch insert,the sigle insert occured too ,here is mysql:
   
   encrypted columns: name 、ident、mobile
   
   t.mybatis.mapper.UserInfoMapper.insert   : ==>  Preparing: insert into 
user_info (cust_id, unique_id, name, ident, mobile, password, reg_time, 
modify_time, reg_source, reg_app_channel, reg_device_info, status, 
is_mobile_authed, complate_cust_info, time_inst, time_upd, has_checked) values 
(?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, now() , ?, ?) 
   
   ShardingSphere-SQL : SQL: insert into user_info (cust_id, unique_id, 
name_encrypt, 
 ident_encrypt, mobile_encrypt, password, 
 reg_time, modify_time, reg_source, 
 reg_app_channel, reg_device_info, status, 
 is_mobile_authed, complate_cust_info, time_inst, 
 time_upd, has_checked, mobile, ident, name)
   values (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, now(), ?, ?, ?, ?, ?)
   
   @tristaZero  


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:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [incubator-shardingsphere] xiyelife commented on issue #2923: when using EncryptPreparedStatement to savebatch occours error

2019-09-04 Thread GitBox
xiyelife commented on issue #2923: when using EncryptPreparedStatement to 
savebatch occours error
URL: 
https://github.com/apache/incubator-shardingsphere/issues/2923#issuecomment-528167818
 
 
   I have the same problem,only use encryptDataSource by mybatis.
   when mybatis prepare the statement, it will set the queryTimeout ,but the 
preparedStatement does not created at this time, and  the NPE occured!
   
   
![image](https://user-images.githubusercontent.com/8772975/64306815-944c1880-cfc6-11e9-9fad-b9d104cdd240.png)
   
   
![image](https://user-images.githubusercontent.com/8772975/64306727-58b14e80-cfc6-11e9-9006-b0864eeabe54.png)
   
   
![image](https://user-images.githubusercontent.com/8772975/64306664-26075600-cfc6-11e9-96aa-0f269d5bf719.png)
   
   here is my config:
   #user_info.name 加密
   spring.shardingsphere.encrypt.encryptors.name_encryptor.type=aes
   spring.shardingsphere.encrypt.tables.user_info.columns.name.plainColumn=name
   
spring.shardingsphere.encrypt.tables.user_info.columns.name.cipherColumn=name_encrypt
   
spring.shardingsphere.encrypt.tables.user_info.columns.name.encryptor=name_encryptor
   #开启使用密文列:读取对应的密文字段解密自动放到明文字段上
   spring.shardingsphere.props.query.with.cipher.comlum=true
   spring.shardingsphere.props.sql.show=true
   
   mybatis-version:
   org.mybatis.spring.boot:mybatis-spring-boot-starter:1.3.2
   springboot-version:
   1.5.5


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:
us...@infra.apache.org


With regards,
Apache Git Services