tristaZero commented on issue #7731:
URL: https://github.com/apache/shardingsphere/issues/7731#issuecomment-707490910


   From @lwtdev 's feedback below,
   ```sql
   ShardingProxy(4.1.1)No Sharding
   deleteMultiTable[hasShardingKey:all];         Support:true;  SQL: delete 
customer, customer_email  from customer , customer_email where customer.status 
= 3 and customer.id = 3 and customer_email.id = 3;
   ds_0|delete customer, customer_email  from customer , customer_email where 
customer.status = 3 and customer.id = 3 and customer_email.id = 3|
   
   
   ShardingProxy(5.0.0.RC1)No Sharding
   deleteMultiTable[hasShardingKey:all];         Support:false; SQL: delete 
customer, customer_email  from customer , customer_email where customer.status 
= 3 and customer.id = 3 and customer_email.id = 3;
   java.sql.SQLException: 2Unknown exception: [Cannot support Multiple-Table 
for 
'org.apache.shardingsphere.sql.parser.sql.dialect.statement.mysql.dml.MySQLDeleteStatement@6e5eca13'.]
   
   ShardingProxy(4.1.1)No Sharding
   updateMultiTable[hasShardingKey:all];         Support:true;  SQL: update 
customer, customer_email set customer.party_id = party_id + 1, 
customer_email.status = cusotmer.status where customer.id = 3 and 
customer_email.id = 3;
   ds_0|update customer, customer_email set customer.party_id = party_id + 1, 
customer_email.status = cusotmer.status where customer.id = 3 and 
customer_email.id = 3|
   
   
   ShardingProxy(5.0.0.RC1)No Sharding
   updateMultiTable[hasShardingKey:all];         Support:false; SQL: update 
customer, customer_email set customer.party_id = party_id + 1, 
customer_email.status = cusotmer.status where customer.id = 3 and 
customer_email.id = 3;
   java.sql.SQLException: 2Unknown exception: [Cannot support Multiple-Table 
for 
'org.apache.shardingsphere.sql.parser.sql.dialect.statement.mysql.dml.MySQLUpdateStatement@4f8e14c4'.]
   ```
   There are two improvements for your consideration.
   1. Remove or change the exposed error info
   
`org.apache.shardingsphere.sql.parser.sql.dialect.statement.mysql.dml.MySQLUpdateStatement@4f8e14c4'`
 is supposed to hide from end-users.
   2. Fine-grained checking for `validateMultipleTable`
   When there are a multi-table SQL, maybe we could consider distinguishing the 
tables, like bind-table or broadcast-table, single-table. IMO, some of these 
cases are likely to be executed. BTW, `postValidate()` is another way to handle 
these cases.
   


----------------------------------------------------------------
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:
[email protected]


Reply via email to