TiDB not support SessionStateChange
- Dominant language
- Go
- Stars
- 40.5k
- Forks
- 6.2k
- PR merge metrics
- PR metrics pending
Description
## Bug Report
When JDBC property `trackSessionState=true`. It should be get session state changes by Listener.
### 1. Minimal reproduce step (Required)
1. Install TiDB
2. Install MySQL
3. Clone this [code](https://github.com/Icemap/tidb-java-gitpod/tree/session-state-change-listener)
4. Point [JDBC URL](https://github.com/Icemap/tidb-java-gitpod/blob/session-state-change-listener/src/main/java/com/pingcap/App.java#L20) to TiDB host
5. Run `mvn clean package && java -jar target/tidb-java-gitpod-0.0.1-jar-with-dependencies.jar`
6. Point `JDBC URL` to MySQL host
7. Run `mvn clean package && java -jar target/tidb-java-gitpod-0.0.1-jar-with-dependencies.jar`
8. Outputs are not same
### 2. What did you expect to see? (Required)
MySQL output:
```
=== Track Session State ===
State change effect
State change type is SESSION_TRACK_SYSTEM_VARIABLES
State change type is SESSION_TRACK_SYSTEM_VARIABLES
State change type is SESSION_TRACK_SYSTEM_VARIABLES
```
### 3. What did you see instead (Required)
TiDB output:
```
=== Track Session State ===
State change effect
```
### 4. What is your TiDB version? (Required)
```sql
+------------------------------------------+
| VERSION() |
+------------------------------------------+
| 5.7.25-TiDB-v5.5.0-alpha-1165-g06737ecd2 |
+------------------------------------------+
```
Contributor guide
Assessment
This issue has not been assessed yet.