tristaZero edited a comment on issue #7731:
URL: https://github.com/apache/shardingsphere/issues/7731#issuecomment-706967050


   ### How to reproduce this bug
   - Create a single table `customer` in any database.
   - Start ShardingProxy
   - Execute the following SQLs
   
   ```sql
   mysql> show tables;
   +--------------------------------+
   | Tables_in_spsqltest_nosharding |
   +--------------------------------+
   | customer                       |
   | customer_email                 |
   | full_table                     |
   +--------------------------------+
   3 rows in set (0.01 sec)
   
   mysql> select * from customer;
   Empty set (0.01 sec)
   
   mysql> drop table customer;
   ERROR 1235 (42000): This version of ShardingProxy doesn't yet support this 
SQL. 'Cannot find table rule with logic table: 'customer''
   ```
   ### Why does it happen
   - There is no branch to handle `non-sharding` table at LINE 75 in 
`ShardingRouteEngineFactory`.
   
   ### How to fix it
   - If it is DDL SQL for  a `non-sharding` table, return 
`ShardingUnconfiguredTablesRoutingEngine`
   - If it is DDL SQL for `sharding` table, stay the original returned value
   - `getDALRoutingEngine()` of `ShardingRouteEngineFactory` will give you a 
good example
   


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