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/09/28 12:32:40 UTC

[GitHub] [shardingsphere] peilinqian opened a new issue, #21250: In XA transaction,the cursor syntax is abnormal.

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

   ## 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?
   
   we find java version: java8, full_version=1.8.0_342, full_path=/home/peilq_sharding/bisheng-jdk1.8.0_342//bin/java
   ShardingSphere-5.2.1-SNAPSHOT
   Commit ID: dirty-4114e7ee4cbe5923c2b403a3e86d1f23355cadf3
   Commit Message: Fix parse exception when execute insert statement with negative value (#21197)
   Branch: 4114e7ee4cbe5923c2b403a3e86d1f23355cadf3
   Build time: 2022-09-27T16:37:07+0800
   
   ### Which project did you use? ShardingSphere-JDBC or ShardingSphere-Proxy?
   ShardingSphere-Proxy
   
   ### Expected behavior
   In XA transaction,the cursor syntax is normal.
   ### Actual behavior
   In XA transaction,the cursor syntax is abnormal.
   
   ```
   test_db=> create table t_broadcast(id int,c_id int,a int,b text);
   CREATE TABLE
   test_db=> insert into t_broadcast values (1,1,10,'test1'),(2,2,20,'test2'),
   test_db-> (3,3,10,'test3'),(4,4,40,'test4'),(5,5,50,'test5');
   INSERT 0 5
   test_db=>
   test_db=> show transaction rule;
    default_type | provider_type | props
   --------------+---------------+-------
    LOCAL        |               |
   (1 row)
   test_db=> start transaction;
   START TRANSACTION
   test_db=> cursor cur_test_01 for select * from t_broadcast order by 1;
   DECLARE CURSOR
   test_db=> fetch from cur_test_01;
    id | c_id | a  |   b
   ----+------+----+-------
     1 |    1 | 10 | test1
   (1 row)
   test_db=> end;
   COMMIT
   
   ```
   
   ```
   test_db=> create table t_broadcast(id int,c_id int,a int,b text);
   CREATE TABLE
   test_db=> insert into t_broadcast values (1,1,10,'test1'),(2,2,20,'test2'),
   test_db-> (3,3,10,'test3'),(4,4,40,'test4'),(5,5,50,'test5');
   INSERT 0 5
   test_db=>
   test_db=> show transaction rule;
    default_type | provider_type | props
   --------------+---------------+-------
    XA           | Narayana      |
   (1 row)
   
   test_db=> start transaction;
   START TRANSACTION
   test_db=> cursor cur_test_01 for select * from t_broadcast order by 1;
   ERROR:  org.postgresql.util.PSQLException
   test_db=> fetch from cur_test_01;
   ERROR:  Current transaction is aborted, commands ignored until end of transaction block.
   test_db=> end;
   ROLLBACK
   ```
   
   
   
   ### Reason analyze (If you can)
   
   ### Steps to reproduce the behavior, such as: SQL to execute, sharding rule configuration, when exception occur etc.
   ```
   drop table if exists t_broadcast;
   create table t_broadcast(id int,c_id int,a int,b text);
   insert into t_broadcast values (1,1,10,'test1'),(2,2,20,'test2'),
   (3,3,10,'test3'),(4,4,40,'test4'),(5,5,50,'test5');
   
   show transaction rule;
   start transaction;
   cursor cur_test_01 for select * from t_broadcast order by 1;
   fetch from cur_test_01;
   end;
   ```
   
   ### 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] wsm12138 commented on issue #21250: In XA transaction,the cursor syntax is abnormal.

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

   /bin/java
   we find java version: java8, full_version=1.8.0_312, full_path=/bin/java
   ShardingSphere-5.2.1-SNAPSHOT
   Commit ID: a467bbe1668c2c300d3c91236e9e213c565ab7bf
   Commit Message: Fix openGauss cursor execution in xa transaction(#21250) (#21257)
   Branch: a467bbe1668c2c300d3c91236e9e213c565ab7bf
   Build time: 2022-09-29T13:24:09+0800
   
   
   <img width="894" alt="image" src="https://user-images.githubusercontent.com/86462784/192974618-4d37b642-99cc-4009-963f-f412b4f38da7.png">
   
   <img width="1838" alt="image" src="https://user-images.githubusercontent.com/86462784/192974804-406840d1-b3fd-494c-b827-c4488f7f105b.png">
   
   


-- 
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] strongduanmu closed issue #21250: In XA transaction,the cursor syntax is abnormal.

Posted by GitBox <gi...@apache.org>.
strongduanmu closed issue #21250: In XA transaction,the cursor syntax is abnormal.
URL: https://github.com/apache/shardingsphere/issues/21250


-- 
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] peilinqian commented on issue #21250: In XA transaction,the cursor syntax is abnormal.

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

   we find java version: java8, full_version=1.8.0_282, full_path=/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.282.b08-1.el7_9.x86_64/bin/java
   ShardingSphere-5.2.1-SNAPSHOT
   Commit ID: dirty-bcde6f374c4a3a025173fbc9f6d0e66ed686a042
   Commit Message: Fix fetch forward all error in openGauss(#21421) (#21471)
   Branch: bcde6f374c4a3a025173fbc9f6d0e66ed686a042
   Build time: 2022-10-11T19:13:56+0800
   
   ```
   test_db=> create table t_broadcast(id int,c_id int,a int,b text);
   CREATE TABLE
   test_db=> insert into t_broadcast values (1,1,10,'test1'),(2,2,20,'test2'),
   test_db-> (3,3,10,'test3'),(4,4,40,'test4'),(5,5,50,'test5');
   INSERT 0 5
   test_db=>
   test_db=> show transaction rule;
    default_type | provider_type | props
   --------------+---------------+-------
    XA           | Narayana      |
   (1 row)
   
   test_db=> start transaction;
   START TRANSACTION
   test_db=> cursor cur_test_01 for select * from t_broadcast order by 1;
   DECLARE CURSOR
   test_db=> fetch from cur_test_01;
    id | c_id | a  |   b
   ----+------+----+-------
     1 |    1 | 10 | test1
   (1 row)
   
   test_db=> end;
   COMMIT
   test_db=>
   
   ```


-- 
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] FlyingZC commented on issue #21250: In XA transaction,the cursor syntax is abnormal.

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

   Fixed
   ```
   sharding_db=> select * from t_broadcast;
    id | c_id | a  |   b
   ----+------+----+-------
     1 |    1 | 10 | test1
     2 |    2 | 20 | test2
     3 |    3 | 10 | test3
     4 |    4 | 40 | test4
     5 |    5 | 50 | test5
   (5 rows)
   
   sharding_db=> show transaction rule;
    default_type | provider_type | props
   --------------+---------------+-------
    XA           | Narayana      |
   (1 row)
   
   sharding_db=> start transaction;
   START TRANSACTION
   sharding_db=> cursor cur_test_01 for select * from t_broadcast order by 1;
   DECLARE CURSOR
   sharding_db=> fetch from cur_test_01;
    id | c_id | a  |   b
   ----+------+----+-------
     1 |    1 | 10 | test1
   (1 row)
   
   sharding_db=> end;
   COMMIT
   ```


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