yanghao888 commented on issue #18008:
URL:
https://github.com/apache/shardingsphere/issues/18008#issuecomment-1144541061
I also had the same problem. The version I am using is as follows:
```
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>2.6.7</version>
<relativePath/> <!-- lookup parent from repository -->
</parent>
```
```
<dependency>
<groupId>org.apache.shardingsphere</groupId>
<artifactId>shardingsphere-jdbc-core-spring-boot-starter</artifactId>
<version>5.1.1</version>
</dependency>
<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
<version>8.0.28</version>
<scope>runtime</scope>
</dependency>
```
Through the debug mysql driver source code, it is found that this is related
to a useLocalSessionState parameter. I noticed that the default value of this
parameter is false in the mysql official document. However, in the
shardingsphere 5.1.1 version, there is such a piece of code to set this
parameter value.

Similar code exists in both classes.

These behaviors of modifying database-driven parameter values are not found
in shardingsphere 5.0.0. Is there any reason for this?
I tried to modify the parameter value like below, and then Spring's
transaction rollback behavior took effect normally.

So can the code that sets this parameter value be changed to false?
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]