AdelaHong opened a new issue #12427:
URL: https://github.com/apache/shardingsphere/issues/12427
shardingshpere version number:5.0.0-RC1-SNAPSHOT
query.with.cipher.column: flase
`Collection<EncryptColumnRuleConfiguration> columns = new LinkedList<>();
EncryptColumnRuleConfiguration columnRuleConfiguration = new
EncryptColumnRuleConfiguration("BANKNO","bankno",null,"DELETE_USER_NAME","sm4");
columns.add(columnRuleConfiguration);
EncryptTableRuleConfiguration result = new
EncryptTableRuleConfiguration("tf_b_bank_user", columns);`
When using plaintext query, the following error occurred:Cause:
com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Unknown column
'tt.DELETE_USER_NAME' in 'field list'
Print sql found that all fields are replaced with bankno instead of the
table for the encryption strategy
`2021-09-14 17:58:15.296 [DubboServerHandler-192.168.88.101:20880-thread-6]
INFO ShardingSphere-SQL - Logic SQL: select
t.ID,t.BANKNO,tt.bankno banknono
from tf_b_bank_user t
join tf_b_bank_info tt on tt.id=t.bank_id
where t.CUSTOMER_ID = ? and t.bankno = ? and t.status = 1
2021-09-14 17:58:15.296 [DubboServerHandler-192.168.88.101:20880-thread-6]
INFO ShardingSphere-SQL - SQLStatement:
MySQLSelectStatement(limit=Optional.empty, lock=Optional.empty,
window=Optional.empty)
2021-09-14 17:58:15.296 [DubboServerHandler-192.168.88.101:20880-thread-6]
INFO ShardingSphere-SQL - Actual SQL: ds_0 ::: select
t.ID,t.DELETE_USER_NAME AS BANKNO,tt.DELETE_USER_NAME AS banknono
from tf_b_bank_user t
join tf_b_bank_info tt on tt.id=t.bank_id
where t.CUSTOMER_ID = ? and t.DELETE_USER_NAME = ? and t.status = 1
::: [1370285443137175555, 123456789]`
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]