ananlittlebaby opened a new issue #9247:
URL: https://github.com/apache/shardingsphere/issues/9247
### Which version of ShardingSphere did you use? shardingsphere-proxy
4.1.1,it also happens at 5.0.0-alpha version.
myApp(jdbc) --> shardingsphere-proxy --> PostgreSQL 12.5, compiled by
Visual C++ build 1914, 64-bit
`<dependency>`
` <groupId>org.postgresql</groupId>`
` <artifactId>postgresql</artifactId>`
` <version>42.2.18</version>`
` </dependency>`
java code
```
1. Connection connection=getConn();
2. Statement stmt=null;
3. connection.setAutoCommit(false);
4. stmt=connection.createStatement();
5. stmt.execute("update adm_tenant set law_name='xxxx' where
tenant_code='XX'");
6. connection.commit();
```
shardingsphere-proxy
server.yaml
```
props:
max.connections.size.per.query: 1
acceptor.size: 16 # The default value is available processors count * 2.
executor.size: 16 # Infinite by default.
proxy.frontend.flush.threshold: 128 # The default value is 128.
proxy.transaction.type: LOCAL
proxy.hint.enabled: true
sql.show: true
```
config-sharding.yaml
```
dataSources:
ds_0:
url:
jdbc:postgresql://127.0.0.1:5432/postgres?serverTimezone=UTC&useSSL=false
username: xxx
password: xxx
connectionTimeoutMilliseconds: 30000
idleTimeoutMilliseconds: 60000
maxLifetimeMilliseconds: 1800000
maxPoolSize: 50
shardingRule:
tables:
t_order:
actualDataNodes: ds_0.XXX_${2016..2100}
tableStrategy:
standard:
shardingColumn: d_date
preciseAlgorithmClassName: xxx
rangeAlgorithmClassName: xxx
bindingTables:
- XXX
defaultDatabaseStrategy:
none:
defaultTableStrategy:
none:
```
### Expected behavior
update success!
### Actual behavior
myApp throw the PSQLException at No5 : stmt.execute("update adm_tenant set
law_name='xxxx' where tenant_code='XX'");
`org.postgresql.util.PSQLException: Expected command status BEGIN, got null
0.
at
org.postgresql.core.v3.QueryExecutorImpl$1.handleCommandStatus(QueryExecutorImpl.java:582)
at
org.postgresql.core.v3.QueryExecutorImpl.interpretCommandStatus(QueryExecutorImpl.java:2598)
at
org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:2233)
at
org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:323)
at org.postgresql.jdbc.PgStatement.executeInternal(PgStatement.java:473)
at org.postgresql.jdbc.PgStatement.execute(PgStatement.java:393)
at
org.postgresql.jdbc.PgStatement.executeWithFlags(PgStatement.java:322)
at
org.postgresql.jdbc.PgStatement.executeCachedSql(PgStatement.java:308)
at
org.postgresql.jdbc.PgStatement.executeWithFlags(PgStatement.java:284)
at org.postgresql.jdbc.PgStatement.execute(PgStatement.java:279)`
**at TestClass.main(TestClass.java:5)**
Shardingsphere-proxy don't print any expcetion log
----------------------------------------------------------------
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]