You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shardingsphere.apache.org by GitBox <gi...@apache.org> on 2021/11/18 08:26:33 UTC

[GitHub] [shardingsphere] TeslaCN opened a new issue #11090: Proxy Transaction State is incorrect in MySQL

TeslaCN opened a new issue #11090:
URL: https://github.com/apache/shardingsphere/issues/11090


   ## Bug Report
   
   ### Which version of ShardingSphere did you use?
   master
   
   ### Which project did you use? ShardingSphere-JDBC or ShardingSphere-Proxy?
   Proxy 
   
   ### Actual behavior
   When using server PreparedStatement to execute TCL, the transaction state in `BackendConnection` is incorrect.
   
   


-- 
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: notifications-unsubscribe@shardingsphere.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [shardingsphere] TeslaCN commented on issue #11090: Proxy Transaction State is incorrect in MySQL

Posted by GitBox <gi...@apache.org>.
TeslaCN commented on issue #11090:
URL: https://github.com/apache/shardingsphere/issues/11090#issuecomment-972641752


   The `begin` statement can not be prepared, but the `commit` still can be prepared.
   I found this issue can be reproduced by the following code.
   
   ```java
   public class MySQLPrepareTCL {
       
       public static void main(String[] args) throws Exception {
           try (Connection connection = getConnection()) {
               Statement statement = connection.createStatement();
               statement.execute("begin");
               PreparedStatement commit = connection.prepareStatement("commit");
               commit.execute();
               statement.execute("select 1");
           }
       }
       
       @SneakyThrows
       private static Connection getConnection() {
           return DriverManager.getConnection("jdbc:mysql://127.0.0.1:13306/sbtest?useServerPrepStmts=true", "root", "root");
       }
   }
   ```


-- 
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: notifications-unsubscribe@shardingsphere.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [shardingsphere] TeslaCN closed issue #11090: Proxy Transaction State is incorrect in MySQL

Posted by GitBox <gi...@apache.org>.
TeslaCN closed issue #11090:
URL: https://github.com/apache/shardingsphere/issues/11090


   


-- 
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: notifications-unsubscribe@shardingsphere.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [shardingsphere] TeslaCN commented on issue #11090: Proxy Transaction State is incorrect in MySQL

Posted by GitBox <gi...@apache.org>.
TeslaCN commented on issue #11090:
URL: https://github.com/apache/shardingsphere/issues/11090#issuecomment-973728348


   Duplicated with #9611.


-- 
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: notifications-unsubscribe@shardingsphere.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [shardingsphere] TeslaCN commented on issue #11090: Proxy Transaction State is incorrect in MySQL

Posted by GitBox <gi...@apache.org>.
TeslaCN commented on issue #11090:
URL: https://github.com/apache/shardingsphere/issues/11090#issuecomment-927816649


   Preparing TCL statements are not allowed in MySQL, I've misunderstood.


-- 
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: notifications-unsubscribe@shardingsphere.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [shardingsphere] TeslaCN closed issue #11090: Proxy Transaction State is incorrect in MySQL

Posted by GitBox <gi...@apache.org>.
TeslaCN closed issue #11090:
URL: https://github.com/apache/shardingsphere/issues/11090


   


-- 
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: notifications-unsubscribe@shardingsphere.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org