think-gem opened a new issue #10827:
URL: https://github.com/apache/shardingsphere/issues/10827


   ## Bug Report
   
   Use readwrite-splitting report:  union select is not supported yet.
   
   ### Which version of ShardingSphere did you use?
   
   5.0.0-bata
   
   ### Which project did you use? ShardingSphere-JDBC or ShardingSphere-Proxy?
   
   ShardingSphere-JDBC
   
   ### Expected behavior
   
   1. I know I can fix this by specifying a different data source, but I expect
   2. Can configure parameters, specific statements, and use mandatory master 
database queries
   3. If sql parse error, print the warning log, and force the primary database 
query
   
   ### Actual behavior
   
   Caused by: java.lang.IllegalStateException: union select is not supported 
yet.
   
   ### Reason analyze (If you can)
   
   ### Steps to reproduce the behavior, such as: SQL to execute, sharding rule 
configuration, when exception occur etc.
   
   ```
   Caused by: java.lang.IllegalStateException: union select is not supported 
yet.
        at 
org.apache.shardingsphere.sql.parser.mysql.visitor.statement.impl.MySQLStatementSQLVisitor.visitQueryExpressionBody(MySQLStatementSQLVisitor.java:594)
        at 
org.apache.shardingsphere.sql.parser.mysql.visitor.statement.impl.MySQLStatementSQLVisitor.visitQueryExpressionBody(MySQLStatementSQLVisitor.java:198)
        at 
org.apache.shardingsphere.sql.parser.autogen.MySQLStatementParser$QueryExpressionBodyContext.accept(MySQLStatementParser.java:4373)
        at 
org.antlr.v4.runtime.tree.AbstractParseTreeVisitor.visit(AbstractParseTreeVisitor.java:18)
        at 
org.apache.shardingsphere.sql.parser.mysql.visitor.statement.impl.MySQLStatementSQLVisitor.visitQueryExpression(MySQLStatementSQLVisitor.java:564)
        at 
org.apache.shardingsphere.sql.parser.mysql.visitor.statement.impl.MySQLStatementSQLVisitor.visitQueryExpression(MySQLStatementSQLVisitor.java:198)
        at 
org.apache.shardingsphere.sql.parser.autogen.MySQLStatementParser$QueryExpressionContext.accept(MySQLStatementParser.java:4279)
        at 
org.antlr.v4.runtime.tree.AbstractParseTreeVisitor.visit(AbstractParseTreeVisitor.java:18)
        at 
org.apache.shardingsphere.sql.parser.mysql.visitor.statement.impl.MySQLStatementSQLVisitor.visitQueryExpressionParens(MySQLStatementSQLVisitor.java:541)
        at 
org.apache.shardingsphere.sql.parser.mysql.visitor.statement.impl.MySQLStatementSQLVisitor.visitQueryExpressionParens(MySQLStatementSQLVisitor.java:198)
        at 
org.apache.shardingsphere.sql.parser.autogen.MySQLStatementParser$QueryExpressionParensContext.accept(MySQLStatementParser.java:4530)
        at 
org.antlr.v4.runtime.tree.AbstractParseTreeVisitor.visit(AbstractParseTreeVisitor.java:18)
        at 
org.apache.shardingsphere.sql.parser.mysql.visitor.statement.impl.MySQLStatementSQLVisitor.visitSubquery(MySQLStatementSQLVisitor.java:533)
        at 
org.apache.shardingsphere.sql.parser.mysql.visitor.statement.impl.MySQLStatementSQLVisitor.visitSubquery(MySQLStatementSQLVisitor.java:198)
        at 
org.apache.shardingsphere.sql.parser.autogen.MySQLStatementParser$SubqueryContext.accept(MySQLStatementParser.java:9515)
        at 
org.antlr.v4.runtime.tree.AbstractParseTreeVisitor.visit(AbstractParseTreeVisitor.java:18)
        at 
org.apache.shardingsphere.sql.parser.mysql.visitor.statement.impl.MySQLStatementSQLVisitor.visitTableFactor(MySQLStatementSQLVisitor.java:1326)
        at 
org.apache.shardingsphere.sql.parser.mysql.visitor.statement.impl.MySQLStatementSQLVisitor.visitTableFactor(MySQLStatementSQLVisitor.java:198)
        at 
org.apache.shardingsphere.sql.parser.autogen.MySQLStatementParser$TableFactorContext.accept(MySQLStatementParser.java:8287)
        at 
org.antlr.v4.runtime.tree.AbstractParseTreeVisitor.visit(AbstractParseTreeVisitor.java:18)
        at 
org.apache.shardingsphere.sql.parser.mysql.visitor.statement.impl.MySQLStatementSQLVisitor.visitTableReference(MySQLStatementSQLVisitor.java:1315)
        at 
org.apache.shardingsphere.sql.parser.mysql.visitor.statement.impl.MySQLStatementSQLVisitor.visitTableReference(MySQLStatementSQLVisitor.java:198)
        at 
org.apache.shardingsphere.sql.parser.autogen.MySQLStatementParser$TableReferenceContext.accept(MySQLStatementParser.java:7737)
        at 
org.antlr.v4.runtime.tree.AbstractParseTreeVisitor.visit(AbstractParseTreeVisitor.java:18)
        at 
org.apache.shardingsphere.sql.parser.mysql.visitor.statement.impl.MySQLStatementSQLVisitor.visitTableReferences(MySQLStatementSQLVisitor.java:1281)
        at 
org.apache.shardingsphere.sql.parser.mysql.visitor.statement.impl.MySQLStatementSQLVisitor.visitTableReferences(MySQLStatementSQLVisitor.java:198)
        at 
org.apache.shardingsphere.sql.parser.autogen.MySQLStatementParser$TableReferencesContext.accept(MySQLStatementParser.java:7613)
        at 
org.antlr.v4.runtime.tree.AbstractParseTreeVisitor.visit(AbstractParseTreeVisitor.java:18)
        at 
org.apache.shardingsphere.sql.parser.mysql.visitor.statement.impl.MySQLStatementSQLVisitor.visitQuerySpecification(MySQLStatementSQLVisitor.java:605)
        at 
org.apache.shardingsphere.sql.parser.mysql.visitor.statement.impl.MySQLStatementSQLVisitor.visitQuerySpecification(MySQLStatementSQLVisitor.java:198)
        at 
org.apache.shardingsphere.sql.parser.autogen.MySQLStatementParser$QuerySpecificationContext.accept(MySQLStatementParser.java:4684)
        at 
org.antlr.v4.runtime.tree.AbstractParseTreeVisitor.visitChildren(AbstractParseTreeVisitor.java:46)
        at 
org.apache.shardingsphere.sql.parser.autogen.MySQLStatementBaseVisitor.visitQueryPrimary(MySQLStatementBaseVisitor.java:237)
        at 
org.apache.shardingsphere.sql.parser.autogen.MySQLStatementParser$QueryPrimaryContext.accept(MySQLStatementParser.java:4601)
        at 
org.antlr.v4.runtime.tree.AbstractParseTreeVisitor.visit(AbstractParseTreeVisitor.java:18)
        at 
org.apache.shardingsphere.sql.parser.mysql.visitor.statement.impl.MySQLStatementSQLVisitor.visitQueryExpressionBody(MySQLStatementSQLVisitor.java:592)
        at 
org.apache.shardingsphere.sql.parser.mysql.visitor.statement.impl.MySQLStatementSQLVisitor.visitQueryExpressionBody(MySQLStatementSQLVisitor.java:198)
        at 
org.apache.shardingsphere.sql.parser.autogen.MySQLStatementParser$QueryExpressionBodyContext.accept(MySQLStatementParser.java:4373)
        at 
org.antlr.v4.runtime.tree.AbstractParseTreeVisitor.visit(AbstractParseTreeVisitor.java:18)
        at 
org.apache.shardingsphere.sql.parser.mysql.visitor.statement.impl.MySQLStatementSQLVisitor.visitQueryExpression(MySQLStatementSQLVisitor.java:564)
        at 
org.apache.shardingsphere.sql.parser.mysql.visitor.statement.impl.MySQLStatementSQLVisitor.visitQueryExpression(MySQLStatementSQLVisitor.java:198)
        at 
org.apache.shardingsphere.sql.parser.autogen.MySQLStatementParser$QueryExpressionContext.accept(MySQLStatementParser.java:4279)
        at 
org.antlr.v4.runtime.tree.AbstractParseTreeVisitor.visit(AbstractParseTreeVisitor.java:18)
        at 
org.apache.shardingsphere.sql.parser.mysql.visitor.statement.impl.MySQLStatementSQLVisitor.visitSelect(MySQLStatementSQLVisitor.java:1140)
        at 
org.apache.shardingsphere.sql.parser.mysql.visitor.statement.impl.MySQLStatementSQLVisitor.visitSelect(MySQLStatementSQLVisitor.java:198)
        at 
org.apache.shardingsphere.sql.parser.autogen.MySQLStatementParser$SelectContext.accept(MySQLStatementParser.java:4112)
        at 
org.apache.shardingsphere.sql.parser.api.SQLVisitorEngine.visit(SQLVisitorEngine.java:49)
        at 
org.apache.shardingsphere.infra.parser.sql.SQLStatementParserExecutor.parse(SQLStatementParserExecutor.java:47)
        at 
org.apache.shardingsphere.infra.parser.cache.SQLStatementCacheLoader.load(SQLStatementCacheLoader.java:40)
        at 
org.apache.shardingsphere.infra.parser.cache.SQLStatementCacheLoader.load(SQLStatementCacheLoader.java:29)
        at 
com.google.common.cache.LocalCache$LoadingValueReference.loadFuture(LocalCache.java:3529)
        at 
com.google.common.cache.LocalCache$Segment.loadSync(LocalCache.java:2278)
        at 
com.google.common.cache.LocalCache$Segment.lockedGetOrLoad(LocalCache.java:2155)
        at com.google.common.cache.LocalCache$Segment.get(LocalCache.java:2045)
        ... 167 common frames omitted
   ```
   
   ### Example codes for reproduce this issue (such as a github link).
   


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