mycat1.6.7.3全局表Join跨库表,提示找不到表
whf191 opened this issue · comments
比如这样一条语句
select * from sys_user_info info left join xx.xx_team team on team.id = info.team_id;
报错如下:
java.sql.SQLNonTransientException: can't find table define in schema XX_TEAM schema:db_xx_xx
at io.mycat.route.util.RouterUtil.tryRouteForTables(RouterUtil.java:1236) ~[Mycat-server-1.6.7.3-release.jar:?]
at io.mycat.route.parser.druid.impl.DruidSelectParser.tryRoute(DruidSelectParser.java:511) ~[Mycat-server-1.6.7.3-release.jar:?]
at io.mycat.route.parser.druid.impl.DruidSelectParser.changeSql(DruidSelectParser.java:356) ~[Mycat-server-1.6.7.3-release.jar:?]
at io.mycat.route.impl.DruidMycatRouteStrategy.directRoute(DruidMycatRouteStrategy.java:386) ~[Mycat-server-1.6.7.3-release.jar:?]
at io.mycat.route.impl.DruidMycatRouteStrategy.routeNormalSqlWithAST(DruidMycatRouteStrategy.java:198) ~[Mycat-server-1.6.7.3-release.jar:?]
at io.mycat.route.impl.AbstractRouteStrategy.route(AbstractRouteStrategy.java:83) ~[Mycat-server-1.6.7.3-release.jar:?]
at io.mycat.route.RouteService.route(RouteService.java:139) ~[Mycat-server-1.6.7.3-release.jar:?]
at io.mycat.server.ServerConnection.routeEndExecuteSQL(ServerConnection.java:291) ~[Mycat-server-1.6.7.3-release.jar:?]
at io.mycat.server.ServerConnection.execute(ServerConnection.java:237) ~[Mycat-server-1.6.7.3-release.jar:?]
at io.mycat.server.handler.SelectHandler.handle(SelectHandler.java:105) ~[Mycat-server-1.6.7.3-release.jar:?]
at io.mycat.server.ServerQueryHandler.query(ServerQueryHandler.java:79) ~[Mycat-server-1.6.7.3-release.jar:?]
at io.mycat.net.FrontendConnection.query(FrontendConnection.java:375) ~[Mycat-server-1.6.7.3-release.jar:?]
at io.mycat.net.FrontendConnection.query(FrontendConnection.java:395) ~[Mycat-server-1.6.7.3-release.jar:?]
at io.mycat.net.handler.FrontendCommandHandler.handle(FrontendCommandHandler.java:71) ~[Mycat-server-1.6.7.3-release.jar:?]
at io.mycat.net.FrontendConnection.rawHandle(FrontendConnection.java:551) ~[Mycat-server-1.6.7.3-release.jar:?]
at io.mycat.net.FrontendConnection.handle(FrontendConnection.java:533) ~[Mycat-server-1.6.7.3-release.jar:?]
at io.mycat.net.AbstractConnection.onReadData(AbstractConnection.java:327) ~[Mycat-server-1.6.7.3-release.jar:?]
at io.mycat.net.NIOSocketWR.asynRead(NIOSocketWR.java:216) ~[Mycat-server-1.6.7.3-release.jar:?]
at io.mycat.net.AbstractConnection.asynRead(AbstractConnection.java:279) ~[Mycat-server-1.6.7.3-release.jar:?]
at io.mycat.net.NIOReactor$RW.run(NIOReactor.java:113) ~[Mycat-server-1.6.7.3-release.jar:?]
at java.lang.Thread.run(Thread.java:745) [?:1.8.0_77]
表名字解析错误