larrychen8276 opened a new issue #9793: URL: https://github.com/apache/shardingsphere/issues/9793
## Bug Report **For English only**, other languages will not accept. Before report a bug, make sure you have: - Searched open and closed [GitHub issues](https://github.com/apache/shardingsphere/issues). - Read documentation: [ShardingSphere Doc](https://shardingsphere.apache.org/document/current/en/overview). Please pay attention on issues you submitted, because we maybe need more details. If no response anymore and we cannot reproduce it on current information, we will **close it**. Please answer these questions before submitting your issue. Thanks! ### Which version of ShardingSphere did you use? - 4.1.1 ### Which project did you use? ShardingSphere-JDBC or ShardingSphere-Proxy? - ShardingSphere-JDBC - ### Expected behavior ``` (select t.id, t.category_id, t.category_name from ppt_p_contents t where t.type = 1 and t.show_in_home = 3 order by t.create_time desc limit 8 ) union all (select t.id, t.category_id, t.category_name from ppt_p_contents t where t.type = 1 and t.show_in_home = 4 order by t.create_time desc limit 8 ) union all (select t.id, t.category_id, t.category_name from ppt_p_contents t where t.type = 1 and t.show_in_home = 5 order by t.create_time desc limit 8 ) ``` ### Actual behavior ``` line 1:0 no viable alternative at input '(' line 1:0 extraneous input '(' expecting {SELECT, INSERT, UPDATE, DELETE, CREATE, ALTER, DROP, TRUNCATE, GRANT, REVOKE, SET, WITH, DESC, BEGIN, COMMIT, ROLLBACK, SAVEPOINT, CALL, USE, DESCRIBE, SHOW, REPLACE, START, CHANGE, RENAME, REPAIR, STOP} 3ζ 24, 2021 8:53:37 δΈε org.apache.catalina.core.ApplicationDispatcher invoke SEVERE: Servlet.service() for servlet [springMvc] threw exception org.apache.shardingsphere.sql.parser.exception.SQLParsingException: Unsupported SQL of `(select t.id, t.category_id, t.category_name, t.tags_id, t.tags_name, t.title, t.content, t.download_count, t.show_in_home, t.user_id, t.pic, t.detail_pic, t.type, t.ppt_folder_name, t.ppt_file_name, t.ppt_file_size, t.ppt_amount, t.table_name, t.create_time from ppt_p_contents t where t.type = 1 and t.show_in_home = 1 order by t.create_time desc limit 8 ) union all (select t.id, t.category_id, t.category_name, t.tags_id, t.tags_name, t.title, t.content, t.download_count, t.show_in_home, t.user_id, t.pic, t.detail_pic, t.type, t.ppt_folder_name, t.ppt_file_name, t.ppt_file_size, t.ppt_amount, t.table_name, t.create_time from ppt_p_contents t where t.type = 1 and t.show_in_home = 2 order by t.create_time desc limit 8 ) union all (select t.id, t.category_id, t.category_name, t.tags_id, t.tags_name, t.title, t.content, t.download_count, t.show_in_home, t.user_id, t.pic, t.detail_pic, t.type, t.ppt_folder_name, t.ppt_file_name, t.ppt_file_size, t.ppt_amount, t.table_name, t.create_time from ppt_p_contents t where t.type = 1 and t.show_in_home = 3 order by t.create_time desc limit 8 ) union all (select t.id, t.category_id, t.category_name, t.tags_id, t.tags_name, t.title, t.content, t.download_count, t.show_in_home, t.user_id, t.pic, t.detail_pic, t.type, t.ppt_folder_name, t.ppt_file_name, t.ppt_file_size, t.ppt_amount, t.table_name, t.create_time from ppt_p_contents t where t.type = 1 and t.show_in_home = 4 order by t.create_time desc limit 8 ) union all (select t.id, t.category_id, t.category_name, t.tags_id, t.tags_name, t.title, t.content, t.download_count, t.show_in_home, t.user_id, t.pic, t.detail_pic, t.type, t.ppt_folder_name, t.ppt_file_name, t.ppt_file_size, t.ppt_amount, t.table_name, t.create_time from ppt_p_contents t where t.type = 1 and t.show_in_home = 5 order by t.create_time desc limit 8 ) union all (select t.id, t.category_id, t.category_name , t.tags_id, t.tags_name, t.title, t.content, t.download_count, t.show_in_home, t.user_id, t.pic, t.detail_pic, t.type, t.ppt_folder_name, t.ppt_file_name, t.ppt_file_size, t.ppt_amount, t.table_name, t.create_time from ppt_p_contents t where t.type = 1 and t.show_in_home = 6 order by t.create_time desc limit 8 ) union all (select t.id, t.category_id, t.category_name, t.tags_id, t.tags_name, t.title, t.content, t.download_count, t.show_in_home, t.user_id, t.pic, t.detail_pic, t.type, t.ppt_folder_name, t.ppt_file_name, t.ppt_file_size, t.ppt_amount, t.table_name, t.create_time from ppt_p_contents_shouchaobao t where t.type = 1 and t.show_in_home = 7 order by t.create_time desc limit 8 ) ` at org.apache.shardingsphere.sql.parser.core.parser.SQLParserExecutor.execute(SQLParserExecutor.java:49) at org.apache.shardingsphere.sql.parser.SQLParserEngine.parse0(SQLParserEngine.java:79) at org.apache.shardingsphere.sql.parser.SQLParserEngine.parse(SQLParserEngine.java:61) at org.apache.shardingsphere.underlying.route.DataNodeRouter.createRouteContext(DataNodeRouter.java:97) at org.apache.shardingsphere.underlying.route.DataNodeRouter.executeRoute(DataNodeRouter.java:89) at org.apache.shardingsphere.underlying.route.DataNodeRouter.route(DataNodeRouter.java:76) at org.apache.shardingsphere.underlying.pluggble.prepare.SimpleQueryPrepareEngine.route(SimpleQueryPrepareEngine.java:54) at org.apache.shardingsphere.underlying.pluggble.prepare.BasePrepareEngine.executeRoute(BasePrepareEngine.java:96) at org.apache.shardingsphere.underlying.pluggble.prepare.BasePrepareEngine.prepare(BasePrepareEngine.java:83) at org.apache.shardingsphere.shardingjdbc.jdbc.core.statement.MasterSlaveStatement.executeQuery(MasterSlaveStatement.java:88) at org.springframework.jdbc.core.JdbcTemplate$1QueryStatementCallback.doInStatement(JdbcTemplate.java:452) ``` ### Reason analyze (If you can) ### Steps to reproduce the behavior, such as: SQL to execute, sharding rule configuration, when exception occur etc. ### 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]
