xuse opened a new issue, #33349: URL: https://github.com/apache/shardingsphere/issues/33349
## 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? shardingsphere-parser-sql-mysql-5.5.0.jar v5.5.0 ### Which project did you use? ShardingSphere-JDBC or ShardingSphere-Proxy? shardingsphere-parser-sql-mysql-5.5.0.jar ```java @Test public void shardSphereBug() { final SQLParserEngine parser = new SQLParserEngine("mysql", new CacheOption(100, 100)); ParseASTNode node = parser.parse("create table t(c DECIMAL (5,1))", false); String sql=node.getRootNode().accept(new MySQLFormatVisitor()); System.out.println(sql); assertFalse(sql.contains("(5, 1)(5 , 1)")); } ``` ### Expected behavior The unit test should print > CREATE TABLE t ( c DECIMAL(5, 1) BUT actually is > CREATE TABLE t (c DECIMAL(5, 1)(5 , 1)) ### Actual behavior BUT actually is > CREATE TABLE t (c DECIMAL(5, 1)(5 , 1)) ### Reason analyze (If you can) 原因是这个文件 https://github.com/apache/shardingsphere/blob/master/parser/sql/dialect/mysql/src/main/java/org/apache/shardingsphere/sql/parser/mysql/visitor/format/MySQLFormatVisitor.java 第 #636 行,应该是 ```java return formattedSQL.toString(); ``` 但是笔误为 ```java return super.visitPrecision(ctx); ``` 造成访问器访问了两遍! Please fix it ASAP, Thanks. ### Steps to reproduce the behavior, such as: SQL to execute, sharding rule configuration, when exception occur etc. See the unit test case. above. ### Example codes for reproduce this issue (such as a github link). See the unit test case. above. -- 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. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
