shardingsphere
shardingsphere copied to clipboard
`DROP TABLE IF EXISTS` occur `NoSuchTableException`
Bug Report
Which version of ShardingSphere did you use?
5.0.0-RC1(master)
Which project did you use? ShardingSphere-JDBC or ShardingSphere-Proxy?
ShardingSphere-JDBC
Behavior
execute sql DROP TABLE IF EXISTS t1
Exception
org.apache.shardingsphere.sharding.route.engine.exception.NoSuchTableException: Table 't1' doesn't exist
at org.apache.shardingsphere.sharding.route.engine.validator.ddl.ShardingDDLStatementValidator.validateTableExist(ShardingDDLStatementValidator.java:60)
at org.apache.shardingsphere.sharding.route.engine.validator.ddl.impl.ShardingDropTableStatementValidator.preValidate(ShardingDropTableStatementValidator.java:47)
at org.apache.shardingsphere.sharding.route.engine.ShardingSQLRouter.lambda$createRouteContext$0(ShardingSQLRouter.java:55)
at java.util.Optional.ifPresent(Optional.java:159)
at org.apache.shardingsphere.sharding.route.engine.ShardingSQLRouter.createRouteContext(ShardingSQLRouter.java:55)
at org.apache.shardingsphere.sharding.route.engine.ShardingSQLRouter.createRouteContext(ShardingSQLRouter.java:47)
at org.apache.shardingsphere.infra.route.engine.impl.PartialSQLRouteExecutor.route(PartialSQLRouteExecutor.java:59)
at org.apache.shardingsphere.infra.route.engine.SQLRouteEngine.route(SQLRouteEngine.java:57)
at org.apache.shardingsphere.infra.context.kernel.KernelProcessor.route(KernelProcessor.java:63)
at org.apache.shardingsphere.infra.context.kernel.KernelProcessor.generateExecutionContext(KernelProcessor.java:51)
at org.apache.shardingsphere.driver.jdbc.core.statement.ShardingSphereStatement.createExecutionContext(ShardingSphereStatement.java:392)
at org.apache.shardingsphere.driver.jdbc.core.statement.ShardingSphereStatement.execute(ShardingSphereStatement.java:296)
@Lucas-307 How can I reproduce this error? Can you provide the sharding configuration? 😀
@strongduanmu execute this sql is enought.