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 2022/04/23 05:59:33 UTC

[GitHub] [shardingsphere] wuguanyu opened a new issue, #17029: Savepoint can only be used in transaction blocks

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

   ## Bug Report
   
   **For English only**, other languages will not accept.
   
   Before report a bug, make sure you have:
   
   - Searched open and closed [GitHub issues](https://github.com/apache/shardingsphere/issues).
   - Read documentation: [ShardingSphere Doc](https://shardingsphere.apache.org/document/current/en/overview).
   
   Please pay attention on issues you submitted, because we maybe need more details. 
   If no response anymore and we cannot reproduce it on current information, we will **close it**.
   
   Please answer these questions before submitting your issue. Thanks!
   
   ### Which version of ShardingSphere did you use?
   5.1.1
   
   ### Which project did you use? ShardingSphere-JDBC or ShardingSphere-Proxy?
   ShardingSphere-JDBC
   
   ### Expected behavior
    no exception 
   
   ### Actual behavior
   
   Savepoint can only be used in transaction blocks
   
   ### Reason analyze (If you can)
   
   ### Steps to reproduce the behavior, such as: SQL to execute, sharding rule configuration, when exception occur etc.
   
   ### Example codes for reproduce this issue (such as a github link).
   


-- 
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.apache.org

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


[GitHub] [shardingsphere] wuguanyu commented on issue #17029: Savepoint can only be used in transaction blocks

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

   > > @zjcnb <img alt="image" width="842" src="https://user-images.githubusercontent.com/24486917/164889768-19f172b5-c72b-47d6-90a1-20c7046b2170.png">
   > > what codestyle do our team use ?
   > 
   > Default style for idea. What's the problem?
   
   I wanted to fixed, encounter some checkStyle issue


-- 
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] wuguanyu commented on issue #17029: Savepoint can only be used in transaction blocks

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

   > @wuguanyu Can you provider your demo project?
   
   https://github.com/wuguanyu/shardingsphere/commits/2022-04-24-fix-bug
   I try to fix by myself, It resolve my issue, but I can't confirm my code is correct or not 


-- 
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] zjcnb commented on issue #17029: Savepoint can only be used in transaction blocks

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

   @wuguanyu  Thank you for your feedback, I 'll check 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: notifications-unsubscribe@shardingsphere.apache.org

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


[GitHub] [shardingsphere] wuguanyu commented on issue #17029: Savepoint can only be used in transaction blocks

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

   @zjcnb 
   <img width="842" alt="image" src="https://user-images.githubusercontent.com/24486917/164889768-19f172b5-c72b-47d6-90a1-20c7046b2170.png">
   
   what codeStyle Our team use ?


-- 
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] jingshanglu commented on issue #17029: Savepoint can only be used in transaction blocks

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

   > > @wuguanyu Can you provider your demo project?
   > 
   > https://github.com/wuguanyu/shardingsphere/commits/2022-04-24-fix-bug I try to fix by myself, It resolve my issue, but I can't confirm my code is correct or not
   
   Maybe it's better to change check isInTransaction from `ConnectionManager` to `ShardingSphereConnection` use `isHoldTransaction` .


-- 
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] wuguanyu commented on issue #17029: Savepoint can only be used in transaction blocks

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

   > > > @wuguanyu Can you provider your demo project?
   > > 
   > > 
   > > https://github.com/wuguanyu/shardingsphere/commits/2022-04-24-fix-bug I try to fix by myself, It resolve my issue, but I can't confirm my code is correct or not
   > 
   > Maybe it's better to change check isInTransaction from `ConnectionManager` to `ShardingSphereConnection` use `isHoldTransaction` .
   
   it seem like my code is not good way to fix.  I only wanted fixed new SQLException("Savepoint can only be used in transaction blocks.") to make our company program to run on line 


-- 
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] princess-yanyan commented on issue #17029: [SQLException]Savepoint can only be used in transaction blocks

Posted by GitBox <gi...@apache.org>.
princess-yanyan commented on issue #17029:
URL: https://github.com/apache/shardingsphere/issues/17029#issuecomment-1109235236

   I also encounter this problem ,
   maybe it's a bug,when i use local transaction with nested transactions,will cause “Savepoint can only be used in transaction blocks”


-- 
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] zjcnb commented on issue #17029: Savepoint can only be used in transaction blocks

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

   @wuguanyu Can you provider your demo project?


-- 
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] wuguanyu commented on issue #17029: Savepoint can only be used in transaction blocks

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

   org.apache.shardingsphere.transaction. ConnectionTransaction
   ```
   private final ShardingSphereTransactionManager transactionManager;
       
   /**
        * Whether in transaction.
        * 
        * @return in transaction or not
        */
       public boolean isInTransaction() {
           return null != transactionManager && transactionManager.isInTransaction();
       }
   ```
   if i use localTransaction , the ShardingSphereTransactionManager is always null.
   
   


-- 
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] zjcnb commented on issue #17029: Savepoint can only be used in transaction blocks

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

   > @zjcnb <img alt="image" width="842" src="https://user-images.githubusercontent.com/24486917/164889768-19f172b5-c72b-47d6-90a1-20c7046b2170.png">
   > 
   > what codestyle do our team use ?
   
   Default style for idea. What's the problem?


-- 
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] wuguanyu commented on issue #17029: Savepoint can only be used in transaction blocks

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

   > @wuguanyu Can you provider your demo project?
   
   I use my company business project. It hard to make demo project, I need try


-- 
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] tristaZero closed issue #17029: [SQLException]Savepoint can only be used in transaction blocks

Posted by GitBox <gi...@apache.org>.
tristaZero closed issue #17029: [SQLException]Savepoint can only be used in transaction blocks
URL: https://github.com/apache/shardingsphere/issues/17029


-- 
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] wuguanyu commented on issue #17029: Savepoint can only be used in transaction blocks

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

   > > @wuguanyu Can you provider your demo project?
   > 
   > https://github.com/wuguanyu/shardingsphere/commits/2022-04-24-fix-bug I try to fix by myself, It resolve my issue, but I can't confirm my code is correct or not
   
   


-- 
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] wuguanyu closed issue #17029: Savepoint can only be used in transaction blocks

Posted by GitBox <gi...@apache.org>.
wuguanyu closed issue #17029: Savepoint can only be used in transaction blocks
URL: https://github.com/apache/shardingsphere/issues/17029


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