Hi Community,
Sharding encrypt module exists problem that rewrite sql is incorrect
when sql with in operator contains space and line break. I have written
document about this encrypt problem and my solution to this problem:
https://docs.google.com/document/d/1HjDjmaaEB-_eQOH6C4Cv6NxsrkAuaNFovr-oTUOvPbQ/edit
The issue is sharding+encrypt when sql contains "\n",sql rewrite error
for mybatis.
<https://github.com/apache/incubator-shardingsphere/issues/4037>
There are two pull request for fixing the problem above:
Fixes #4037. IN operator contains space and `\n` `\t` `\r`
<https://github.com/apache/incubator-shardingsphere/pull/4193>
Encrypt statement IN operator contains space and line break
<https://github.com/apache/incubator-shardingsphere/pull/4075>
According to previous discussion, the changes include core module
modification. Based on core module consideration, Zhang Liang provides the
suggestion:
1.Parse start index of In parent
2.Fix SQL conjunction logic
Here takes a discussion about the optimization of IN operator in
encrypt module. Welcome to join this dicussion to solve the problem.
Thanks,
Nicholas