Commit statement not effect when `useLocalTransactionState` JDBC variable turns on
- Dominant language
- Go
- Stars
- 40.5k
- Forks
- 6.2k
- PR merge metrics
- PR metrics pending
Description
## Bug Report
Commit statement not effect when `useLocalTransactionState` JDBC variable turns on
### 1. Minimal reproduce step (Required)
1. Install TiDB
2. Clone this [code](https://github.com/Icemap/tidb-java-gitpod/tree/reproduction-local-transaction-state-txn-error)
4. Point [JDBC URL](https://github.com/Icemap/tidb-java-gitpod/blob/reproduction-local-transaction-state-txn-error/src/main/java/com/pingcap/App.java#L19) to TiDB host
5. Run `mvn clean package && java -jar target/tidb-java-gitpod-0.0.1-jar-with-dependencies.jar`
6. Check the data of `testBug89948` table.
### 2. What did you expect to see? (Required)
Has 10 rows of data in the table.
### 3. What did you see instead (Required)
Empty table.
### 4. What is your TiDB version? (Required)
Result of `TiDB_VERSION()`:
```sql
Release Version: v6.1.1
Edition: Community
Git Commit Hash: 5263a0abda61f102122735049fd0dfadc7b7f8b2
Git Branch: heads/refs/tags/v6.1.1
UTC Build Time: 2022-08-25 10:43:14
GoVersion: go1.18.5
Race Enabled: false
TiKV Min Version: v3.0.0-60965b006877ca7234adaced7890d7b029ed1306
Check Table Before Drop: false
```
Contributor guide
Assessment
This issue has not been assessed yet.