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/06/23 07:33:37 UTC

[GitHub] [shardingsphere] peilinqian opened a new issue, #18540: After the "cursor, close, fetch, move" sql is executed successfully. no return information

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

   ## 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_181
   ShardingSphere-5.1.3-SNAPSHOT
   Commit ID: 9cdbba7caebafc59be9842f7dd73aaad7721d12b
   Commit Message: Refactor RulesUsedResourceQueryResultSet (#18520)
   Branch: master
   Build time: 2022-06-22T19:07:02+0000
   
   ### Which project did you use? ShardingSphere-JDBC or ShardingSphere-Proxy?
   ShardingSphere-Proxy
   
   ### Expected behavior
    After the "cursor, close, fetch, move" sql is executed successfully.  return success message
   
   ### Actual behavior
    After the "cursor, close, fetch, move" sql is executed successfully. no return information
   
   ### 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'),(6,6,60,'test6');
   
   --查询fetch、move功能
   start transaction;
   --cursor子句正序功能验证
   cursor cur_test_01 for select * from t_broadcast order by 1;
   ----默认移动,不指定
   move from cur_test_01;
   move cur_test_01;
   ----forward方式,不指定count
   fetch forward from cur_test_01;
   ----forward方式,指定count
   fetch forward 2 from cur_test_01;
   ----forward方式,指定all
   fetch forward all from cur_test_01;
   ----获取结果下一行为空
   fetch forward from cur_test_01;
   close 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] strongduanmu commented on issue #18540: After the "cursor, close, fetch, move" sql is executed successfully. no return information

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

   After the pr was merged, the cursor, move, close statements will return result.
   
   <img width="681" alt="image" src="https://user-images.githubusercontent.com/10829171/175512739-c6042d22-37da-40fd-b265-bd0b7e4821eb.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 commented on issue #18540: After the "cursor, close, fetch, move" sql is executed successfully. no return information

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

   @peilinqian Thank you for your feedback, I will optimize it later.


-- 
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 #18540: After the "cursor, close, fetch, move" sql is executed successfully. no return information

Posted by GitBox <gi...@apache.org>.
TeslaCN closed issue #18540:  After the "cursor, close, fetch, move" sql is executed successfully. no return information
URL: https://github.com/apache/shardingsphere/issues/18540


-- 
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 #18540: After the "cursor, close, fetch, move" sql is executed successfully. no return information

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

   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=> --查询fetch、move功能
   test_db=> start transaction;
   START TRANSACTION
   test_db=> --cursor子句正序功能验证
   test_db=> cursor cur_test_01 for select * from t_broadcast order by 1;
   DECLARE CURSOR
   test_db=> ----默认移动,不指定
   test_db=> move from cur_test_01;
   MOVE 1
   test_db=> move cur_test_01;
   MOVE 1
   test_db=> ----forward方式,不指定count
   test_db=> fetch forward from cur_test_01;
    id | c_id | a  |   b
   ----+------+----+-------
     3 |    3 | 10 | test3
   (1 row)
   
   test_db=> ----forward方式,指定count
   test_db=> fetch forward 2 from cur_test_01;
    id | c_id | a  |   b
   ----+------+----+-------
     4 |    4 | 40 | test4
     5 |    5 | 50 | test5
   (2 rows)
   
   test_db=> ----forward方式,指定all
   test_db=> fetch forward all from cur_test_01;
    id | c_id | a  |   b
   ----+------+----+-------
     6 |    6 | 60 | test6
   (1 row)
   
   test_db=> ----获取结果下一行为空
   test_db=> fetch forward from cur_test_01;
    id | c_id | a | b
   ----+------+---+---
   (0 rows)
   
   test_db=> close cur_test_01;
   CLOSE CURSOR
   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