sandynz opened a new issue #7421:
URL: https://github.com/apache/shardingsphere/issues/7421
## Bug Report
### Which version of ShardingSphere did you use?
5.0.0-RC1-SNAPSHOT, commit: 6c91b6eb3fce8532eed0a06eceb839fa4554f5a9
### Which project did you use? ShardingSphere-JDBC or ShardingSphere-Proxy?
ShardingSphere-Proxy
### Expected behavior
JDBC connection could be created
### Actual behavior
Exception thrown:
```
Caused by: org.postgresql.util.PSQLException: Unsupported SQL of `SET
extra_float_digits = 3`
at
org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2532)
at
org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:2267)
at
org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:312)
at org.postgresql.core.SetupQueryRunner.run(SetupQueryRunner.java:53)
at
org.postgresql.core.v3.ConnectionFactoryImpl.runInitialQueries(ConnectionFactoryImpl.java:742)
at
org.postgresql.core.v3.ConnectionFactoryImpl.openConnectionImpl(ConnectionFactoryImpl.java:270)
at
org.postgresql.core.ConnectionFactory.openConnection(ConnectionFactory.java:49)
at org.postgresql.jdbc.PgConnection.<init>(PgConnection.java:217)
at org.postgresql.Driver.makeConnection(Driver.java:458)
at org.postgresql.Driver.connect(Driver.java:260)
at
com.zaxxer.hikari.util.DriverDataSource.getConnection(DriverDataSource.java:138)
at com.zaxxer.hikari.pool.PoolBase.newConnection(PoolBase.java:358)
at com.zaxxer.hikari.pool.PoolBase.newPoolEntry(PoolBase.java:206)
at
com.zaxxer.hikari.pool.HikariPool.createPoolEntry(HikariPool.java:477)
at com.zaxxer.hikari.pool.HikariPool.checkFailFast(HikariPool.java:560)
... 4 more
```
### Reason analyze (If you can)
Protocol output:
```
2020-09-12 15:22:46 [TRACE] [main] [o.p.c.v.QueryExecutorImpl][1509] FE=>
Parse(stmt=null,query="SET extra_float_digits = 3",oids={})
2020-09-12 15:22:46 [TRACE] [main] [o.p.c.v.QueryExecutorImpl][1561] FE=>
Bind(stmt=null,portal=null)
2020-09-12 15:22:46 [TRACE] [main] [o.p.c.v.QueryExecutorImpl][1744] FE=>
Execute(portal=null,limit=1)
2020-09-12 15:22:46 [TRACE] [main] [o.p.c.v.QueryExecutorImpl][1454] FE=>
Sync
2020-09-12 15:22:47 [TRACE] [main] [o.p.c.v.QueryExecutorImpl][2529] <=BE
ErrorMessage(Unsupported SQL of `SET extra_float_digits = 3`)
2020-09-12 15:22:47 [TRACE] [main] [o.p.c.v.QueryExecutorImpl][2587] <=BE
ReadyForQuery(I)
```
ShardingSphere-Proxy output:
```
line 1:25 no viable alternative at input '3'
line 1:25 no viable alternative at input '3'
line 1:0 no viable alternative at input 'SET'
line 1:0 mismatched input 'SET' expecting CREATE
```
### Steps to reproduce the behavior, such as: SQL to execute, sharding rule
configuration, when exception occur etc.
Open a JDBC connection.
Code snippet:
```
public static DataSource getProxyDataSource() {
HikariConfig config = new HikariConfig();
config.setDriverClassName(Driver.class.getName());
config.setMaximumPoolSize(5);
config.setJdbcUrl("jdbc:postgresql://localhost:3307/sharding_db");
config.setUsername("root");
config.setPassword("root");
// for debug
config.setConnectionTimeout(TimeUnit.SECONDS.toMillis(600));
return new HikariDataSource(config);
}
```
### 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]