Merge pull request #2292 from wenyh1/DBLE0REQ/627-4

fix: Miss bug
This commit is contained in:
Collapsar
2020-11-19 14:00:57 +08:00
committed by GitHub

View File

@@ -186,10 +186,10 @@ public final class SchemaUtil {
private static boolean isNoSharding(ShardingService service, SQLExprTableSource table, SQLStatement stmt, SQLStatement childSelectStmt, String contextSchema, Set<String> schemas, StringPtr shardingNode)
throws SQLException {
SchemaInfo schemaInfo = SchemaUtil.getSchemaInfo(service.getUser(), contextSchema, table);
String currentSchema = schemaInfo.schema.toUpperCase();
if (schemaInfo.dual) {
return true;
}
String currentSchema = schemaInfo.schema.toUpperCase();
if (SchemaUtil.MYSQL_SYS_SCHEMA.contains(currentSchema)) {
schemas.add(currentSchema);
return false;