MrDustZero opened a new issue, #24188:
URL: https://github.com/apache/shardingsphere/issues/24188

   **shardingsphere-jdbc  5.0.0**
   
   mysql default isolation : REPEATABLE-READ
   spring use :  @Transactional(rollbackFor = Exception.class,isolation = 
Isolation.READ_UNCOMMITTED)
   
   spring change  isolation  code in  
org.springframework.jdbc.datasource.DataSourceUtils.prepareConnectionForTransaction:
   `               // Apply specific isolation level, if any.
                Integer previousIsolationLevel = null;
                if (definition != null && definition.getIsolationLevel() != 
TransactionDefinition.ISOLATION_DEFAULT) {
                        if (debugEnabled) {
                                logger.debug("Changing isolation level of JDBC 
Connection [" + con + "] to " +
                                                definition.getIsolationLevel());
                        }
                        int currentIsolation = con.getTransactionIsolation();
                        if (currentIsolation != definition.getIsolationLevel()) 
{
                                previousIsolationLevel = currentIsolation;
                                
con.setTransactionIsolation(definition.getIsolationLevel());
                        }
                }
   `
   
   if (currentIsolation != definition.getIsolationLevel())   is false  no 
changes made
   ShardingSphereConnection    default isolation  TRANSACTION_READ_UNCOMMITTED
   `
   private int transactionIsolation = TRANSACTION_READ_UNCOMMITTED;
   `
   
   but sql session isolation still REPEATABLE-READ
   
   
   How to solve it?


-- 
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]

Reply via email to