pingcap / pingcap/tidb

Commit statement not effect when `useLocalTransactionState` JDBC variable turns on

Open
#38,115 0 comments 0 reactions 1 assignee Claimed by @leobeijing2000 View on GitHub
affects-6.1 affects-6.4 affects-6.5 affects-6.6 affects-7.0 affects-7.1 affects-7.5 component/jdbc may-affects-4.0 may-affects-5.0 may-affects-5.1 may-affects-5.2 may-affects-5.3 may-affects-5.4 may-affects-6.0 may-affects-6.2 may-affects-6.3 severity/major sig/sql-infra type/bug
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

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.