JiekerTime opened a new issue #11103:
URL: https://github.com/apache/shardingsphere/issues/11103


   ### Which version of ShardingSphere did you use?
   5.0.0-RC1-SNAPSHOT
   
   ### Which project did you use? ShardingSphere-JDBC or ShardingSphere-Proxy?
   Both
   
   ### Expected behavior
   When I execute ‘ALTER TABLE t_user_details CHANGE number number_new 
VARCHAR(50)’, it is able to finish the column name change.
   
   ### Actual behavior
   `[ERROR] 2021-07-02 04:57:46.341 
[ShardingSphere-ScenarioExecutorPool-jdbc-dbtbl_with_readwrite_splitting_and_encrypt-H2-0]
 o.a.s.t.i.junit.watcher.ITWatcher - Error case: assertExecuteUpdate[jdbc: 
dbtbl_with_readwrite_splitting_and_encrypt -> H2 -> Literal -> ALTER TABLE 
t_user_details CHANGE number number_new VARCHAR(50)], message: 
org.h2.jdbc.JdbcSQLException: Column "number" not found; SQL statement:
   ALTER TABLE t_user_details_0 CHANGE number number_new VARCHAR(50) 
[42122-196]`
   
   ### Reason analyze (If you can)
   
![image](https://user-images.githubusercontent.com/76552510/124222997-6dfd5280-db35-11eb-8bcd-3e54981e5586.png)
   As shown, it will look for encrypt rules by the modified column names, thus 
resulting in no matching encrypt  rules being found.
   
![image](https://user-images.githubusercontent.com/76552510/124223174-cdf3f900-db35-11eb-91e2-b5d39a272a0a.png)
   
![image](https://user-images.githubusercontent.com/76552510/124223214-e06e3280-db35-11eb-8621-75c58ddc6cd9.png)
   
   ### Steps to reproduce the behavior, such as: SQL to execute, sharding rule 
configuration, when exception occur etc.
   You can reproduce the issue from the integration test of the DDL, the 
corresponding statements are marked.
   
   
   # By the way
   I will try to fix this issue in the next PR if I can.


-- 
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]


Reply via email to