apache / apache/shardingsphere
Failed to execute `SET TRANSACTION ISOLATION` in postgresql transaction
- Dominant language
- Java
- Stars
- 20.8k
- Forks
- 6.9k
- Avg merge
- 11h 35m
- Merged PRs (30d)
- 326
Description
## Bug Report
### Which version of ShardingSphere did you use?
Master.
### Which project did you use? ShardingSphere-JDBC or ShardingSphere-Proxy?
Proxy.
### Expected behavior
Execute sql successfully.
### Actual behavior
Failed to execute sql in transaction
### Reason analyze (If you can)
### Steps to reproduce the behavior, such as: SQL to execute, sharding rule configuration, when exception occur etc.
Execute in ShardingSphere-Proxy
```sql
begin;
SET TRANSACTION ISOLATION LEVEL REPEATABLE READ, READ ONLY;
-- failed
```
Execute in postgresql
```sql
postgres=# begin;
BEGIN
postgres=*# SET TRANSACTION ISOLATION LEVEL REPEATABLE READ, READ ONLY;
SET
postgres=*# rollback;
ROLLBACK
postgres=# SET TRANSACTION ISOLATION LEVEL REPEATABLE READ, READ ONLY;
WARNING: SET TRANSACTION can only be used in transaction blocks
SET
```
### Example codes for reproduce this issue (such as a github link).
Contributor guide
Assessment
This issue has not been assessed yet.